Servo is a type of geared motor that can only rotate to specific degrees. Inside the servo there is a pretty simple set-up: a small DC motor, potentiometer and a control circuit. The motor is attached by gears to the control wheel. As the motor rotates, the potentiometer's resistance changes, so the control circuit can precisely regulate how much movement there is and in which direction. 

When the shaft of the motor is at the desired position, power supplied to the motor is stopped by the control circuit. If not, the motor is turned in the appropriate direction. The desired position is sent via electrical pulses through the signal wire. The motor's speed is proportional to the difference between its actual position and desired position. So if the motor is near the desired position, it will turn slowly, otherwise it will turn fast. This is called proportional control. This means the motor will only run as hard as necessary to accomplish the task at hand. It is controlled by sending electrical pulses from your Uno board. These pulses tell the servo what position it should move to. A servo has three wires, the brown wire is GND, the red one is VCC, and the orange one is signal line.


-1 Uno board
-1 USB data cable
-1 Servo
- Several jumper wires

Experimental Principle

Servo consists of shell, circuit board, non-core motor, gear and location detection. Our experiment principle is as follows: Uno board sends PWM signal to servo motor, and then this signal is processed by IC on circuit board to calculate rotation direction to drive the motor, and then this driving power is transferred to swing arm by reduction gear. At the same time, position detector returns the location signal to judge whether targeted location is reached or not.

Experimental Procedures

Step 1: Connect circuit as shown in Fig1. The corresponding schematic diagram is shown in Fig2. (Schematic is generated by EAGLE)
Step 2: Program the Arduino (download program from documents).
Step 3: Compile the program.
Step 4: Burn the program into Uno board.

Now, you can see the servo motor rotate 90 degrees (it will stop a little bit every 15 degrees). And then rotate in opposite direction.

circuit connection

Fig1: the servo motor connection

circuit schematic

Fig2: the schematic (servo motor has no symbol in eagle, so instead a headers were used, you can connect the servo to these headers and no need to swap any wire).

Experimental summary

In this lesson, you will enhance your ability to use PWM, this circuit is also considered as control circuit, learning more about servos will allow you to build your own robot or your own simple manufacturing machine, you may think about what is called stepper motor, but steppers lose there advantages in the favor of servos.


1-Arduino progrme (code)
2-Eagle file
3-Arduino Servo library