Build an ESP32-Controlled Automatic Dice Tower with Servo Tumbling and LED Effects
ESP32 DevKit Board
Continuous Rotation Hobby Servo
WS2812B Addressable LED Strip 1m
Momentary Push Button Panel Mount
5V 2A USB Power Supply
Logic Level MOSFET Module
3mm Plywood Sheet for Laser Cutting
M3 Heat-Set Threaded Inserts
Small Perfboard Protoboard
Dupont Jumper Wire Set
Prices and availability as of Nov 30, 12:55 AM ET and subject to change. The price shown on Amazon at the time of purchase applies.
A dice tower solves a real problem at the gaming table — dice rolled by hand on a cluttered table get nudged, caught against rulebooks, or rerolled by habit when someone doesn't trust the result. A tower with a mechanized tumbling stage removes the human variable entirely: dice drop in, get genuinely randomized by a motor-driven paddle wheel or shaking tray, and land in a visible result tray with an LED flourish to mark the roll. This project builds a 3D-printed or laser-cut tower frame with an ESP32 running a servo-driven tumbler and an addressable LED strip, controlled by a single push-button so it's as simple to use as a normal dice tower but adds a mechanical randomization stage and a bit of table presence.
How It Works
Dice drop through a top funnel into a tumbling chamber where a continuous-rotation servo drives a small paddle wheel or vibrating platform for a set duration (1–2 seconds is enough to thoroughly randomize a handful of dice without annoying players who roll often). After the tumble cycle, the dice fall through to a flat landing tray at the base. An addressable LED strip (WS2812B) around the tower's interior runs a brief animation during the tumble — a spinning color chase works well — and then settles to a steady color once the cycle finishes, giving a clear, satisfying signal that the roll is ready to read.
Wiring
| Component | ESP32 Pin | Notes |
|---|---|---|
| Servo signal | GPIO 18 (PWM-capable) | Servo power comes from the 5V rail, not the ESP32's 3.3V output — share ground only |
| LED strip data | GPIO 5 | Route through a level shifter or a 300–500Ω series resistor on the data line for signal reliability |
| Push-button | GPIO 4 (input, pull-up) | Debounce in software — a 20–30ms software debounce is sufficient for a mechanical button |
| 5V power in | VIN / 5V pin | Feed both the ESP32 and the LED strip from the same 5V supply, sized for LED strip peak current plus headroom |
Firmware Logic
The control loop is simple and doesn't need a real-time OS or complex state machine: wait for a button press, run the LED chase animation and drive the servo at full speed for the tumble duration, stop the servo, hold a solid "ready" LED color, and return to waiting. Using the Arduino core for ESP32 with the FastLED or Adafruit_NeoPixel library for the strip and the standard ESP32Servo library for the tumbler motor covers the entire project without needing custom drivers. A short randomized delay (a few hundred milliseconds, seeded from the ESP32's hardware random number generator) before starting the tumble gives a slightly less mechanical, more natural feel to the cycle timing if you want that touch, though it has no effect on dice randomness itself — that comes entirely from the physical tumbling.
Mechanical Design Notes
The paddle wheel diameter and the chamber's internal height need to match: too much clearance and dice can avoid the paddles entirely by settling in a corner; too little and the wheel jams against large dice like a d20. Sizing the chamber for the largest die you'll regularly use (typically a d20 at roughly 20mm per edge) with the paddle wheel diameter at about 60–70% of the chamber's internal width gives reliable tumbling without jamming. If you're 3D printing the paddle wheel, print it in PETG rather than PLA — it's taking repeated mechanical impact from dice and PLA's brittleness shows up as cracked paddles within a few hundred cycles.
Assembly and Finishing
Laser-cut tower panels in 3mm or 6mm plywood assemble with simple tab-and-slot joinery and wood glue at the permanent joints, leaving the top funnel panel removable for clearing a jammed die or doing maintenance on the servo. If printing the frame instead, design the panels with the same tab-and-slot approach so the mechanical fasteners are shared between the two fabrication methods — it makes the project buildable either way depending on which machine you have available.
This is a project that scales easily to the skill level you want to bring to it — the core button-tumble-light cycle is a weekend build, and from there it's straightforward to add a small speaker for sound effects, a display showing roll history, or a second tumbling chamber for larger dice pools without touching the fundamental mechanism.