Magic Multi-Color LED

Magic Multi-Color LED Scanner: Easy Robotics Project for Kids

Home › Kids Robotics Projects › Magic LED Scanner

STEM electronics for ages 8+ with a grown-up helper

Magic Multi-Color LED Scanner: Build a Robot Light Array

Make a row of glowing LED columns that races back and forth like the scanning eye on a robot car. You will build the circuit with two chips, then teach it new tricks with Arduino code.

  • Time: about 2 hours
  • Cost: about $5–8 (₹400–600)
  • Level: beginner
  • No coding needed for the first build

Try the magic scanner right here

This is a live copy of the circuit you will build. Turn the speed knob (R2) and watch the lights change.

Light pattern
Power

What will you learn?

Oscillators

The 555 chip is a tiny heartbeat. It sends one pulse again and again, like a drummer keeping time.

Counters

The 4017 chip counts pulses on its fingers, from 0 to 9, and lights one output for each number.

Robot lights

Real robots use light patterns to show what they are thinking: scanning, turning, or low on battery.

Code

In the level-up mission an Arduino does the job of both chips, and you can change the pattern with a few lines.

Parts list

Everything is cheap and easy to find at an electronics shop or online. Buy a few spare LEDs, because bent legs happen.

PartHow manyIts job
NE555 timer chip (8 legs)1Makes the steady pulses, the heartbeat
CD4017 counter chip (16 legs)1Counts pulses and lights one output at a time
50 kΩ trimmer knob (marked 503)1Speed control
1 kΩ resistor (brown, black, red)1Keeps the knob safe at its lowest setting
10 µF electrolytic capacitor1Sets the beat together with the knob. The long leg is plus (+).
10 nF ceramic capacitor (marked 103)1Keeps the 555 steady
220 Ω resistors (red, red, brown)10One per column, so LEDs do not burn out
LEDs, 3 mm or 5 mm, mixed colors22 + sparesThe magic lights. Red, orange, yellow, green, blue, white.
4 × AA battery holder with switch (6 V)1Power
Breadboard and jumper wires1 setBuild with no soldering first
Multi-color rule

Put the same color in every LED of one column. Different colors need different amounts of push to glow, so mixing colors inside one column makes one LED hog the power.

How the magic works

Think of the 555 as a drummer and the 4017 as a robot with ten lamps. Every drum beat, the robot moves its one “on” signal to the next lamp. After lamp 10 it jumps back to lamp 1. Because only one column is on at a time and the beats are fast, your eyes see a light running along the row.

The speed of the drummer is set by the knob. The beat rate in hertz (beats per second) is f = 1.44 ÷ ((R1 + 2 × R2) × C1). With R1 = 1 kΩ, C1 = 10 µF and the knob at 20 kΩ, that is about 3.5 beats a second.

Which leg is which? The 4017 output map

Lamp (column)12345678910
Output nameQ0Q1Q2Q3Q4Q5Q6Q7Q8Q9
CD4017 pin324710156911

The pins are not in numeric order. Count them carefully, or the light will jump around instead of running smoothly.

The circuit diagram

Circuit diagram of the Magic LED ScannerAn NE555 timer sends pulses to a CD4017 counter. Each of the ten counter outputs lights one column of LEDs through a 220 ohm resistor.+6V from the 4 AA batteriesGND (0V, the minus side)NE555the heartbeat487621510nFR1 1kΩR2 50kΩ(the speed knob)C1 10µF+pulsesCD4017 · the counter14 CLK13 CE15 RST168220ΩLED columnsQ0 · pin 3column 1Q1 · pin 2column 2Q2 · pin 4column 3Q3 · pin 7column 4Q4 · pin 10column 5Q5 · pin 1column 6Q6 · pin 5column 7Q7 · pin 6column 8Q8 · pin 9column 9Q9 · pin 11column 10
Follow the heartbeat: 555 pin 3 → 4017 pin 14. Each of the ten outputs goes through a 220 Ω resistor to one LED column, and every column returns to ground. Dots show wires that join.

Wire-by-wire cheat sheet

NE555 (heartbeat)

  • Pin 1 → GND
  • Pins 4 and 8 → +6 V
  • R1 (1 kΩ) from +6 V to pin 7
  • Knob R2 from pin 7 to pin 6
  • Pin 2 joined to pin 6
  • C1 (10 µF) from pin 6 to GND, long leg on pin 6
  • 10 nF from pin 5 to GND
  • Pin 3 → 4017 pin 14

CD4017 (counter)

  • Pin 16 → +6 V
  • Pin 8 → GND
  • Pin 13 → GND
  • Pin 15 → GND
  • Pin 14 ← 555 pin 3
  • Pins 3, 2, 4, 7, 10, 1, 5, 6, 9, 11 → one 220 Ω resistor each, then to columns 1 to 10

LED columns

  • Long leg (+) toward the resistor
  • Short leg (−) to GND
  • Up to 3 LEDs side by side in a column
  • Same color inside a column
  • Try heights 1, 2, 2, 3, 3, 3, 3, 2, 2, 1 for a pyramid shape

Build it step by step

Grown-up helper time

Ask an adult to help with soldering irons, cutting wires and the battery. Never connect the battery to anything that is not on the diagram. If a chip or wire feels hot, switch off and unplug the batteries.

  1. Sort your parts

    Lay everything on a tray. Look for the little notch or dot on each chip. The notch end marks the top, and the legs count counter-clockwise from the top-left leg as pin 1.

  2. Build the heartbeat (555)

    Push the 555 across the middle gap of the breadboard. Add the wires and parts from the 555 card above. Use the middle leg and one outer leg of the trimmer knob.

    Mini test: put an LED and a 220 Ω resistor on pin 3. When you switch on, it should blink. Turn the knob to change the blink speed. Then remove the test LED.

  3. Add the counter (4017)

    Place the 4017 on the breadboard and connect pins 16, 8, 13 and 15 as shown. Then run a wire from 555 pin 3 to 4017 pin 14.

  4. Make your LED columns

    • Pick a color for each column. A rainbow order is fun: red, orange, yellow, green, teal, blue, indigo, purple, pink, white.
    • Place LEDs side by side with all long legs joined and all short legs joined.
    • Make ten columns and label them 1 to 10 with tape.
  5. Connect the ten outputs

    Follow the output map: column 1 to pin 3, column 2 to pin 2, column 3 to pin 4, column 4 to pin 7, column 5 to pin 10, column 6 to pin 1, column 7 to pin 5, column 8 to pin 6, column 9 to pin 9, column 10 to pin 11. Put a 220 Ω resistor in every one of those wires. Join all short legs to GND.

  6. Switch on and tune

    Insert the batteries and flip the switch. One column should glow and the glow should run across the row. Turn the knob until the speed looks like a robot scanner.

  7. Make it permanent (optional)

    With an adult, solder the same circuit on stripboard. Use IC sockets so chips can be swapped. Heat the joint for two seconds, add solder, and let it cool without moving it. Fancy “dead-bug” builds wire the legs straight to each other, but stripboard is easier to fix.

  8. Put it on a robot

    Tape or glue the array to the front of a toy car, cardboard robot or your robot chassis. The running light becomes the robot’s scanning eye.

Fix-it table

What you seeTry this
Nothing lights upCheck batteries, the switch and that the 555 and 4017 both have power on their top pins (8 and 16). Check LED direction.
Lights do not moveCheck the wire from 555 pin 3 to 4017 pin 14. Test the 555 with the blinking mini test.
Lights jump aroundYou mixed up the output pins. Use the output map: 3, 2, 4, 7, 10, 1, 5, 6, 9, 11.
Only some columns glowLook for a missing resistor wire or an LED turned the wrong way.
Too fast to seeTurn the knob toward 50 kΩ or use a bigger C1, such as 22 µF.
Very dimSwap the 220 Ω resistors for 150 Ω. Do not go lower than 100 Ω.

Level up: robot brain code

Swap the two chips for an Arduino Uno or Nano. The code below makes the light bounce from one end to the other, and a knob on A0 controls the speed.

  • LED columns on pins D2 to D11
  • Each through a 330 Ω resistor
  • Knob middle leg on A0
  • At most 2 LEDs per column
magic_led_scanner.ino
// Magic Multi-Color LED Scanner  (Arduino Uno / Nano)
const byte ledPins[10] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
const int speedKnob = A0;

int position = 0;   // which column is lit
int direction = 1;  // +1 = going right, -1 = going left

void setup() {
  for (byte i = 0; i < 10; i++) {
    pinMode(ledPins[i], OUTPUT);
  }
}

void loop() {
  int waitTime = map(analogRead(speedKnob), 0, 1023, 30, 300);

  for (byte i = 0; i < 10; i++) {
    digitalWrite(ledPins[i], i == position ? HIGH : LOW);
  }
  delay(waitTime);

  position += direction;
  if (position >= 9 || position <= 0) {
    direction = -direction;   // bounce at the ends
  }
}

Mission: add a new pattern

Mirror mode lights two columns that rush toward the middle, like robot eyes closing. Add this function and call it from loop() in place of the bounce code.

mirror_pattern.ino
void showMirror(byte step) {            // step goes 0 to 4
  for (byte i = 0; i < 10; i++) digitalWrite(ledPins[i], LOW);
  digitalWrite(ledPins[step], HIGH);        // left light
  digitalWrite(ledPins[9 - step], HIGH);    // right light
}

// In loop(): go in, then out
// for (byte s = 0; s <= 4; s++) { showMirror(s); delay(120); }
// for (byte s = 3; s > 0; s--)  { showMirror(s); delay(120); }
More challenges

Make the scanner speed up when a button is pressed. Light all columns when a distance sensor sees a wall. Use a rainbow of colors to show the robot’s battery level.

Where robots use this idea

Scanner eyes

A moving light on a robot face shows it is searching for something.

Turn signals

A running light that sweeps left or right tells people where a robot is going next.

Status bar

Show “thinking” with a slow sweep and “done” with all columns on.

Light show

Mount it on a model car and drive it in a dark room for a night-patrol show.

Questions kids and parents ask

Can I build this without soldering?

Yes. A breadboard and jumper wires let you build the whole circuit by pushing parts into holes. Solder only when you want a permanent version.

Why use a resistor with every LED column?

An LED has almost no resistance by itself, so too much current flows and it can burn out or damage the chip. A 220 Ω resistor limits the current to a safe amount.

Can I use just one color of LED?

Yes. Blue or white LEDs look great, and the circuit works the same. Multi-color just makes it more magical.

What if I want the light to bounce without an Arduino?

Use the Arduino mission, or add 1N4148 diodes so the later outputs share earlier columns. The Arduino route is easier to learn from.

What age is this project for?

Ages 8 and up with an adult helper. Younger children can enjoy the simulator and the finished lights.

Idea inspired by popular “Knight Rider” style LED chaser builds from the maker community. This page is an original step-by-step guide with its own diagrams and code.

Safety: use batteries only, never mains power, and always get adult help with soldering.

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