Servos not working correctly
-
Hi everyone!
I have 2 servos (Savöx Mini-Servo SH-0264MG) that connected to my Duex 2 (PWM4 and PWM5). These servos are used to pick and put the extruder back. In RRF2 (2.05.1) they work correctly, but in RRF (3.0) they do not. They can pick the extruder correctly, but unable to put it back. I think there is something wrong with the angle or maybe a changed behaviour in RRF3.
The board is Duet 2 WiFi.
config.g:
; SERVOS SETUP
;M307 H6 A-1 C-1 D-1 ; not supported in RRF3*
;M307 H7 A-1 C-1 D-1 ; not supported in RRF3*
M950 P6 C"!duex.pwm4"
M42 P6 S0
M950 P7 C"!duex.pwm5"
M42 P7 S0tpre0.g:
M400G91
G1 Z2
G90G1 X-30 F12000
G1 X-39.5 F1000
G4 P300
M280 P6 S155
G4 P300
G1 X-30 F12000G91
G1 Z-2
G90tfree0.g:
G91
G1 Z2
G90G53 G1 X-30 F12000
G53 G1 X-39.5 F1000
G4 P300
M280 P6 S60
G4 P300
G53 G1 X-30 F12000G91
G1 Z-2
G90I look forward to your help. Thanks!
-
the servo commands are different in rrf3 change the P to S and start at 0
M950 S0 C"!duex.pwm4"
M950 S1 C"!duex.pwm5"And change the number in the M280 command
M280 P0 S60
-
@sykb What was the M280 command in tpre0.g and tfree0.g in RRF2? Or has it not changed?
I think this is an issue with the servo PWM frequency. Try M950 using S parameter instead of P, as S default PWM frequency is 50Hz (usual for most hobby servos), while P is 500Hz and probably too fast. Or use Q to set the PWM frequency.
If the M280 command in RRF2 had
I1
in it, try without inversion, eg:M950 S6 C"duex.pwm4" M950 S7 C"duex.pwm5"
I don't think you need the M42 commands either, as I think it is set at 0 when defined.
Ian
-
@Veti @droftarts thank you for your help. It's working now.
No, the M280 commands have not changed and did not have I1 in RRF2.
I use S in the M950 command, started at 0 and without "!" for the C parameter. Somehow the servos are working correctly right now.