Potentiometer puppet
Turn a knob to move a cardboard puppet's arm through a small servo.
Build it step by step
0 of 8 doneWire the potentiometer
Outer legs to 5V and GND, middle to A0.
Wire the servo
Brown to GND, red to 5V, orange to D9.
Upload the sketch
The servo moves to the middle.
Open the serial monitor at 9600
Raw values and angles scroll.
Turn the knob
The servo follows smoothly.
Change 0.15 to 0.4
Motion gets quicker and less smooth.
Fix the horn
Attach it at 90 degrees so the arm is level.
Add the cardboard puppet
Tape the arm to the horn.
How do you build a potentiometer puppet?
Turn a knob to move a cardboard puppet's arm through a small servo. You need Arduino Uno R3, SG90 Micro Servo, Potentiometer 10 kΩ, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 8 steps and about 45 minutes.
- Level
- Beginner
- Time
- About 45 min
- Parts
- 5
Parts list
- Development BoardsBuyArduino Uno R3 × 1
- Motors & ActuatorsBuySG90 Micro Servo × 1
- PassivesBuy
- PrototypingBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| Potentiometer outer legs | Uno 5V and GND | Makes a 0 to 5 V divider |
| Potentiometer middle leg | Uno A0 | Analog input |
| Servo brown or black wire | Uno GND | Ground |
| Servo red wire | Uno 5V | Fine for one small 9 g servo on USB |
| Servo orange or yellow wire | Uno D9 | Control signal |
Code
analogRead gives 0 to 1023 and map() turns that into 0 to 180 degrees. Sending the target straight to the servo makes it jump, so the sketch moves a fraction of the remaining distance on every pass, a simple low-pass filter that gives smooth, puppet-like motion. A single small 9 g servo can run from the USB 5 V rail. For a larger servo or several servos, use a separate 5 V supply and join its ground to the Uno ground. Glue a cardboard arm to the servo horn once you have found the range that fits your puppet, and change the 0 and 180 in map() if the arm hits something.
Runs on a virtual Arduino Uno in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
#include <Servo.h>
Servo arm;
const uint8_t POT = A0;
const uint8_t SERVO_PIN = 9;
float smooth = 90; // starts in the middle
void setup() {
arm.attach(SERVO_PIN);
arm.write(90);
Serial.begin(9600);
}
void loop() {
int raw = analogRead(POT); // 0 to 1023
float target = map(raw, 0, 1023, 0, 180); // wanted angle
smooth += (target - smooth) * 0.15; // move 15 percent of the gap each step
arm.write((int)smooth);
Serial.print(raw); Serial.print(" -> "); Serial.println((int)smooth);
delay(15);
}What the serial monitor should show
Open the serial monitor at the baud rate in the code. This is what our simulator prints for a virtual Arduino Uno with its sensors at their default values. Your numbers will follow your real readings, but the format should match.
512 -> 90 513 -> 90 512 -> 90 513 -> 90 512 -> 90 511 -> 89
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Knob fully left | Servo near 0 degrees |
| Knob in the middle | Servo near 90 degrees |
| Knob fully right | Servo near 180 degrees |
| Turn quickly | Servo follows with a short lag |
| Leave the knob still | Servo stays quiet |
If it does not work
Servo jitters
Add a 100 uF capacitor across the servo supply, or use a separate supply.
Uno resets when the servo moves
Too much current from USB, use an external 5 V supply.
Servo does the opposite direction
Swap the two outer pot legs.
Servo hits the end stops and buzzes
Limit the map() range, for example 10 to 170.
Nothing moves
Check the servo signal wire is on D9.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the potentiometer puppet?
Arduino Uno R3, SG90 Micro Servo, Potentiometer 10 kΩ, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).
How long does the potentiometer puppet take to build?
About 45 minutes for a beginner maker, in 8 steps.
How do I know the potentiometer puppet works?
Knob fully left: Servo near 0 degrees. Knob in the middle: Servo near 90 degrees. Knob fully right: Servo near 180 degrees.
Servo jitters: what should I check?
Add a 100 uF capacitor across the servo supply, or use a separate supply.
Uno resets when the servo moves: what should I check?
Too much current from USB, use an external 5 V supply.
Servo does the opposite direction: what should I check?
Swap the two outer pot legs.
Servo hits the end stops and buzzes: what should I check?
Limit the map() range, for example 10 to 170.
