I'm trying to run a micro servo from a PWM connection on my Duex 5, but I don't seem to be able to get it to move at all with what I think are the correct settings. I can get some movement if I change the PWM frequency to much higher than it should be, but it never moves to where I think it should.
The servo is an MG90S. I have tried swapping it (I bought a pack of 3), but no change. It is connected to PWM_5 on my Duex.
I'm running:
- Duet 2 WiFi with Duex 5
- RRF 3.3
I have separate 5V power connected to the Duex's 5V Aux In and the jumper changed to select this.
According to the internet, the servo expects a 50Hz PWN frequency, and a 1ms pulse should put it to the minimum position, a 1.5 ms pulse should put it to the middle and a 2ms pulse should put it to the maximum position.
I think I should configure the servo with:
M950 S0 C"!duex.pwm5" Q50
and then set its position with, ie:
M280 P0 S1000
M280 P0 S1500
M280 P0 S2000
for the positions mentioned above.
This does nothing, except turn on the LED next to the heater 7 output (I have nothing connected to any of the duex heaters).
If I instead do:
M950 S0 C"!duex.pwm5" Q500
then the position commands do cause movement, just very small amounts, definitely not going to the correct positions.
Different values of Q give different results, 250 gives some big movements, but I'm fairly sure I shouldn't be changing that number at all.
Please help me, I have no idea what I'm doing.