Help with servos feedback position

I’m using 20 servos JX RD-5622MG 180 and 300 for a walking robot. I was looking on internet about how to do the control and get the feedback position without using the potenciometer but I haven’t found anything. Does anybody knows if there are a way to do that programming it and how?

Most hobby servos use brushed dc motors, potentiometer for position feedback and some electronics to create a closed loop position control.
The servo uses three wires: a ground, a positive supply and a pwm signal wire, so this means the servo is a open loop device from the users prespective; by varying the pulse width you can control the servo position, but there is no explicit feedback about the position.
I think it is possible to determine the position of the servo without modifying it, but I’m not sure it will be accurate enough or worth to implement; by measuring the current consumption you can determine the servo torque if the current is low you can assume the servo is in the right position determined by the pwm signal; the rotating brushed dc motor causes current ripples which frequency is proportional to the motor speed, by combining these to techniques I think you can come up with some position estimator algorithm, but I don’t think it will be worth it because you need a relatively complicated algorithm, you have to create a current shunt and some amplifier to amplify the shunt voltage to ADC range, I think it’s much easier to just modify the servo, add an extra wire for the potentiometer which can be fed into the ADC to determine position(voltage divider and a zener diode is recommended for protecting the ADC input).

3 Likes

Hello @SttnNa !

It seems to be a great project. Why are you using that quantity of servos? I think if you want to achieve bigger results, you should start with a simplify model, I will leave you here some tutorials that could help you in that way: