Projects / Potentiometer puppet

Potentiometer puppet

Turn a knob to move a cardboard puppet's arm through a small servo.

Beginner45 minGuided buildReviewed

Build it step by step

0 of 8 done
  1. UNO

    Wire the potentiometer

    Outer legs to 5V and GND, middle to A0.

  2. UNO59°

    Wire the servo

    Brown to GND, red to 5V, orange to D9.

  3. UNO59°

    Upload the sketch

    The servo moves to the middle.

  4. UNO

    Open the serial monitor at 9600

    Raw values and angles scroll.

  5. UNO59°

    Turn the knob

    The servo follows smoothly.

  6. UNO

    Change 0.15 to 0.4

    Motion gets quicker and less smooth.

  7. UNO

    Fix the horn

    Attach it at 90 degrees so the arm is level.

  8. UNO

    Add the cardboard puppet

    Tape the arm to the horn.

In short

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

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Potentiometer outer legsUno 5V and GNDMakes a 0 to 5 V divider
Potentiometer middle legUno A0Analog input
Servo brown or black wireUno GNDGround
Servo red wireUno 5VFine for one small 9 g servo on USB
Servo orange or yellow wireUno D9Control 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.

CheckExpected
Knob fully leftServo near 0 degrees
Knob in the middleServo near 90 degrees
Knob fully rightServo near 180 degrees
Turn quicklyServo follows with a short lag
Leave the knob stillServo 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 →

Ask Lark AI

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.