Six-Screen, Audio-Reactive Animation and Gaming LED Matrix Cube
by lucentcube in Circuits > LEDs
99 Views, 0 Favorites, 0 Comments
Six-Screen, Audio-Reactive Animation and Gaming LED Matrix Cube
Most so-called LED cubes you find online are voxel cubes - a 3D grid of individual LEDs that draws shapes in mid-air. This is the other kind: an LED matrix cube, where each of the six faces is a full RGB LED matrix panel. Instead of a few hundred floating dots you get six screens - around 24,576 LEDs in total - wrapping animation, games and audio-reactive visualisations around every side.
I designed and built this as a self-contained, battery-powered unit: six 64x64 panels behind cast-acrylic diffusers, a Raspberry Pi compute module driving all six faces, a custom power stage, speakers and a microphone, all packed into a 3D-printed internal skeleton, capable of running equirectangular sphere projected animations (from any 2D animation from the internet), audio visuals, games and applications.
This guide walks through how it comes together - the panel modules, the electronics cradle, and the nerve-wracking final fold where six faces become a sealed cube. Although this guide includes custom 3D printed parts and circuit boards the same can be achieved using the Adafruit panel attachments and standard RPi with a HUB75 controller hat.
Supplies
Display: 6x 64x64 RGB LED matrix panels (HUB75, ~2.5mm pitch, 160mm square); 6x cell-cast acrylic diffuser sheets cut to the face size; cube edge frames and corner pieces (custom); a display stand. You can use the PWM or non-PWM ones, although the PWM panels (recent support made available in the RPi RGB LED library) give a higher refresh rate.
3D-printed parts: panel connectors / fold flaps, microphone holder, electronics cradle, legs, and the pogo-pin power-port housing plus shipping cap.
Electronics: Raspberry Pi CM4 (or CM5 + fan); a custom HUB75 driver / carrier board; a custom power / boost board; a 2S Li-ion battery pack; 2x speakers; a microphone on a long JST lead; a pogo-pin power connector and magnets. Alternative: Raspberry Pi 4 or 5, Adafruit HUB75 hat (with at least 2 ports), power path\charge board (Adafruit has these, although ideally you want to push 6A+ through this, or just run it off PSU).
Wiring and consumables: XT30 connectors and leads; JST leads; HUB75 ribbon cables (short bridges and longer runs); 0.8mm and 0.2mm copper wire; magnets; CA glue; heat-shrink; a microSD card.
Tools: soldering iron, flush cutters, crimpers, pliers, a set square, and cotton buds.
Dog is not needed, to be honest he just got in the way.
Print and Source the Parts
Print the 3D parts first - the panel connectors, mic holder, cradle, legs and the pogo power-port housing - since they take the longest and you will want them on hand throughout. Get the acrylic cube-edge frames, the diffusers, the stand and the plug housing cut or ordered at the same time.
Lay everything out and check it against the assembly drawings before you glue anything. The panels and their driver boards look identical but have an orientation (note the arrows on the PCB) - getting that consistent now saves grief later.
Flash the Card and Install the Software
The display side builds on the excellent open-source rpi-rgb-led-matrix library by Henner Zeller, which drives HUB75 panels from a Raspberry Pi, including the improvements by Marc Marlin and kingdo9 to bring panel stability and PWM panel support. The standard setup:
Flash the OS - use Raspberry Pi Imager to write Raspberry Pi OS Lite (64-bit) to the microSD card. In the Imager's advanced settings, set the hostname, enable SSH and add your Wi-Fi so it boots headless.
Update and install build tools - SSH in, then run sudo apt update && sudo apt full-upgrade, and sudo apt install -y git build-essential.
Clone and build the library - git clone https://github.com/hzeller/rpi-rgb-led-matrix, then cd rpi-rgb-led-matrix && make.
Test a panel - sudo ./examples-api-use/demo -D0 --led-rows=64 --led-cols=64. For six chained 64x64 panels you pass the chain/parallel and hardware-mapping flags to match your wiring.
Free up the hardware for clean output - disable onboard sound so the PWM hardware is free (add dtparam=audio=off to /boot/firmware/config.txt), and consider isolating a CPU core (isolcpus) to cut flicker. See the library README for the full flag list.
From there the cube's own software (playback, visualisers, games, the app and API) layers on top and starts on boot. Flash the card now so the electronics are ready to test the moment they are wired.
Internal Wiring
Make all the looms before anything is boxed in. Work through these on the bench:
Microphone lead: assemble the mic onto its long JST lead, then glue the side of the mic into its holder.
Panel power harness (XT30): build the XT30-to-panel power connectors. Make one run about 50% longer than the others - that is the one that reaches the top face during the final fold.
Board bridge: build the XT30-to-XT30 bridge between the driver and power boards. Double-check the bridge JST pin order.
HUB75 bridges: make three 8cm HUB75 jumpers for the short face-to-face hops; the top bridge is a full-length run.
Solder the ports onto the driver and power boards.
Keep leads to length and label the ends - once the cradle is in the cube you cannot easily trace a wire.
Build the Power Port
The cube charges and runs through a single pogo-pin port, so build it carefully:
Solder 30cm of 0.8mm copper to the four inner pogo pins, and 0.2mm copper to the pogo magnets.
Seat the pogo pins in the housing. Build a 30cm power cable onto the thick ends (terminated in XT30) and a 30cm JST onto the thin ends - crimp or solder, leave about 10cm raw, then heat-shrink.
For the external lead, cut the end off a barrel-extension lead, thread the plug housing on, solder to the inner four pins, then glue the fins of the pogo and the base of the cable - use the housing depth as a jig so the halves marry exactly.
Build the Panel and Diffuser Modules
Each face is a module: a panel, its fold-connectors, and a diffuser in an edge frame. Build all six.
Magnets into the connectors: press magnets into the printed connectors, keeping the poles consistent for the vertical vs horizontal flaps (mixing them means faces that repel instead of snapping together).
Glue connectors to panels: using a set square, glue the connectors to each panel with three small blobs of CA each. Square really matters - a degree of skew per face compounds into a cube that will not close.
Diffuser into the frame: fix the diffuser sheet into a single edge frame, spreading glue along the 3mm channel.
Close the module: drop the panel in and fix the opposing frames, respecting the horizontal / vertical / pogo orientation of each face.
Assemble the Cradle and Electronics
The printed cradle is the spine of the cube - it holds the compute, power, battery, speakers and mic in the middle, cabling out to the faces.
Glue the two speakers into the cradle.
Insert the SD card into the CM4, the CM4 into the driver board (or CM5 + fan, connect the fan), and sit it in the cradle with the battery/PSU end of the power board at the top.
Clip the stand-offs into the driver and power boards and fix both to the cradle.
Connect speakers, mic and power to the driver/bridge cables (XT30 and data).
Insert the panel-power XT30 from the bottom and pull the longest lead through the middle to the top.
Set the battery into the cradle but do not connect it yet.
Plug the long HUB75 cables into the driver and the PSU/cap cable into the power board.
Fix the legs onto the cradle.
Fold the Cube Together
Six modules and a cradle become a sealed cube. Work on a clean, soft surface.
Lay out the modules in fold order - bottom in the centre, back closest to you.
Insert a short panel-power lead and CH1 of HUB75 into the bottom module, then drop the cradle into the bottom panel with the battery in the bottom-right corner.
Feed panel power from the bottom to each side panel, adding CH2 and the short HUB75 bridges, then the longer bridge for the last run.
Connect the pogo power and shipping-cap connectors to the power board as you snap the port in place.
Snap the remaining three sides almost home - a cotton bud wedged between them keeps them apart while you work.
Connect the top panel's power and HUB75 with the slack you left, lower one side to connect, then gently release the surrounding three so they seat at once. The self-locking frames plus magnets can need a little massaging.
First Power-Up
Before the first run, sanity-check the wiring, then connect the battery or plug in. On the bench I bring these up with a scope on the power rails - a wall of white LEDs can sag the supply, and it is easier to catch that now than after it is sealed.
A test pattern across the faces confirms every panel is live and correctly oriented. Then the fun part: with the microphone feeding a real-time FFT, the cube splits sound into frequency bands and drives a visualisation across all six faces - bass thumps low, highs sparkle up top, and the whole thing moves with the music.
From there the software is where it comes alive - hundreds of animations, music-reactive visualisers, games across the faces, and an open API. If you would rather not source panels and cut acrylic, it became a finished product: lucentcube.com, with a deeper write-up at lucentcube.com/led-matrix-cube. Videos of the cube in use can be viewed at youtube.com/@lucentcube.