Data Sheet

UCTRONICS Ultimate Starter Leaning Kit for Raspberry Pi #K0064
119 www.uctronics.com
8.23 Project 23: How to control a servo
8.23. 1 Overview
In this lesson, we will introduce a new electronic device (Servo) to you, and tell you how to
control it with Raspberry Pi.
8.23.2 Requirement
Raspberry Pi ×1
Servo ×1
Breadboard ×1
Several Jumper wires
8.23.3 Principle
1. What
s Servo ?
Please refer to chapter 3.8 SG90 micro small servo motor
2. Working principle
Raspberry Pi sends PWM signal to servo motor, and then this signal is processed by IC on
circuit board to calculate rotation direction to drive motor, and then this driving power is
transferred to swing arm by reduction gear.
At the same time, position detector returns location signal to judge whether set location is
reached or not.
The relationship between the rotation angle of the servo and pulse width as shown below: