Router on/off and speed control with SuperPID and cncjs

Nice! Glad it’s working closer to expected!

Adding the manual Run switch will allow you turn on the router without the M3 command. Note that if you turn it on with the M3 command, this switch will not turn off the router.

SuperPID takes a voltage value and translates it to the rpm speed. This is simplified a little, but if you have a range of 0-30,000, then you have an increment of 300 rpm units for each 1% change in the PWM wave. The PWM wave gets translated to a voltage value for SuperPID to create the final rpm value. So, correct - the exact value displayed on SuperPID will be slightly different than the value you enter in to your gcode because there are only X# of steps for it to interpret. I think it’s a little more granular than 1% steps, but can’t find the documentation right off. See Page 22 in the SuperPID manual:

Correct, when you flip the switch, you’re essentially cutting off the signal from the PWM and switching to the pot. Keep in mind, you booted to computer mode, so the knob will be linear making it a little harder to control finely. Flipping back cuts the pot and revives the PWM signal (which your controller was sending the whole time, but you blocked through the switch). This is true regardless of which mode you boot into, SuperPID doesn’t care where the signal comes from. Which mode you boot into only determines whether the speed curve is linear or non-linear, which changes how either input source behaves as SuperPID interprets it.

Yep - one way only, there’s no communication back to “error check” the speed on the controller board or back to cncjs. Having it in both places is not redundant, IMO. The one in cncjs is telling you what the output is - what message is being sent to the controller. The SuperPID display tells you how it is interpreting that signal and give you live feedback (is the router bogging down and losing rpm, need to decrease feed rate, etc.).

While you’re in there, here’s a post on setting up some custom commands for rapid positioning:

This was a fun one to troubleshoot - I had never used the OP override before, learned something new! :slight_smile:

2 Likes