Duet 3 Spindle Control
I'm trying to configure my Duet 3 to set my spindle speeds. I'm using a PWM to 0-10VDC board from the out9 pin on the Duet.
I'm having trouble setting the PWM frequency for the spindle speed. I currently have a multimeter hooked up to the output pins of the PWM converter board, and below is a series of code that I've tried setting different frequencies, but getting more or less the same result in all cases.
I expect to set the spindle speed to 6000rpm to get 2.5VDC on the pins.
The board has a pair of jumpers to select between (what appears to be) 0-10V and 0-7.5V logic, I'm confident that I've got this selected right.
Here's a link to the board i'm using: https://www.auscomtech.com.au/product/pwm-to-voltage-converter-module-0-100-to-0-10v-digital-to-analog-signal/
M453 C"out9" F50 M3 S6000 Read: 4.94V M453 C"out9" F100 M3 S6000 Read: 4.93V M453 C"out9" F1000 M3 S6000 read: 4.87V M453 C"out9" F3000 m3 s6000 Read: 4.74V M453 C"out9" F10000 M3 S6000 Read: 4.62V M453 C"out9" F500000000 m3 s6000 Read: 6.00V M453 C"out9" F5 m3 s6000 Read: 5.96V M453 C"out9" ;No frequency M3 S8000 Read: 7.43V M3 S10000 Read: 8.26V M3 S12000 Read: 8.24v
To simplify the question. Is there any reason why changing the PWM frequency of the M453 command would have no effect on the output voltage - which is supposed to be proportionate to the PWM frequency (with its limits)?
bearer last edited by
Is there any reason why changing the PWM frequency of the M453 command would have no effect on the output voltage - which is supposed to be proportionate to the PWM frequency (with its limits)?
well, to be blunt - the voltage isn't proportional to the PWM frequency but rather the duty cycle.
littlehobbyshop last edited by
I think you need to set your R value in M453 to your spindle max. Expected frequency for your controller is 1-3KHz so F needs to be between 1000-3000.
PWM control is on the duty cycle of the wave not the frequency, frequency stays constant once you've set it.
M453 is set once then speed changes done with M3.
M453 C"out9" R12000 F2000
M3 S12000 ;Should get 10V
M3 S6000 ;Should get 5V
right... There's a gap in my understanding there. Thanks for clearing that up. I'll give that a shot this weekend.
Thanks, that worked.