Diagnosing a buggy/faulty servo
-
The jitter is probably either normal behaviour for that servo, or caused by variations in the output of the buck converter. So you may wish to use M280 P# S# to set the servo position, G4 to delay for a few hundred milliseconds, then M42 P# S0 to turn off the signal to the servo. Most servos will stop and hold position when you turn off the drive signal.
It's on my work list to add an option to M280 to turn off the servo drive signal after a specified period of time.
-
Well the problem is it's not actually moving through the motion required. And this is definitely abnormal behavior. The jittering is something I've only experienced when our X5 failed.
The add-on buck converter could be an issue, but when I monitor the voltage while enabling the servo I see the voltage drop from 5.18 to 5.11V. This seems healthy enough to me. I'm trying to avoid hooking the servo directly to the 5v board output, because of the lack of timeout from the servo command and also because it pulls quite a bit of current and don't want to pop another onboard 5v converter.
What I find concerning is the 0.8V being output from PWM_5 even when no signal is called and the system has freshly rebooted. PWM_4 is outputting 0.3V as well. PWM 1-3 all show 0v on the signal pin. The 5v rail on the X5 is measuring 4.86v
This to me points that either the Duet is outputting something to heater6 and heater7 or the U9 mosfet driver is bugged. But there's no LED illumination from E5 or E6 heater, which I'd expect.
I swapped in an old (questionable working) X5 to see what it would do, but in this instance both the E5 and E6 lights illumated and the servo didn't respond either.
-
Did more testing. Hooked up a smaller servo directly to the pwm outputs. It was able to toggle position as expected on the other positions, including 6. But 7 still does not send out the signal to control the servo.
Also tested with the larger servo with the buck converter, and was able to confirm it worked as expected on 6. I'll be moving the command to run on 6, but I'm really hoping to understand why 7 isn't working anymore. The LED's do illuminate for 3-6(E2-E5) but not 7 (E6)
-
@mkelly, that sounds like either a bad connection in the ribbon cable, or a 74HCT02 on the DueX5 has failed.
-
I used 6 for as long as I could, but it just failed. Switched to 5 and used that for a while but now it failed.
All of the lights for the heaters are always enabled now.
Edit: Ok I'm pretty sure the issue is the servo overheated and (i'm guessing) caused the internals to short out to the control pin.
-
You said you are enabling the buck converter from a fan output. how are you doing that? The fan outputs switch the ground pin, so you can't just connect a buck converter to a controlled fan output without nasty things happening.
-
I'm using the buck based off advice from E3D. Running the "fan" fully open:
I did find a "smoking gun" as it were, where the servo wires were exposed through the insulation and were shorting out, The intermittent nature meant it wasn't fully apparent, but I think we can mark this as "Solved" under "wiring issue"
-
Unfortunately that's bad advice, and more or less guaranteed to damage the 74HCT02 chip that drives the servo control wire. It may also damage the fan mosfet after repeated use.
-
I’ll switch to using an external 5v supply to the duex to not overload the onboard and use an M42 instead of the fan
Thanks!
-
Using the on-board 5V supply is OK, although if your Duet is pre-1.04 then unless it is a small servo you should connect a 220uF capacitor in parallel with the 5V feed to it. What I didn't like about your diagram was connecting the ground wire of the buck regulator to a controlled fan output.
If the servo jitters then you are probably commanding it further than its usable range. To avoid the problem, either command it to a less extreme position in the M280 command, or follow the M280 command by a G4 command to delay for long enough for the servo to move, followed by a M42 S0 command to stop commanding the servo to move.