PROJECT 03 / ESP32 + 2 LED MATRICES

Time, in motion.

A digital hourglass. Turn it over and let gravity take over.

EXPANDED PROTOTYPE / SIGNAL ROUTING VIEWColored lines = shared electrical nets · crossings without dots are not junctionsDRIVER 1MAX7219RSET · 10µF100nF16 linesDRIVER 2MAX7219RSET · 10µF100nF16 lines1088AS / 011088AS / 025VGNDCLKLOADDIN 1DOUT 1 → DIN 2DOUT 2 unusedESP32DEV BOARDUSB74AHCT1253.3V → 5V/OE → GNDMPU6050SDASCL3V3GNDAD0=0GPIO23 / DINGPIO18 / CLKGPIO27 / LOADGPIO21 / SDAGPIO22 / SCLGPIO25 / SETGPIO26 / CHANGE3V3 → SENSOR ONLYREGULATED 5V IN100nF bypass5V INGND3V3

Drag around the center to rotate · Sand falls toward the floor

FOLLOW THE WIRES

Hardware connections.

Proposed wiring for a classic ESP32 development board and two MAX7219 + 1088AS modules arranged as diamonds, corner to corner. The expanded board shows both drivers separately. Grey bundles represent each module’s 16 internal segment/digit connections to its matrix. Colored lines show the shared nets and serial chain; crossings without junction dots are not connections. This is a signal-routing illustration, not a physical pin-placement guide.

LED matrix chain

SignalConnection
DIN, module 1GPIO23 → level shifter
CLK, bothGPIO18 → level shifter
CS / LOAD, bothGPIO27 → level shifter
DOUT → DINModule 1 → 2; final DOUT unused
VCC, bothRegulated 5 V supply
GND, bothShared ground

Orientation & timer buttons

PartConnection
MPU6050 SDA / SCLGPIO21 / GPIO22
MPU6050 VCC / GND3V3 / GND
MPU6050 AD0GND · address 0x68
Set switchGPIO25 ↔ GND
Change switchGPIO26 ↔ GND
Switch input modeInternal pull-up

Use a 5 V powered 74AHCT125 for the three ESP32-to-MAX7219 signals, with its used output enables tied low. Share ground between the supplies and boards. Each matrix needs its own MAX7219, current-setting resistor, and local decoupling (typically included on modules). Use a 5 V supply sized for both modules; do not power them from ESP32’s 3V3 pin. The MPU6050 breakout should support 3.3 V power and I²C pull-ups.

MAX7219 documentation ↗ · ESP32 documentation ↗

THE BUILD CONCEPT

Two displays. One hourglass.

Two 8 × 8 matrices form diamond-shaped chambers meeting at the neck. An ESP32 drives two daisy-chained MAX7219 chips, while an MPU6050 supplies the gravity direction. Two physical buttons select and confirm the duration.

HOW THIS DEMO WORKS

Turn it over. Watch it fall.

Dragging simulates the orientation sensor. Sand collects against the downhill edges and passes through a timed opening. The selected duration controls the neck release rate; a partial flip preserves the sand and shows the corresponding remaining time. Flow pauses while sideways, setting the timer, or in a hidden browser tab.

Each dot falls into an empty neighbouring position under gravity, collides with other dots, and settles into a pile. Motion between LEDs is animated to make the falling sand visible. The neck meters the selected duration; this is a discrete sand simulation, not finished ESP32 firmware.