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

    shutting down a servo?

    Scheduled Pinned Locked Moved
    General Discussion
    6
    15
    556
    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.
    • droftartsundefined
      droftarts administrators @Tinchus
      last edited by

      @Tinchus sending M42 P0 S0 should turn off the servo. M280 P0 S0 means 'set servo angle to 0 degrees', which often servos aren't capable of reaching, and maybe drawing a lot of current.

      Ian

      Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

      Tinchusundefined 1 Reply Last reply Reply Quote 0
      • Tinchusundefined
        Tinchus @droftarts
        last edited by

        @droftarts that was my understanding, yes. But as I posted above, reading the documentation again on the link provided, says "then use M280 P# S0 to stop commanding the servo"

        To my understanding stop commanding meand stop sending command signal or something similar. An as stated on the documentation, that comand is an option in the case where the servo is may be neing prevented from reaching position, so the servo will start to draw a lot fo current. To avoid taht we can command the movement , and then send M280 P# S0.

        Then the information on docuemntation might need to be updated/corrected?

        Going back to my problem: any idea on how can I shut down the servo?

        droftartsundefined 1 Reply Last reply Reply Quote 0
        • droftartsundefined
          droftarts administrators @Tinchus
          last edited by

          @Tinchus The documentation is wrong, and I have updated it: https://docs.duet3d.com/en/User_manual/Connecting_hardware/Motors_servos#stall-current

          As I said before, M42 P0 S0 stops the servo. It sets the PWM on the servo control pin to zero. M280 always sets a PWM signal, so there's no way to turn the servo 'off' with M280. See the M280 notes here: https://docs.duet3d.com/User_manual/Reference/Gcodes#m280-set-servo-position

          Ian

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

          Tinchusundefined 1 Reply Last reply Reply Quote 0
          • Tinchusundefined
            Tinchus @droftarts
            last edited by

            @droftarts Sorry, I missread. You meant M42 and I read M280 jajaja. Sorry again.
            I intentionally moved the servo to a position that I know will create a stall situation. I can hear the buzzing sound on the servo. Then I executed M42 P0 S0, and the sound is still there and it is not possible to move the servo by hand, it is definitely having power and trying to reach the commanded position, so the M42 command seems to not have the effect Im looking for?

            jay_s_ukundefined droftartsundefined 2 Replies Last reply Reply Quote 0
            • jay_s_ukundefined
              jay_s_uk @Tinchus
              last edited by

              @Tinchus the servo will always have power unless you switch that power off. you would need a relay to do so

              Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

              Tinchusundefined 1 Reply Last reply Reply Quote 0
              • droftartsundefined
                droftarts administrators @Tinchus
                last edited by droftarts

                @Tinchus Strange, it works for me, I've just tested it. I sent:
                M280 P0 S100 > servo moves to 100 degrees
                M42 P0 S0 > servo 'turns off', can be moved manually

                M280 P0 S100 > servo moves to 100 degrees
                M280 P0 S10 > servo moves to 10 degrees
                M280 P0 S5 > servo tries to move to 5 degrees, but stalls, with noise
                M42 P0 S0 > servo 'turns off', noise stops, can be moved manually

                My servo is a Hitec HS-70MG 12.5g.

                Ian

                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                Tinchusundefined 1 Reply Last reply Reply Quote 1
                • Tinchusundefined
                  Tinchus @jay_s_uk
                  last edited by

                  @jay_s_uk ok. My intentio is not to cut the power" but to achieve what in the documentatios is refered as away to avoid having the servo in a stall situation.
                  lets forget about the noise, if I execute m42 P0 S0 even if I have the noise I can trust no control signal is being sent to the servo?

                  1 Reply Last reply Reply Quote 0
                  • Tinchusundefined
                    Tinchus @droftarts
                    last edited by

                    @droftarts I remember having tried that servo, I changed it just becauso of it torque (the futaba one is almost double). And the other important differentce is that your servo is analog, mine is digital

                    droftartsundefined 1 Reply Last reply Reply Quote 0
                    • droftartsundefined
                      droftarts administrators @Tinchus
                      last edited by

                      @Tinchus I think if you still hear noise, it's still trying to get to position, so still stalling. If M42 isn't working, maybe digital servos need a different mechanism to turn off. I've asked @dc42. Is there any information on this in the futaba SU-300 data sheet?

                      Ian

                      Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                      1 Reply Last reply Reply Quote 0
                      • o_lampeundefined
                        o_lampe
                        last edited by o_lampe

                        A humming servo is a regular thing, when it doesn't reach the desired angle.
                        It happens, even when the servo arm is within the boundaries of the internal gears, but it's no problem then. (unless your setup requires too much torque)
                        You could try one thing, for peace of mind:

                        • command the servo 5 degree or microsecond past the point you want to reach (whichever you prefer)
                        • wait a little while for the arm to reach the position (eg. G4 P200 ; waits 200milliseconds)
                        • move 5 back

                        With that trick, you'll overcome the backlash of the internal potmeter and it will be quiet
                        Maybe have to adapt to different angles/microseconds for your specific servo

                        1 Reply Last reply Reply Quote 0
                        • zaptaundefined
                          zapta @Tinchus
                          last edited by

                          @Tinchus, I have a non Duet project where a servo needs to be quiet between moves and I solved it by stopping the signal to the servo (PWM output stays at zero volts) instead of pulsating. Potentially you can do the same with the Duet. E.g. by reconfiguring the IO point.

                          1 Reply Last reply Reply Quote 1
                          • achrnundefined
                            achrn
                            last edited by achrn

                            @Tinchus your problems might be your choice of servo.

                            Futaba SU300 is a digital servo. It doesn't want to see PWM, it wants to see SBUS, which is serial data, 25 byte packets, at 100,000 baud, and the polarity is inverted.

                            I think that if it doesn't get SBUS, it 'falls back' to looking for 'normal' servo PWM, which is why it works at all.

                            I suspect (but this is speculation) that M42 doesn't work as expected because when the servo doesn't see either SBUS or PWM it holds position. Possibly you can program what it does in that situation if you put it on a programmer (you want a CIU-3 programmer, I believe), but that's about 50 quid. I'd buy a 'normal' PWM servo instead.

                            Alternatively, there's a reasonably straightforward SBUS arduino library by Bolder Flight Systems - possibly you could lash together something where your Duet talks to an arduino and the arduino talks to the servo. Still, I'd buy a 'normal' PWM servo instead.

                            Tinchusundefined 1 Reply Last reply Reply Quote 2
                            • Tinchusundefined
                              Tinchus @achrn
                              last edited by

                              @achrn I think you nare oin the righht truck. I was suspecting something about this and ttalking to futaba support about it. I will try to get a non pwm servo, any recommendations about it?

                              droftartsundefined 1 Reply Last reply Reply Quote 0
                              • droftartsundefined
                                droftarts administrators @Tinchus
                                last edited by

                                @Tinchus You may be able to get the Duet to send the correct SBUS commands, similar to how @DonStauffer did it with the NeoDriver LED board: https://forum.duet3d.com/topic/35384/neopixel-driver-results

                                Ian

                                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

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