Download presentation
Presentation is loading. Please wait.
Published byAmberlynn Simon Modified over 9 years ago
1
1 Servo Motor
2
2 Overview A servo motor is a motor that is only capable of rotating 180 degrees A servo motor is controlled by giving it an angle to proceed to, between 0 and 180, as apposed to a speed or direction It has high torque but low speed in comparison with a standard DC motor
3
3 What is a servo motor Servo motors are constructed out of basic DC motors, by adding: 1.gear reduction 2.a position sensor for the motor shaft location 3.an electronic circuit that controls the motor's operation
4
4 Feed-back loop A servo motor is a closed-loop system It will continuously attempt to reach the exact angle prescribed The motor is constantly taking note of its location and deciding how to best reach its target angle Open- loop Closed- loop
5
5 Wiring A servo connects to a microcontroller using three wires Power (5V) Ground Control
6
6 The control wire communicates the desired angle The angle is determined by the duration of the pulse applied to the control wire A 1.5 millisecond pulse will make the motor turn to the 90 degree position A pulse shorter than 1.5 ms will cause the motor to turn closer to 0°. Longer than 1.5ms and the shaft will turn closer to 180°
7
7 Coding The servo can be controlled with only four lines of code Line 1- is used to include the servo library into the code Line 2- is used to name the servo Line 3- indicates which pin the control wire of the named servo is connected to Line 4- is used to move the servo to a pre-determined angle #include Servo myservo; void setup() { myservo.attach('pin'); } void loop() { myservo.write('angle'); } 1- 2- 3- 4-
8
8 Servo Summary Control angle, NOT speed High torque, i.e. strong Only 180 degrees of rotation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.