Hobby servo behavior
-
I've a continuous rotation servo connected to H3 @ 5 volts and it behaves perplexingly. The following things seem to happen - from the beginning >
M280 P3 S30 Nothing happens
M280 P3 S30 I1 Continuous rotation clockwise
M280 P3 S0 I1 Nil
M280 P3 S0 Stops at random position
M280 P3 S30 Nil
M280 P3 S0 I1 Continuous rotation clockwise
M280 P3 S0 Stops at random position
M280 P3 S300 Nil
M280 P3 S300 I1 Nil ???
I need a three position random setting capability of 0 , 90 and 180 degrees. Any and all ideas, suggestions etc welcome -
Have you tried using microseconds to control the servo? If you read the documentation for M280, it says that S values below 200 are treated as an angle and values above 200 as the pulse width in microseconds.
This makes little sense to me as the standard way to drive an RC servo is with pulses from 1000 to 2000 microseconds. So, try sending M280 P3 S1500. That should position the servo in approximately the middle of its travel range. S1000 should be all the way to the left and S2000 should be all the way to the right.
I've never used servos on a Duet board, but have extensive experience using them in the RC hobby.
-
Yes, tried microseconds as well - no joy.
Is it possible that the problem is the servo is continuous rotation rather than one limited to 180 degrees?
-
@balrags said in Hobby servo behavior:
Yes, tried microseconds as well - no joy.
Is it possible that the problem is the servo is continuous rotation rather than one limited to 180 degrees?
It could well be. What servo are we talking about? Do you have any data on it?
Maybe it has a "special" control signal. -
FEETECH FS90R MICRO SERVO - Sourced from Amazon but best described here > https://www.pololu.com/product/2820.
Size and form factor are critical as it integrates into a custom product. Do you have any suggestions. If not I think I will go ahead and purchase a 180 degree limited version - perhaps from another vendor/mfg.
Thanks for your interest
-
I don't see any results from your testing with microseconds, but anyway, you can't set this servo to 0, 90 and 180 degrees.
From the Pololu page:
"The FS90R continuous rotation servo converts standard RC servo position pulses into continuous rotation speed. The default rest point is 1.5 ms, but this can be adjusted by using a small screwdriver to turn the middle-point adjustment potentiometer. Pulse widths above the rest point result in counterclockwise rotation, with speed increasing as the pulse width increases; pulse widths below the rest point result in clockwise rotation, with speed increasing as the pulse width decreases."
You will need to look for a standard servo in the same size. The one you have either stands still or spins constantly in one direction or the other, the speed of rotation being controlled by the pulse width.
-
I had purchased from Amazon (addicted, I fear) and was unaware of the Pololu info at that time. Amazon almost never has any reliable tech info and sometimes publishes downright lies.
So thanks - I've ordered 180 degree replacements (metal gear MG90S).
I had tested microsecond values but had just not included them in this post. I'll fill in the blanks when the new ones arrive. -
@balrags said in Hobby servo behavior:
Amazon almost never has any reliable tech info ...
The Amazon posting for FEETECH FS90R MICRO SERVO that I saw says'continuous'. This means that you control the turning speed rather than the absolute angle. BTW, there 270 deg servos if you need a wider range. Those servos also need a wider pulse width to cover the entire range.
-
Bingo - thanks for the help.