Duet 2 on RRF3: Servos not working
-
Thanks for your report. We also have reports that BLTouch deployment and retraction doesn't work reliably on the 2.04RC3 release. These may be related. I will investigate.
-
Hi dc42,
unfortunately servos also don't work on the newly updated firmware. They move slightly on M950 P... (500Hz) but not on M950 S... (50Hz). Also using the Q command makes no difference.
This is the code I use to move a servo on the new RRF 3:; The next two lines are in config.g: M950 P4 C"nil" M950 S4 C"exp.heater4" ; The next two lines are in a macro gcode: ;cutting code M280 P4 S20;reset G4 P10;wait M280 P4 S170;cutting G4 P800;wait M280 P4 S20;reset G4 P300;wait ;cutting code end
Would be great to here if you have any idea why that is? Thanks!
-
@felix9t said in Duet 2 on RRF3: Servos not working:
Hi dc42,
unfortunately servos also don't work on the newly updated firmware. They move slightly on M950 P... (500Hz) but not on M950 S... (50Hz). Also using the Q command makes no difference.
This is the code I use to move a servo on the new RRF 3:; The next two lines are in config.g: M950 P4 C"nil" M950 S4 C"exp.heater4" ; The next two lines are in a macro gcode: ;cutting code M280 P4 S20;reset G4 P10;wait M280 P4 S170;cutting G4 P800;wait M280 P4 S20;reset G4 P300;wait ;cutting code end
Would be great to here if you have any idea why that is? Thanks!
I just tested that on a Duet WiFi. After M280 P4 I get 750us positive going pulses on exp.heater4 (measured on the expansion connector), frequency 59.9Hz according to my 'scope. After M280 P4 S170 I get 2.3us pulses, same frequency.
The formula used by RRF in computing the pulse width is as follows (originally copied from Marlin):
microseconds = (min<float>(S, 180.0) * ((MaxServoPulseWidth - MinServoPulseWidth) / 180.0)) + MinServoPulseWidth
where the min and max pulse widths are 544 and 2400.
So I conclude that it is working correctly, and I don't understand why it isn't working for you.
PS - if I send M950 P5 Q100 then the next time I send a M280 P4 command, the pulse frequency increases to 100Hz.
-
@dc42 Having seen your post I also checked the frequency on a multimeter and indeed it shows 49.9Hz when using S4 or P4 Q50 resp. 499.8Hz when using P4. However, I can't get the servo running with the new firmware. Sometimes it moves once but doesn't execute the other commands. It works perfectly fine on RRF2 though.
I'm going to borrow an oscilloscope and I'll tell you when I find sth interesting. But I'm quite certain the issue must be software related.. -
Which Duet are you using?
-
@dc42 Duet Ethernet 1.02 or later + DueX5
-
@dc42 Do you have any news regarding the issue resp. could you replicate it?
-
@felix9t said in Duet 2 on RRF3: Servos not working:
@dc42 Do you have any news regarding the issue resp. could you replicate it?
I fixed this several days ago and posted about it in another thread. Have you tried the latest firmware at https://www.dropbox.com/sh/3azy1njy3ayjsbp/AACquxr2m00eV568RZg5QG5wa?dl=0 ?
-
PS - in the latest RRF3, for BLTouch v3 you must enable the pullup resistor on the Z probe input pin in the M558 command. I updated the documentation in several places to cover this.
-
@dc42 Thanks for the last update. It solved one issue with the BLTouch v3.
The biggest problem I had was that I needed to invert both pins from:M950 S4 C"exp.heater4" ... M950 S0 C"exp.heater3"
to
M950 S4 C"!exp.heater4" ... M950 S0 C"!exp.heater3"
That solved all issues. I've just discovered that they needed to be inverted for PWM..