Presentation is loading. Please wait.

Presentation is loading. Please wait.

Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw.

Similar presentations


Presentation on theme: "Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw."— Presentation transcript:

1 Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw

2 RC servo motors will use for obtain accurate positions such as “shaft moving to 90 degrees or 25 degrees and stop” Two types of Servo Motor -Position controlled servos -Continuous rotation servos Why Servo Motor Choose?

3 RC servo motors contain DC motor, gearbox, feedback device (potentiometer), servo control unit and drive circuit.

4 RC servos can command by giving PWM pulses to control wire. This PWM pulse should have repetitive 20 ms period (50 Hz) pulse with duty cycle variation of 1 ms to 2 ms (some requires range of 0.5 ms to 2.5 ms). The minimum pulse (1 ms duty cycle) will give the minimum servo position (0 degrees – this can be change to 180 degrees by altering coding) and neutral average pulse (1.5 ms) will give the neutral servo position (90 degrees) and finally maximum pulse (2 ms) gives maximum servo position 180 degrees). So when pulse receives to the control unit it changes the appropriate servo position according to the pulse and servo position will remain same until it receives another command from control unit.

5

6 Wire connection Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino board. The ground wire is typically black or brown and should be connected to a ground pin on the Arduino board. The signal pin is typically yellow, orange or white and should be connected to a digital pin on the Arduino board.

7 Sero-library-Arduino attach() write() writeMicroseconds()

8 Circuit Diagram for Arduino with servo

9 After constructing hardware, compile the code1 from handout then compile code 2

10 Assignment Write a program to rotate one direction and hold its position in 2s and rotate back previous direction.

11 1. http://en.wikipedia.org/wiki/Proximity_sensor. 2. http://profesores.fi-b.unam.mx/m3615m/datasheet-sen136b5b.pdf. 3.http://www.seeedstudio.com/wiki/Ultra_Sonic_range_measurement_ module. 4. http://arduino.cc. 5. \Arduino Programming Notebook" by - by Brian W. Evans. 6. Beginning Android ADK with Arduino by Mario Bohmer 7. http://arduino.cc/en/uploads/Main/arduino_Uno_Rev3-02-TH.zip. 8. http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3- schematic.pdf. 9. http://arduino.cc/en/Main/ArduinoBoardUno. 10. Computational Principles of Mobile Robotics by from Dudek and Jenkin. Reference


Download ppt "Servo Motor Control Using Arduino Instructor: Dr Matthew Khin Yi Kyaw."

Similar presentations


Ads by Google