part · Level 5 · Control · output
How an SG90 micro servo works
Micro servo (SG90) — A motor that turns exactly as far as you tell it.
What it is
A servo is a motor with a brain and a ruler built in. Inside the little blue box are a DC motor, a train of plastic gears, a potentiometer that measures where the output arm is, and a control circuit that compares that position with the one you asked for and drives the motor until they match. Ask for 90° and it goes to 90° and stays there, pushing back if you try to move it.
The SG90 is the smallest common hobby servo: about 9 grams, an arm that swings through roughly 180°, and enough torque to lift a few hundred grams on a short arm. It cannot spin round and round — it is a positioner, not a wheel.
Three wires: brown is −, red is + (4.8 to 6 V), and orange is the signal. The signal is the interesting one, and it needs a timer or a microcontroller to make — which is why this part arrives at the level where you meet the 555 and, soon after, code.
How it works
The servo listens for a pulse that repeats 50 times a second (every 20 ms). The length of each pulse is the command:
- about 1.0 ms high → arm at one end (call it 0°)
- about 1.5 ms high → middle (90°)
- about 2.0 ms high → the other end (180°)
Everything in between is proportional: 1.25 ms is roughly 45°. The control chip measures the pulse, reads the potentiometer, and spins the motor toward the match. That is a feedback loop — the same idea as a thermostat.
Power matters more than it looks. Idle, an SG90 sips a few milliamps; the moment it moves or pushes against something it can pull 250 mA or more in a spike. A 3×AA pack can supply that; the 5 V pin of a microcontroller often cannot, and the board resets when the servo twitches. Feed the servo's red wire from the battery pack directly and share only the − wire with the controller.
The numbers
| Supply | 4.8–6 V — 3×AA (4.5 V) works; 4×AA (6 V) is stronger |
|---|---|
| Signal | 50 Hz pulses, 1–2 ms wide — 1.5 ms ≈ centre |
| Travel | ≈ 180° — do not force it past the end stops |
| Torque | ≈ 1.8 kg·cm at 4.8 V — manufacturer figure; a few hundred grams on a 2 cm arm |
| Current | ≈ 10 mA idle, 250 mA+ moving/stalled — power it from the battery pack, not a logic pin |
Mistakes everyone makes
- Board resets when the servo moves. The servo's start-up spike drags the 5 V line down. Fix: separate power for the servo, common −.
- It buzzes and gets warm while "holding". Something is pushing on the arm, or you asked for an angle past its end stop. Fix: command 10°–170° instead of 0°–180°.
- Wrong wire order. Brown/black −, red +, orange/yellow signal. Reversing + and − can kill the control chip.
- Trying to use it as a wheel. An SG90 stops at its end stops; "continuous rotation" servos are a different part.
Questions people ask
- Can an SG90 servo run on 3 AA batteries?
- Yes — 4.5 V is inside its 4.8–6 V range once you allow for fresh cells, and the pack can supply the 250 mA it draws when moving. Four AAs (6 V) gives more torque.
- How do I control a servo without an Arduino?
- A 555 timer wired as an astable can make a 50 Hz pulse train whose width you set with a potentiometer — a knob that turns the arm. Code is easier, which is why servos really open up at Level 7.
- What is the difference between a servo and a DC motor?
- A DC motor spins freely as long as it has power. A servo has a motor, gears, a position sensor and a controller inside, so it goes to an angle you command and holds it.
Projects that use this part
No project uses it yet — it arrives at Level 5, and the projects for that level are still being written and verified.
verified against: SparkFun — Hobby Servo Tutorial · Adafruit — Servos (Arduino lesson 14) · Arduino docs — Servo library