KFLOP Spindle Control with PWM Converter?
Posted: Tue Jul 22, 2025 12:07 am
Good afternoon everybody,
I was hoping I could pick some of your brains to help me with my router. I have a custom CNC router made for me by Carl Bruce and it came setup with manual spindle speed control through the VFD, though the FOR and DCM pins in the VFD are connected to the KFLOP board and do allow the spindle to turn on and off automatically during jobs. I've been attempting to get things set up for automatic spindle speed control via gcode, but have been having a lot of trouble. My post processor is kicking out M3 and S speed commands already. I read that the KFLOP board puts out PWM spindle control signals via pins on JT6, but my Huanyang VFD requires an analog signal for speed control. My breakout board doesn't have built in PWM to analog converters, so I read that you can purchase a simple PWM to analog converter board to still be able to control it with the KFLOP board. I've purchased 3 little boards off of Amazon to play with, hoping I could get one of them to work.
Here's the link to the one I'm currently working with: https://www.amazon.com/dp/B08JGH2Y2Z?re ... title&th=1
The pins on this little board come in pairs, each with its own ground. Right now I have it wired up as follows:
PWM pin to I026 (JT6, pin 5) on the KFLOP board
GND pin to a nearby ground on the KFLOP (JT6, pin 8)
V-OUT pin to the VI pin on the VFD
GND pin to the ACM pin on the VFD
VCC pin to 12v on a nearby power supply
GND pin to the ground on the 12v power supply
Note: I've read this board might need 15v minimum input at VCC, so I have an adjustable power supply coming, but I've seen forum descriptions of people claiming it worked with a raspberry pi GRBL setup using a 12v source.
VFD Changes:
1. I moved the J1 pin in the VFD to the 1&2 pin side of the jumper for external board control instead of potentiometer control.
2. I followed a tutorial to make program changes to PD001/PD002 (both set to 1), and PD0070 (set to 0 for 0-10v control range), PD0072/PD0073 (set to 400hz and 0hz respectively, though I've heard I should change the 0hz to roughly 120hz as a minimum setting).
Note: I've also tried connecting the VCC and GND pins from the converter board to the VFD instead of the power supply, using the 10v pin on the VFD for VCC on the converter board, and the ACM pin in the VFD for GND on the converter board. Neither of these setups have worked, though the one I just mentioned here allowed the spindle to be turned on/off via M3 commands, while my current wiring (shown above) won't even allow that.
C Program Changes: Carl helped me load C program changes that should allow for spindle control via the KFLOP board, but I don't really understand enough here to know what my current set up is. We couldn't get it to work. I do recall seeing some code that was reminiscent of the SpindlePWM.c example code in the examples files though. I've attached a picture of the section that I believe was modified, though there may have been other code added elsewhere.
So far nothing has worked. I always attempt an M3 command with various speed commands (S12000, S16000, etc.) to test it each time and never get speed control. The first set of connections described resulted in the M3 command not working at all. When I changed it over to the VFD connections for source voltage described in the note above, the M3 commands worked again, but no spindle speed control. I plan to test it again with a higher input voltage when that power supply arrives to see if that could be the issues, however, I'm not sure I'm on the right track with that.
Has anyone out there gotten a CNC router using the KFLOP board to have software speed control? Would love to hear how you pulled it off:).
I was hoping I could pick some of your brains to help me with my router. I have a custom CNC router made for me by Carl Bruce and it came setup with manual spindle speed control through the VFD, though the FOR and DCM pins in the VFD are connected to the KFLOP board and do allow the spindle to turn on and off automatically during jobs. I've been attempting to get things set up for automatic spindle speed control via gcode, but have been having a lot of trouble. My post processor is kicking out M3 and S speed commands already. I read that the KFLOP board puts out PWM spindle control signals via pins on JT6, but my Huanyang VFD requires an analog signal for speed control. My breakout board doesn't have built in PWM to analog converters, so I read that you can purchase a simple PWM to analog converter board to still be able to control it with the KFLOP board. I've purchased 3 little boards off of Amazon to play with, hoping I could get one of them to work.
Here's the link to the one I'm currently working with: https://www.amazon.com/dp/B08JGH2Y2Z?re ... title&th=1
The pins on this little board come in pairs, each with its own ground. Right now I have it wired up as follows:
PWM pin to I026 (JT6, pin 5) on the KFLOP board
GND pin to a nearby ground on the KFLOP (JT6, pin 8)
V-OUT pin to the VI pin on the VFD
GND pin to the ACM pin on the VFD
VCC pin to 12v on a nearby power supply
GND pin to the ground on the 12v power supply
Note: I've read this board might need 15v minimum input at VCC, so I have an adjustable power supply coming, but I've seen forum descriptions of people claiming it worked with a raspberry pi GRBL setup using a 12v source.
VFD Changes:
1. I moved the J1 pin in the VFD to the 1&2 pin side of the jumper for external board control instead of potentiometer control.
2. I followed a tutorial to make program changes to PD001/PD002 (both set to 1), and PD0070 (set to 0 for 0-10v control range), PD0072/PD0073 (set to 400hz and 0hz respectively, though I've heard I should change the 0hz to roughly 120hz as a minimum setting).
Note: I've also tried connecting the VCC and GND pins from the converter board to the VFD instead of the power supply, using the 10v pin on the VFD for VCC on the converter board, and the ACM pin in the VFD for GND on the converter board. Neither of these setups have worked, though the one I just mentioned here allowed the spindle to be turned on/off via M3 commands, while my current wiring (shown above) won't even allow that.
C Program Changes: Carl helped me load C program changes that should allow for spindle control via the KFLOP board, but I don't really understand enough here to know what my current set up is. We couldn't get it to work. I do recall seeing some code that was reminiscent of the SpindlePWM.c example code in the examples files though. I've attached a picture of the section that I believe was modified, though there may have been other code added elsewhere.
So far nothing has worked. I always attempt an M3 command with various speed commands (S12000, S16000, etc.) to test it each time and never get speed control. The first set of connections described resulted in the M3 command not working at all. When I changed it over to the VFD connections for source voltage described in the note above, the M3 commands worked again, but no spindle speed control. I plan to test it again with a higher input voltage when that power supply arrives to see if that could be the issues, however, I'm not sure I'm on the right track with that.
Has anyone out there gotten a CNC router using the KFLOP board to have software speed control? Would love to hear how you pulled it off:).