Hello everyone!

I have a 4x8' CNC router running Mach4 and I have been having a ton of trouble setting up automatic spindle speeds. I cut lots of materials and would like to control the spindle speed with G-Code.

I am using an Ethernet SmoothStepper, which outputs a 5v PWM single, but the VFD that I am using accepts a 0-10v analog signal. I ordered a breakout board with a PWM to 0-10v converter off of Amazon, but the board was dead on arrival. I found another board on Amazon that advertises converting a PWM signal to a 0-10v analog signal, but it does not do so linearly. I have even tried to create my own low-pass filter with an op-amp giving me the gain to output 0-10v, but there is still an error of around +/- 200 millivolts (For my 24,000RPM spindle, +/-200mV correlates to +/-480RPM).

I know that Mach4 has PID loop capabilities, but I cannot find much information on indexers for spindles at this speed. Also, I am aware that Mach3 has a linearity.dat file to adjust the spindle's linearity. Does Mach4 have such a configuration file that I am missing?



What are you guys using to get an accurate 0-10v output? Else, how are you guys controlling the speed of your spindles?

Thanks!