If you have an Arduino, you don’t really need a separate servo controller - the Arduino can easily control two servos using the servo library.
Each Arduino pin can provide around 40mA, so it’s best to have power connected separately (and the signal pin going to the digital pins).
If you really want a separate servo controller, Arduino can really be used with almost everything: robotshop.com/en/servo-controllers.html
However, with the idea above, you really only need an IO shield: robotshop.com/en/dfrobot-io- … no-v7.html (separate terminals for servo power)
For RC servos, you set the angle rather than read it. Unless the torque is beyond what the servo can provide, it should move to that position and remain there.
Reading the angle would only be a confirmation that the servo is working properly, or if you have a slower move and would like to know the position in motion.
Smart servos (controlled very differently than RC servos) provide position feedback.
Well, I actually need the motor to pan the sensor I will attach on, and when a certain condition is met, the motor will stop panning the sensor. So I need to find the angle of that.
Is it possible to use a rotary encoder for this?
If you are panning the servo, you should know what the last angle you sent was when you received the signal, and simply use that.
If you really wanted, you could add an external potentiometer, but that’s not really needed because the servo has one already.
Sorry I am slightly confused now. I have never programmed servos before, still learning.
Pretty much what I want to do is build a simple collision avoidance system. The way this works is a sensor is attached to the pan and tilt kit, and the kit pans the sensor and the sensor collects all the values. When the sensor collects a certain value, the robot needs to turn to the angle of the sensor and follow that direction. So pretty much, the whole time the sensor is panning, and when it finds that distance, the servo needs to somehow report its angle.
So, all I need to know is what I need to do the find the angle the servo has panned the sensor at, and to do that I am not sure whether I can extract the information from the servo itself, or whether I need to use some sort of sensor to extract that information.
When you assign a servo to a specific position, you can normally assume that the servo will go to that position. If you say move to position 45 degrees with zero delay, you can assume the delay will be a fraction of a second and that the servo will have moved to 45 degrees. If you are slowly panning the servo, you are incrementing its position (to known angles). As such, you can store the last angle to which you assigned it in memory and as soon as your sensor gets a hit, retrieve this angle. You don’t need a secondary sensor to tell you the last angle.