Spindle PWM level shifting #156
-
Hi, I have a spindle driver which accepts 0-5V analog signal for rpm control. With AVR version of Grbl I just fed the pwm output to it and it worked wonderfully since the driver has an RC input. Now after migrating to arm, the max voltage achievable is 3.3V. The internet suggests a myriad of solutions but I want to avoid analog at all costs due to EMI sensitivity. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I would use the driver +5V to power the level shifter. The driver will filter out the PWM and use the result as an analog control so if the shifter is powered from a lower voltage it will limit the top speed of your spindle (actual_+5V/5). One customer was getting much lower spindle top speed because his +5 came from USB and it was fairly low (4.3V if I recall correctly). There are lots of ways to level shift. I like the mosfet approach for this as it doesn't lose much, if any, voltage level. Here's an example. You will need to run +3.3V along with gnd and signal, though. |
Beta Was this translation helpful? Give feedback.
-
easy enough to simulate it in SPICE and see what it does. FWIW, you can control the spindle PWM frequency with $33. |
Beta Was this translation helpful? Give feedback.
I would use the driver +5V to power the level shifter. The driver will filter out the PWM and use the result as an analog control so if the shifter is powered from a lower voltage it will limit the top speed of your spindle (actual_+5V/5). One customer was getting much lower spindle top speed because his +5 came from USB and it was fairly low (4.3V if I recall correctly).
There are lots of ways to level shift. I like the mosfet approach for this as it doesn't lose much, if any, voltage level. Here's an example. You will need to run +3.3V along with gnd and signal, though.