shutting down a servo?
-
@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?
-
@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
-
@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? -
@Tinchus the servo will always have power unless you switch that power off. you would need a relay to do so
-
@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 manuallyM280 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 manuallyMy servo is a Hitec HS-70MG 12.5g.
Ian
-
@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? -
@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
-
-
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 -
@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.
-
@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.
-
@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?
-
@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