Yahboom's SG90 is a small hobby servo that swings through 180 degrees and holds the angle your program asks for. It needs three connections — VCC, GND and a signal pin — and you set the position by feeding it a pulse signal, which makes it a drop-in part for steering a robot car, driving a sensor bracket or building a simple door mechanism.
Key Features
- 180-degree rotation range, holding position once it reaches the commanded angle
- Three-wire connection: VCC, GND and IO (signal)
- Angle set by a pulse signal from any board that can generate PWM
- Light and compact, so it suits small mechanisms and tight builds
- Widely supported — Yahboom publishes example code for six controller platforms
- Supplied as a single servo (Yahboom lists this variant as 1PCS)
Specifications
| Parameter | Value | Published in |
|---|---|---|
| Rotation range | 180 degrees | Yahboom product page |
| Control signal | Pulse signal (PWM), angle proportional to pulse width | Yahboom product page and example code |
| PWM frame rate | 50 Hz, about a 20 ms period | Yahboom Raspberry Pi Pico example |
| Pulse width for 0–180 degrees | Roughly 0.5 ms to 2.5 ms | Yahboom Pico and Arduino examples |
| Connections | VCC, GND, IO | Yahboom product page |
| Wire colours | Brown negative, red positive, yellow signal | Yahboom micro:bit tutorial |
| Supply in Yahboom's micro:bit lesson | VCC connected to 5 V | Yahboom micro:bit tutorial |
| Version | Blue plastic, 1PCS | Yahboom product page, variant name |
Yahboom does not publish numeric figures for torque, speed, weight, dimensions or a supply voltage range for this servo — the product page describes it in words only, as light, small and high torque. Check the manufacturer's product page and the documentation supplied with your unit if you need an exact figure before you commit to a mechanism.
Wiring and Signal
| Wire colour | Connection |
|---|---|
| Brown | Negative supply, GND |
| Red | Positive supply, VCC |
| Yellow | Signal, IO |
Yahboom's micro:bit lesson connects the servo's VCC to 5 V and puts the yellow signal wire on P2, so it is worth checking the pin you choose against the example you follow. Any pin that can produce a repeating pulse will drive the servo; the two example codes in Yahboom's repository use GP7 on a Raspberry Pi Pico and digital pin 9 on an Arduino.
Setting the Angle
The servo reads the width of a pulse rather than a voltage, so the angle comes from how long the signal line stays high. The two Yahboom examples map the range like this:
- Raspberry Pi Pico example: PWM at 50 Hz, with the duty cycle mapped from 0–180 degrees onto 500,000–2,500,000 ns, that is 0.5–2.5 ms.
- Arduino example: pulse width calculated as angle × 11 + 500 microseconds, which gives 500–2480 microseconds across the range. It accepts the digits 1 to 9 over the serial port and turns them into 20 to 180 degrees.
Both examples sit in the same order of magnitude, so treat 0.5–2.5 ms as the working pulse range and adjust the endpoints if your servo reaches its mechanical stop before the commanded angle.
Supported Platforms and Example Code
| Platform | What Yahboom provides |
|---|---|
| Arduino | Servo control tutorial with code; a second tutorial driving a servo alongside an ultrasonic sensor for obstacle avoidance |
| TI MSPM0G3507 | Two-degree-of-freedom gimbal tutorial and code |
| TI MSPM0G3519 | Two-degree-of-freedom gimbal tutorial and code |
| micro:bit | Electronic door project and an ultrasonic automatic-door project, with wiring diagrams and program files |
| Raspberry Pi Pico | PWM control tutorial and Python example |
| Raspberry Pi | Servo control example in C and two Python versions |
Which Version You Are Buying
Yahboom sells the same SG90 body in three versions and in one, two or four packs. This product is the blue plastic version, one piece. The other options are a black plastic HQ version and a black metal version, sold separately.
Package Contents
Yahboom publishes the packing list as a graphic on the official product page rather than as an itemised text list, so no written list is reproduced here. The variant you are buying is a single servo. Mounting hardware, servo horns and cables are not listed for this variant, so check the official page before ordering if your build depends on them.
Documentation and Resources
- Yahboom tutorial page, listed as 9G Servo
- Yahboom documentation repository with the tutorials and example code for all six platforms
FAQ
How far can it rotate?
180 degrees. It is a positional servo, so it drives to the angle you send and holds there rather than spinning continuously.
How do I connect it?
Three wires: brown to ground, red to the positive supply and yellow to a signal pin. Yahboom's micro:bit lesson connects VCC to 5 V and uses P2 for the signal.
How do I control the angle?
Send a repeating pulse on the signal wire. The pulse width sets the angle, with roughly 0.5 ms to 2.5 ms covering the full 0–180 degree range, refreshed at about 50 Hz.
What voltage does it need?
Yahboom's own micro:bit lesson connects the servo's VCC to 5 V. The product page does not state a supply voltage range, so confirm the figure against the datasheet supplied with your unit before using a different supply.
How much torque does it have?
Yahboom describes it as high torque but does not publish a numeric figure for this variant. If your mechanism depends on a torque value, ask OpenELAB or check the datasheet that ships with the servo.
Which boards can drive it?
Anything that can output a PWM pulse. Yahboom publishes example code for Arduino, TI MSPM0G3507 and MSPM0G3519, micro:bit, Raspberry Pi Pico and Raspberry Pi.
Is mounting hardware included?
The packing list is published as an image rather than text, and mounting hardware and servo horns are not listed for this variant. Check the official page or ask OpenELAB if you need to know before ordering.
Can I power it from the board's 5 V pin?
Yahboom's lesson does exactly that for a single servo. If you drive several servos at once, plan for the current they draw together rather than assuming one board supply will cover them all.