standard servos hacked to provide feedback

Hi folks

found these instructions to add feedback from a standard servo.

https://www.instructables.com/id/Servo-Feedback-Hack-free/

wanted to know whether anybody has already given it a try and wouldn't it be nice to actually get a feedback where the servo is and not simply have to assume that the servo moved as requested?

would need extension of the servo service to allow for specifying feedback and do the math?

and the greatest thing is that it only requires a bit of hacking with zero costs?

Juerg

juerg's picture

feedback servo

gave it a try with a TowerPro MG995.

simply used analog pin 2 on my arduino and connected the point on the servo board that showed different voltages at different angles (middle pin below the outgoing cables).

needed some analog reads (100) in the setup to show  valid start values. In a 100 ms loop I incremented the servo position by 1 from 0 to 180 and used the average of 10 times analogRead for each cycle.

I did not expect such a perfect fit of position and analog read result. Will play around now with preventing moves and servo detach if position can't be reached.

 

juerg's picture

kind of hitting a wall

My trials with the (very cheap) MG995 copy was not very successful

a) huge initial deadband (it needs more than 10 1 degree increments to start moving)
b) whatever I tried I could not get a smooth slow rotation of the servo with decent stepping (tied to play around with servo.writeMicroseconds() but none of the increments (1..15 resulted in a proper stepping

Modified also a sitting around BlueBird L530 and saw some improvement:

a) no initial deadband
b) smooth positioning with 6us steps

Problems with this guy: frequently does not show a proper analog reading value fitting for the position (I assume because the servoBoard has an impact of what I see) or needs a lot of time and repeated readings to show a reasonable value. Therefore sensing resistance or even blocking is not easy to detect. Also saw that my analog read value goes through the ceiling when blocking the rotation physically - I would rather see the read value stay the same :-(

It also looks like we would need quite a number of parameters to treat all the different servos correctly. I am in the process of writing a testing app to get the corner numbers.

In total it is my opinion the I would be much better off with a separate potentiometer for the position reading. I am thinking of a double layer potentiometer and an additional cable for reading that out to replace the built-in poti.

Unfortunately I wasn't able to find such devices that could replace the existing potis in the servos? The double layer potis I found (and which I will try to test out with e.g. the externally mounted sholder potis) won't fit into the servo caseings and a countact I found at towerPro stopped discussions with me :-(

Maybe one of you readers can point me to a possible source (double layer poti to replace built-in servo poti?

Juerg