Building a Marble Pixel Machine: The Hardest Project I’ve Ever Done (And Why It Was Totally Worth It)

How do you turn 7,000 marbles into a working pixel display? That was the question that kicked off what turned out to be the hardest engineering project I’ve ever attempted — a fully automated machine that arranges marbles into 32x32 pixel images.

The Idea

It all started with a 10x10 grid of marbles arranged into a smiley face. I loved the aesthetic, but the resolution was… not great. So I thought, why not scale up to a 32x32 grid? That’s 1,024 marbles. Of course, manually placing each one was out of the question — which meant one thing: time to build a machine.

 

The Plan

To bring this idea to life, the machine would need:

  • A massive marble screen

  • A lifting mechanism to bring marbles to the top

  • An automatic distributor for exact colors and quantities

  • A dumping mechanism for used marbles

  • A color-based sorting system to recycle and reuse them

Let’s just say, it got complicated fast.

 

 

Phase 1: Marble Sorting

The core of the sorting system is a color sensor that reads RGB values and identifies marble colors using Euclidean color distance. I started with a setup that paused each marble in front of the sensor — more accurate than trying to detect color on the fly.

Initially, I tried DC motors and multiple sorting paddles, but that would've meant 14 motors and controllers for two sorting systems. No thanks. I pivoted to a single servo-based sorting mechanism — just one wire to control, fast enough (two marbles per second), and far easier to manage.

 

Phase 2: Marble Hoppers

Next, I needed a way to store and dispense marbles by color. My first paddle wheel design jammed constantly. Enter the Archimedes screw: not only did it dispense marbles reliably, but it also acted as a built-in agitator to prevent jams. Win-win.

Each hopper feeds marbles up a tube using a switch-based feedback system to count the correct number. Sure, it means pushing a whole column of marbles up a tube, but that visual payoff? Totally worth it.

 

 

 

 

 

Phase 3: Lifting and Routing

 

To return marbles from the bottom of the machine to the top, I toyed with vertical Archimedes screws — but gravity didn’t cooperate. I ended up designing a conveyor lift with a clever twist: instead of dropping marbles off the back, they fall through the center of the sprocket and into a chute. It’s compact, elegant, and it works.

Phase 4: Assembly and Failures

The entire machine had to be carefully 3D printed, laser cut, and assembled. Of course, nothing worked the first time. Tolerances were off by fractions of a millimeter. I had to rebuild and reprint countless components. There were moments where I thought the whole thing might collapse under its own complexity.

But I kept pushing.

The Distribution System

Maybe my favorite part: a dual-slider ramp inspired by IDEX 3D printers. Using constant-force springs, the sliders guide marbles into the exact right columns. Watching it work is super satisfying — until I realized my slider rails were off by 1mm, causing jams. Cue another full rebuild.

 

The Control System

At the heart of it all are five ESP32 microcontrollers — managing the hoppers, sorting systems, and sliders — all coordinated by a master controller that turns images into mechanical instructions. Everything speaks over ESP-NOW for fast, wireless communication.

 

The Final Test

Once everything was connected, filled with marbles, and wired up, I loaded in a test image. My heart was pounding — so many things had to go right. And when I hit send… well, it didn’t work perfectly, but it worked. Some tweaks to the code later, and suddenly I was watching the machine create pixel art out of marbles. It was glorious.

 

Here is the full video of the build process:

 

Takeaways

This project kicked my butt. It tested everything I know about mechanical design, electronics, and perseverance. But watching 7,000 marbles dance into place to form an image — and knowing it all works — is one of the most rewarding engineering moments of my life.

Huge shoutout to Avnet for sponsoring the project. Their team of technical experts and massive catalog of components made the planning and prototyping way easier.

Final Thoughts

If you’re an engineer or maker with a crazy idea, my advice is: go for it. You’ll lose some marbles along the way (literally and figuratively), but the learning and satisfaction are unmatched.

Until next time — stay creative, stay curious, and keep making.