All paths

Build a pinball table

From two flipper buttons to a full table with a kicker, lights, sound and a saved high score, on a Mega.

Arduino Mega 2560Free5 lessons5 h3 chapters2,210 XPMaker · Expert+400 XP

0 of 5 done

Start the course freePinball: flippers that answerBuild it as a kitRetails for about $74, free on Mokxi.Lesson plan for teachers
What you will build

2 projects, built step by step

5 lessons in 3 chapters, about 5 hours on a simulated Arduino Mega 2560. Free, in your browser, every step checked by the simulator.

Chapter 1 project

Pinball: targets and a score

The table’s three standup targets and a four-digit TM1637. Count a hit once, however much the switch bounces, and reward the whole bank.

Open it in the simulator
Chapter 2 project

Pinball: lights and sound

Sixteen WS2812 lamps and a piezo. Run an attract-mode rainbow and play a tune at the same time, with nothing ever waiting.

Open it in the simulator
The map

Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

The playfield

Flippers that answer, and targets that score once per hit.

  1. Open330 XP

    Pinball: flippers that answer

    Two arcade buttons and the table’s two flipper servos on a Mega. Read a button with the chip’s own pull-up and move a flipper the moment it changes.

    0 of 5 steps

  2. ProjectLocked660 XP

    Pinball: targets and a score

    The table’s three standup targets and a four-digit TM1637. Count a hit once, however much the switch bounces, and reward the whole bank.

    0 of 5 steps

Chapter 2

Power and show

Fire a 12 V coil safely, then add lights and a tune that never wait.

  1. Locked280 XP

    Pinball: a bumper that kicks

    A pop bumper switch fires the table’s 12 V kicker coil through a logic-level MOSFET, with a diode across the coil. Big current from a small pin, safely.

    0 of 4 steps

  2. ProjectLocked560 XP

    Pinball: lights and sound

    Sixteen WS2812 lamps and a piezo. Run an attract-mode rainbow and play a tune at the same time, with nothing ever waiting.

    0 of 4 steps

Chapter 3

The game

Tie it all together in a state machine with a high score that survives a reset.

  1. Locked380 XP

    Pinball: the whole table

    Everything together in a state machine: attract, launch, play, drain, game over and high score entry, with the best score kept in EEPROM.

    0 of 6 steps

Syllabus

Every lesson in the course

All 5 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

The playfield

  1. Pinball: flippers that answerTwo arcade buttons and the table’s two flipper servos on a Mega. Read a button with the chip’s own pull-up and move a flipper the moment it changes.
  2. Pinball: targets and a scoreThe table’s three standup targets and a four-digit TM1637. Count a hit once, however much the switch bounces, and reward the whole bank.
Chapter 2

Power and show

  1. Pinball: a bumper that kicksA pop bumper switch fires the table’s 12 V kicker coil through a logic-level MOSFET, with a diode across the coil. Big current from a small pin, safely.
  2. Pinball: lights and soundSixteen WS2812 lamps and a piezo. Run an attract-mode rainbow and play a tune at the same time, with nothing ever waiting.
Chapter 3

The game

  1. Pinball: the whole tableEverything together in a state machine: attract, launch, play, drain, game over and high score entry, with the best score kept in EEPROM.
Keep going

The next course on your track

Build a pinball table is part of the maker track, a ladder of courses from zero to expert.

Next course

Build a backyard weather station

A solar weather station on an Uno: wind, rain, the air and UV, packed into 14 bytes over LoRa to a base station that prints the day.

Open the next course
Track

Maker track

Follow the starter kit you already own, then build a claw machine, a balance bot, a handheld console or an LED cube, each a short course checked by the simulator.

See every course on the track
Kits

Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

The kit for this course

Pinball Table Kit

A Mega, a table with servo flippers, targets, a solenoid kicker and a drain beam, lamps and a score display.

Open the kit
Have a kit already?

Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.

See every kit
Questions

About Build a pinball table

Is Build a pinball table free?

Yes. All 5 lessons of Build a pinball table are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Mega 2560?

No. Every lesson runs on a simulated Arduino Mega 2560 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does Build a pinball table take?

About 5 hours: 5 lessons in 3 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: Pinball: targets and a score and Pinball: lights and sound.

Where do I start?

With "Pinball: flippers that answer", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.