Using Servo Motors with Arduino
The aim of this project is to learn about servo motors and how to control them using Arduino microcontroller. Servo motors are a type of actuators that are very used in electromechanics, robotics and mechatronic applications because they are responsible for the moving part of these applications such as rotating a wheel, moving a mechanical arm etc. In our case we will see first how to configure and program a servo motor to rotate forwards and backwards, then we will add to this system a potentiometer that will allow us to control the servo motor. But now I will answer some basic questions that will help us to better understand this device.
- How a servo motor works ?
A servo motor uses pulse width modulation (pwm) to convert the signal coming to its output pin into a rotating movement. We will use the Arduino Servo library’s basic functions to apply this concept
- What is the difference between servo and DC motor ?
Unlike a DC motor that rotates continuously, a servo motor reacts to preset angle value between 0 and 180 degrees to move to it. That’s what makes it useful for robotics and mechatronic applications.
- What are the main applications of a servo motor ?
Because of its special concept of feedback loop that allows it to measure the position of its output shaft, a servo motor becomes widely used in different applications requiring precise position control such as using it to control a robotic arm to allow it to move to a precise angle, it used to control conveyor belts in production factories, we can also find servo motors in solar panels for solar tracking systems, printers, camera’s auto-focus option, antennas positioning and so many application varieties.
Circuit wiring :
Project parts :
The parts needed for this project are :
- 1 Arduino Uno
- 1 breadboard
- 1 Servo motor
- Multiple wire connectors to connect all the parts together
Servo pin configuration:
Servo motors have three wires: power, ground and signal. You can generally identify every one of them by their colors.
The power wire should be connected to the 5V pin of your Arduino, its color is red.
The ground wire should be connected to the GND pin on your Arduino, its color may be black or brown.
The signal wire is typically white, yellow or orange and should be connected to a PWM pin on your Arduino. You can identify a PWM pin by finding a ‘~’ sign next to it.
Wiring 1 :
The circuit wiring of the project is very simple. You connect the servo pins to the breadboard and Arduino as you see in the image below. Notice that you have to connect the signal wire to a pwm pin in Arduino. PWM pins are 3, 5, 6, 9, 10, 11.
The circuit wiring of the project is very simple. You connect the servo pins to the breadboard and Arduino as you see in the image below. Notice that you have to connect the signal wire to a pwm pin in Arduino. PWM pins are 3, 5, 6, 9, 10, 11.


Comments
Post a Comment