RAMPS 1.4 Spindle Speed

I don’t have any practical experience in this area, but here are a few points I’ve gleamed from staying active in this forum.

  • Topics dealing with spindle speed are generally tied up with the concept of maintaining a constant RPM under varying loads. That is, some sort of feedback loop. You can find these topics in the forum by searching for “PID,” and here is one very long topic on this issue.
  • In skimming these topics, RPM is generally read from the spindle using a optical sensor like this one rather than a Hall sensor.
  • There is no pathway I know of for transmitting “arbitrary” data (like RPM) back to the g-code sender. There are very few g-code query commands, and they only provide specific data, and they must be repeatedly sent. Of course you have access to the Marlin source, so you could certainly hack this in if you have have the skills.
  • Marlin has the ability to take spindle speeds authored in your CAM software and output that data by setting a PWM pin. I don’t believe this is enabled in the V1 maintained versions of the firmware, but shouldn’t be too hard to enable.
  • If you have a bit of programming and hardware experience, you could use a WIFI enabled microcontroller and a browser or separate app to provide the two-way communication necessary to read and set RPM at a distance.

If it were me, I’d start by ignoring the variations of RPM based on load and just figure out a way to set the spindle no-load speed based on the PWM pin on the Ramps board. While the RPMs will vary somewhat under load, generally your spindle would follow the spindle speeds generated by your CAM solution.

1 Like