- Code: Select all
`#define SPINDLE_MIN_RPM 117.1875 // Min spindle RPM. This value is equal to (1/256) duty cycle on the PWM.`

For the most accurate RPM control we need to use 117.1875 (30,000 / 256) as the min rpm. I believe PWM 0 is meant to represent off so the minimum RPM is PWM 1 or 1/256 of the max which in this case is 117.1875

The unfortunate reality of controlling the spindle this way is we only have 255 possible settings with each jump being about 117RPM. So no matter what value you send to grbl in terms of spindle RPM you will only get within about +/- 59RPM of the value you set.

I hope this helps the next person.

--Christopher