Arduino Flip Segment Display with 7 Servo Motors

Arduino Flip Segment Display with 7 Servo Motors | Kids Robotics Project | MakeMindz
MakeMindz

Arduino Flip Number Display with 7 Servo Motors

With an Arduino and seven tiny servo motors, we built a mechanical display that flips its segments to create numbers. That’s engineering in motion!

  • Level: Beginner+
  • Time: about 2 hours
  • Ages 10+ (with an adult helper)

What are we building?

Look at a digital clock. Every number is made of seven bars called segments. Our project uses seven wooden segments, each mounted on a blue micro servo motor. When the Arduino says “show 5”, the right servos flip their segments up and the others stay down. Change the number and the segments rapidly flip into a new shape!

Try it: tap a number to see which segments flip up.

Pick a number!

What you need

PartHow many
Arduino Uno (or Nano)1
SG90 micro servo motor (blue)7
5V 2A power supply (USB adapter or battery pack)1
470 µF capacitor1
Breadboard and jumper wires1 set
Wooden craft sticks or thin plywood strips (about 6 cm × 1 cm)7
Cardboard or foam board for the base1 sheet
Hot glue gun, double-sided tape, paintas needed
Safety first: Ask a grown-up to help with the hot glue gun. Keep fingers away from moving segments when the power is on.

How it works

A servo motor turns its arm to an angle we choose, from 0° to 180°. We attach a wooden segment to each arm. At 0° the segment lies flat and hidden. At 90° it stands up and is visible. The Arduino has a list that tells it which segments to raise for each number. Seven servos, seven segments, ten digits!

Circuit diagram

Each servo has three wires. Brown is ground, red is power and orange is the signal.

Arduino Uno D2D3D4D5D6D7D8 Servo a (top)Servo b (top right)Servo c (low right)Servo d (bottom)Servo e (low left)Servo f (top left)Servo g (middle) +5V supply GND (supply minus joined to Arduino GND) orange = signal

Pin table

SegmentArduino pinServo wire
a (top)D2Orange
b (top right)D3Orange
c (bottom right)D4Orange
d (bottom)D5Orange
e (bottom left)D6Orange
f (top left)D7Orange
g (middle)D8Orange
All servos5V supply (red), GND (brown)Red and brown
Important: Seven servos pull too much current for the Arduino’s own 5V pin. Power them from a separate 5V 2A supply, and join its ground (GND) to the Arduino’s GND. Place the 470 µF capacitor across the supply’s + and − rails to smooth out jumps.

Step-by-step instructions

  1. Make the segments

    Cut or pick seven wooden sticks. Paint them in your favourite colour so they are easy to see. Let the paint dry fully.

  2. Mount the servos

    Arrange seven servos on the base in the shape of the number 8: three flat (top, middle, bottom) and four upright (the sides). Fix them with hot glue or double-sided tape. Glue one stick to each servo arm using the small horn that comes in the servo packet.

  3. Wire the circuit

    Follow the diagram. Connect each orange signal wire to its Arduino pin (D2 to D8). Join all red wires to the +5V supply and all brown wires to GND. Connect supply GND to Arduino GND. Double-check before switching on!

  4. Upload the code

    Open the Arduino IDE, paste the code below, choose your board and port, then click Upload.

  5. Calibrate and play

    If a segment does not lie flat or stand straight, change its two angle numbers in the code (see the tips below) and upload again. Watch your display count from 0 to 9!

Arduino code

This code uses the built-in Servo library, so there is nothing extra to install.

#include <Servo.h>

Servo seg[7];                       // a, b, c, d, e, f, g
const int pins[7] = {2, 3, 4, 5, 6, 7, 8};

// Change these if a segment is not straight
int offAngle[7] = {0, 0, 0, 0, 0, 0, 0};       // lying flat
int onAngle[7]  = {90, 90, 90, 90, 90, 90, 90}; // standing up

// 1 = segment up, order: a b c d e f g
const byte digits[10][7] = {
  {1,1,1,1,1,1,0},  // 0
  {0,1,1,0,0,0,0},  // 1
  {1,1,0,1,1,0,1},  // 2
  {1,1,1,1,0,0,1},  // 3
  {0,1,1,0,0,1,1},  // 4
  {1,0,1,1,0,1,1},  // 5
  {1,0,1,1,1,1,1},  // 6
  {1,1,1,0,0,0,0},  // 7
  {1,1,1,1,1,1,1},  // 8
  {1,1,1,1,0,1,1}   // 9
};

void showDigit(int n) {
  for (int i = 0; i < 7; i++) {
    seg[i].write(digits[n][i] ? onAngle[i] : offAngle[i]);
    delay(30);                      // small gap so the servos don't all start at once
  }
}

void setup() {
  for (int i = 0; i < 7; i++) {
    seg[i].attach(pins[i]);
    seg[i].write(offAngle[i]);      // start with every segment flat
  }
  delay(1000);
}

void loop() {
  for (int n = 0; n <= 9; n++) {
    showDigit(n);
    delay(1500);                    // show each number for 1.5 seconds
  }
}

Tips and troubleshooting

A servo is buzzing or shaking

Its angle is pushing against the base. Change onAngle or offAngle for that servo by 5° to 10°.

The Arduino keeps restarting

The servos are taking power from the Arduino. Use the separate 5V supply and add the capacitor.

Nothing moves

Check that the grounds are joined together and that the orange wires are on the right pins.

The numbers look wrong

A segment may be on the wrong pin. Compare your wiring with the pin table.

What did we learn?

  • Servo motors turn to exact angles.
  • Arrays store lists, like our table of ten digits.
  • Loops repeat jobs, like moving seven servos one by one.
  • Calibration means testing and adjusting, just like real engineers do.

Try these challenges

  • Add a button that counts up each time you press it.
  • Make two displays side by side to show numbers up to 99.
  • Add a real-time clock module to build a flip clock.

Questions kids ask

Can I use a different servo?

Yes. Any small hobby servo works, but bigger ones need a stronger power supply.

Why seven segments?

Seven bars are the smallest number of pieces that can draw all ten digits, 0 to 9.

Can it show letters too?

Some, like A, b, C, E, F and H. Add new rows to the table and try!

That’s engineering in motion! Built something cool? Share it with us.

Follow MakeMindz for more kids robotics and maker projects.

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
★★★★★ Young inventors love it!
🖨️
3D Print
All parts
⚡
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 ₹300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
★★★★★ Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 ₹200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course