RC Servos are servos that use a potentiometer as their position sensor.
To make a continuous rotation RC servo, the potentiometer is replaced with a fixed resistor so the servo loop is lost and thus the accuracy and position information as well.
See A Continuous Rotation RC Servo is NOT a Servo for more details.
BUT... if you do the modification yourself (like is the guy in this video did) then the potentiometer is still there and it should provide a really inexpensive and pretty accurate way to know the motor's position. To use it, route the wires out and use an Analog Input on your processor to measure the absolute position of the motor.
OK, here it where I divert into something I believe will work but haven't tested. I believe if you alter the procedure to ONLY cut the center wire to the potentiometer and still do the rest of the modification then route that center wire out, the wire will have a voltage that represents the location of the motor shaft. This is because the outer wires are just to provide power and powering both resistor stacks should not be a problem and the voltage on the wire will be a voltage between the servo supply voltage and ground.
Another option is to use an actual optical encoder. Note that this is a significantly more expensive and complicated solution because:
- Optical encoders can be expensive
- You will need to figure a way to directly couple the encoder to the shaft.
- If you get a standard quadrature encoder, you will need to add a home sensor since the encoder (unlike the potentiometer) has no concept of absolute position
- You will have to know how to decode and use quadrature signals to count position. This is really easy to mess up for cases like an encoder vibrating on an edge.
- You will also need to make sure your design is fast enough that you can catch all the transitions when running at full speed (interrupt based or custom hardware). For a 1024 count encoder and a 55rpm motor then your are going to need to sample the encoder at least every 500us or faster.
.... shall I continue
I would recommend you use the potentiometer in the servo.