Pages: [1]   Go Down
Author Topic: how to read the angle value of a continuous rotation servo  (Read 459 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys, I would like to know if the function read of the servo library gives the current angle value even if it is applied to a continuous rotation servo. Using the function write we are setting the speed, so does the command read return the last speed or the current angle?
Logged

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 44
Posts: 2463
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The signal you sent to the servo is representative of its speed and not its angle. There's no way to determine the angle of a continuous rotation servo unless you add some type of additional, absolute encoder.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, thank you!
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not only can you not obtain the position value of a continuous rotation servo, even when using a standard unmodified servo the value returned from a servo read command is just whatever the last servo write value you used and if the servo is still moving to reach that servo write command posotion, then the servo read command will not reflect it's actual position until enough time has passed for the servo to reach the last position command written to it. It's a case that software can often run much faster then the hardware one is trying to control.
Lefty
Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If one wanted to DIY their own continous rotation servo, there is some possibility of having position feedback. The pots in servos I've modified don't have mechanical stops on the pots themselves. If one can work with small circuit mods. one might be able to electrically disconnect the internal pot, substitute a small resistor voltage divider for the internal pot, then externally read the origional internal pot.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If one wanted to DIY their own continous rotation servo, there is some possibility of having position feedback. The pots in servos I've modified don't have mechanical stops on the pots themselves. If one can work with small circuit mods. one might be able to electrically disconnect the internal pot, substitute a small resistor voltage divider for the internal pot, then externally read the origional internal pot.

That is possible. Remove the wiper wire and wire it to the center of two 10k ohm series resistors wired to Vcc and ground to make the servo electronics happy and use the pot's wiper terminal as a feedback signal to an arduino analog input pin. Keep in mind that the pot will have a 'bad spot' that will read flaky most likely, were it wraps around from min to max on the pot.

Lefty
Logged

Pages: [1]   Go Up
Jump to: