Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Diagnosing a buggy/faulty servo

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    2
    11
    1.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mkellyundefined
      mkelly
      last edited by

      I've been using the Duet X5 to drive a servo. I've had a couple of issues in the past, but this latest board had been working without issue.

      I am powering the servo off of a 24v to 5v buck converter that is enabled from a fan output. The server is being controlled off PWM_5 from the Duex5 board.

      I had a weird event on Friday with our AC input that ended up blowing the AC power fuse. I am not clear what happened that caused the event, but after replacing the fuse the system recovered.

      I went to test the servo on yesterday, and it doesn't respond as expected and "Jitters" at around the expected position. If I move the servo arm to an off position, it will go close to the expected position as normal, then jitters in place.

      Some testing I've done so far:

      24v output being measured from the PSU and being input into the Duet and X5
      Verified buck converter is outputting 5v
      Verified 5v pin on X5 board is outputting correct voltage

      Tried measured the input signal to the servo, but I'm only seeing 0.8v on standby, and doesn't change (much) during a state change. I would need to hook it up to a scope to see what the output signal looks like. I'm also not seeing LEDs illuminate on heater 6 and 7 as I'd expect. I also tried a new servo as well.

      This is leading me to believe that the culprit is probably the U9 chip 74HCT02.

      Is there any additional testing I can do on the U9 chip to verify it's integrity? Some other measurements I could be taking?

      I'm going to try switching the servo to run from PWM_3 since that is on U10, but this isn't the first time this has happened to us so I'm curious what we're doing wrong.

      Here's the code I'm using to run the servo:
      0_1539186435146_Servo_Code.txt

      And my config:
      0_1539186702888_config (5).g

      Thanks,
      Mike

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        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.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 1
        • mkellyundefined
          mkelly
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • mkellyundefined
            mkelly
            last edited by

            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)

            dc42undefined 1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @mkelly
              last edited by

              @mkelly, that sounds like either a bad connection in the ribbon cable, or a 74HCT02 on the DueX5 has failed.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • mkellyundefined
                mkelly
                last edited by mkelly

                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.

                1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators
                  last edited by

                  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.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  1 Reply Last reply Reply Quote 0
                  • mkellyundefined
                    mkelly
                    last edited by

                    I'm using the buck based off advice from E3D. Running the "fan" fully open:
                    0_1539698009866_wiring.png

                    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"

                    1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators
                      last edited by dc42

                      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.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 0
                      • mkellyundefined
                        mkelly
                        last edited by mkelly

                        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!

                        1 Reply Last reply Reply Quote 0
                        • dc42undefined
                          dc42 administrators
                          last edited by

                          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.

                          Duet WiFi hardware designer and firmware engineer
                          Please do not ask me for Duet support via PM or email, use the forum
                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA