Servo-Controlled Robot Arm
A three-joint arm you steer with knobs — base, elbow and gripper.
What You'll Build
You will build a small robot arm with three moving joints, each controlled by turning a knob. Twist the first knob and the base rotates, the second lifts the arm, the third opens and closes the gripper. Once it works you can record a sequence of positions and let the arm repeat the movement by itself.
What You Need
- ✓Arduino Uno
- ✓3 × SG90 servo
- ✓3 × potentiometer
- ✓External 5V supply
- ✓Breadboard
How It Works
A servo is a motor that knows its own angle. You tell it 'go to 90 degrees' and it gets there and holds. Each potentiometer gives the Arduino a number from 0 to 1023 as you turn it, and the map() function converts that range into an angle from 0 to 180. Read, map, write — repeated many times a second, that feels like smooth remote control.
Before You Wire It
Ask a parent, teacher, or trusted adult before building, powering a circuit, using tools or batteries, or buying parts. Purchases are optional and at your own cost. If anything gets hot, smells burnt, leaks, swells, sparks, or moves unexpectedly, switch off or disconnect power without touching the damaged or hot part, then tell an adult. Read safety rules
Wiring
- 1Servo signals → pins 9, 10, 11.
- 2Power the three SG90 servos from an appropriate regulated 5V supply rather than the Arduino 5V pin. Ask an adult to choose a protected, regulated supply rated for the combined servo current; never connect an unknown battery or charger directly.
- 3Connect the external supply GND to Arduino GND.
- 4Potentiometer outer legs to 5V and GND, middle legs to A0, A1, A2.
Step-by-Step Instructions
- 1
Assemble the joints
Build from the bottom up: base servo, then shoulder, then the gripper. Centre every servo at 90° before you screw its horn on, or the arm will hit its own limits.
- 2
Power the servos properly
Servo current varies with model and load and rises sharply during a stall. Ask an adult to check the servo datasheet and choose a regulated 5 V supply with enough current for all three. Run servo grounds to that supply and join supply GND to Arduino GND. Disconnect power before rewiring. If a servo buzzes hard, stalls, pinches, or gets hot, cut power immediately and let it cool before touching it.
- 3
Wire the knobs
Each potentiometer is a voltage divider you can turn. The middle pin carries the changing voltage to an analog input.
- 4
Add smoothing
Raw analog readings jitter slightly, which makes servos buzz. Average a few readings or ignore changes smaller than two degrees.
- 5
Record a routine
Once you enjoy driving it manually, store a list of angles in arrays and play them back to automate a pick-and-place move.
Arduino Code
#include <Servo.h>
Servo base, elbow, grip;
int smooth(int pin) {
long total = 0;
for (int i = 0; i < 8; i++) total += analogRead(pin);
return total / 8;
}
void setup() {
base.attach(9);
elbow.attach(10);
grip.attach(11);
}
void loop() {
base.write(map(smooth(A0), 0, 1023, 0, 180));
elbow.write(map(smooth(A1), 0, 1023, 15, 165));
grip.write(map(smooth(A2), 0, 1023, 30, 110));
delay(15);
}Understanding the Code
int smooth(int pin)Reads the knob eight times and averages the result, which removes most of the jitter.
map(value, 0, 1023, 0, 180)Stretches one range onto another. Knob all the way left becomes 0°, all the way right becomes 180°.
elbow.write(map(..., 15, 165))Limits the elbow to a safe range so the arm cannot bend into itself.
delay(15)About 60 updates per second — smooth to the eye, gentle on the servos.
Challenges & Upgrades
Troubleshooting
😖 Servos twitch constantly
Fix: Add the averaging function and give the servos their own power supply.
😖 Arm collapses under its own weight
Fix: SG90 servos are weak. Shorten the arm segments or move up to MG996R metal-gear servos.
Helpful Resources
Want extra help? Build a virtual circuit in Tinkercad or watch a video guide for this project. These are optional external resources.
Try it in Tinkercad
Open Tinkercad Circuits to recreate and test the circuit online before using real parts.
Open TinkercadWatch video guides
Browse video tutorials for this exact project and compare how each part is connected.
Find videosOutside examples may use different pins or parts. Follow this page’s wiring and safety instructions if they do not match. Ask a trusted adult before following an outside guide or buying anything; external parts, advice, and costs are your responsibility.
Up next
🚨 Temperature Alarm