I am using servo motor for some positioning. Let's said I want the servo motor rotate to a specific angle like 23 degree, is it possible to achieve using Raspberry PI? Did I need some sort of encoder to do alignment?
1 Answer
Servo motors are controlled by pulse width modulation (PWM). Specifically, the angular position of the servo is determined by a specific pulse width. The angular position will be approximate and may even differ from servo to servo. The angular position may also be affected by torque.
Given this behavior, feedback is generally required for exact positioning (e.g., 23 degrees) of servo motors. Such feedback is quite often provided by a rotary encoder. You will need software to control the servo and have it go to a specific position as indicated by the rotary encoder. And yes, that is as complicated as it sounds.
An alternate solution is to use a stepper motor. Stepper motors are designed for digital positioning and can be used with or without rotary encoders depending on your precision needs, but you may need a sensor to establish home position. You may want to consider microstepping for highest positional accuracy.
-
Stepper motors cannot move to a specific angle -- their movement is in well defined angle increments. To move to a specific angle you need a sensor of some sort either to measure the current angle or to establish a well known starting point.– CraigJul 13, 2018 at 20:17
I am using servo motor for some positioning
.... you are already using the servo, so why do you not run a test to see if you can position it to a specific angle. ..... your question is like this oneI am driving my car. Can someone tell me if I can turn to the right?