Go Down

Topic: Position Feedback Servo? (Read 716 times) previous topic - next topic


Jun 27, 2020, 04:20 pm Last Edit: Jun 27, 2020, 04:21 pm by stark_xavier21
Is there a code to record the steps of a servo if i rotate it  manually?

if so, could anyone help me with this please?


No, not with a normal hobby servo. You'd need a special servo that provides feedback and then you'd need some special code to record what was happening and you'd have to hope that manually turning the servo didn't damage it.

Feedback servos do exist but there are not many few of them about e.g. https://www.pololu.com/product/3436


Coding Badly


A simple hobby servo usually has a potentiometer measuring the position of the servo horn for its own controlling circuit. You can hack into such a servo and locate the internal pin going to the sweeper of the potentiometer. Attach it to an analog input on your Arduino. Now you have a feedback from your servo. But don't just do it following this simple advice. Google for projects how people have done it. There might be things to consider, something I haven't mentioned.

If you ask for help and write 'u' instead of 'you' because you think it's convenient, I will write 'no' instead of 'yes'. For same reasons.

Go Up