Gates
A servo gate at the top sends each marble down track A or B. Follow a route pattern, change it from the Serial Monitor, and make a pattern the machine starts with.
Open it in the simulatorA 28BYJ-48 lift stepped from its coil table, a servo gate that routes, a debounced marble counter, a WS2812 count bar and a jam alarm, for a machine that runs forever.
0 of 6 done
6 lessons in 3 chapters, about 6 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.
A servo gate at the top sends each marble down track A or B. Follow a route pattern, change it from the Serial Monitor, and make a pattern the machine starts with.
Open it in the simulatorEight WS2812 LEDs on one wire: a bar that fills with each marble in the color of its track. Read the strip, fill it faster, and keep the current in check.
Open it in the simulatorRun the machine for real: the lift on, marbles round and round, stats as it goes. Then add a lap of honor every ten marbles and a count for each track.
Open it in the simulatorEach lesson opens when the one before it is done, and each chapter ends in a project.
The stepper’s steps, speed and stall, and a gate that follows a pattern.
A 28BYJ-48 stepper turns a screw that lifts a marble a turn. Move it by steps, work out 2048 steps a turn, time the steps from rpm, stall it by asking too much, and ramp it up to beat the stall.
0 of 6 steps
A servo gate at the top sends each marble down track A or B. Follow a route pattern, change it from the Serial Monitor, and make a pattern the machine starts with.
0 of 4 steps
Every marble counted once, on an interrupt, and shown on the strip.
A marble crosses the beam in a few milliseconds. Count on an interrupt so none is missed, debounce a wobbling marble, break the debounce to see why it matters, and read the rate.
0 of 5 steps
Eight WS2812 LEDs on one wire: a bar that fills with each marble in the color of its track. Read the strip, fill it faster, and keep the current in check.
0 of 4 steps
A jam alarm tied to the lift’s speed, then the endless run.
A stepper never knows it is stuck. The counter does: no marble for a turn and a half means a jam. Catch one, see it in red, clear it, and tie the timeout to the lift’s speed.
0 of 5 steps
Run the machine for real: the lift on, marbles round and round, stats as it goes. Then add a lap of honor every ten marbles and a count for each track.
0 of 4 steps
All 6 lessons, in order, each with what it covers. Any of them opens in the editor right away.
Build a marble machine is part of the maker track, a ladder of courses from zero to expert.
Learn why the Moon has phases, work them out from any date, and build a lamp that shows tonight's Moon in the dark.
Open the next courseFollow 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 trackEvery lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.
Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kitYes. All 6 lessons of Build a marble machine are free and run in your browser, with nothing to install and no parts to buy before you start.
No. Every lesson runs on a simulated Arduino Uno R3 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.
About 6 hours: 6 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.
Each chapter ends in a project that puts it together: Gates, Light effects and Project: an endless run.
With "A lift", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.