Hobby servo - hack to get position using I2C

Hi there,

I have a problem I try to solve.

There are a bunch of hobby servos I need to use in a biped robot (already have those).

They don't offer position feedback as they are cheap ones.

I want to hack into the internal potentiometer to get position feedback and read this position externally via I2C protocol, practically by having two more wires coming out of the servo.

Im thinking of using a cheap microcontroller with at least one ADC included, also having support for I2C.

I would probably need a way to convert from the internal pot values (not yet measured, but let's say - for now - they are between 0.5V to 1.8V when measured from the central point of the internal pot) to values between 0V and 5V? to take advantage of the full resolution of the ADC, I would probably need to use an OP amp for that.

The microcontroller and OP amp would be put on a small board to be fitted inside the servo case. They should take power directly from the servo's power line. I will also need a voltage regulator and filter circuit on this small board.

The used microcontroller (and the other components) should be cheap enough to worth making. Also, once built, the small board could be fitted to a replacement servo once the old one get broken.

Any suggestion how I can achieve this?

Not sure exactly how to do the electronics, also the microcontroller would require some coding before I could use it.

dragos678:
The microcontroller and OP amp would be put on a small board to be fitted inside the servo case.

Things were moving (even if not so smoothly) until I got to that line.

I have opened a few servos in my time and I have not noticed any spare space inside any of them.

Leaving that aside, many of the Atmel MCUs (but not the Atmega 328) include an amplifier as part of the ADC system.

…R