Display Mesmerizing Animations Within This 16x16x16 LED Cube

This large cube contains 4,096 LEDs that show smooth animations at a fast refresh rate.

A quick overview

LED display matrices have been around for decades and have continually shrunk in pixel size, cost, and power consumption. In a similar vein, makers have been building small LED cubes that typically show blinking lights within a 4x4x4 volume, although some have gotten up to 8x8x8, and most can only show a single color. As a way to showcase the crazy potential of LED cubes, the YouTuber who goes by Malt Whiskeycreated one with lengths of 16x16x16 for a total of 4,096 LEDs in three dimensions. Best of all, this display can update at a rate of 178 frames per second while also having internet connectivity and a touchscreen. All of this makes for a very large and mesmerizing show.

Designing the cube

The first step in this undertaking was figuring out how exactly how 16 individual 16x16 matrices could all be aligned inside of a clear box and adequately powered. Initially, the box was comprised of a raised wall and a 4x4 grid of aluminum plates for holding columns of LEDs. Malt Whiskey iterated through several different methods for supplying power to each plate, and he ended up using stranded 12-gauge wire for better current distribution. Finally, four large sheets of clear acrylic were included to provide a smooth, even surface while viewing the LEDs.

Fabricating the base

After 3D printing 16 inset squares and running large-gauge connectors through each one for power, Malt Whiskey began the painstaking process of bending each LED's four pins into the correct shape. To make this easier, a jig was printed in which the component can be placed, bent, and cut to the exactly correct specification. Next, 16 LED towers were constructed with an area of 4x4 at its base and a height of 16. Many jigs were also printed for this purpose to keep the rows aligned and separated whilst they were under construction.

Delivering power

WS281x LEDs (many variants are referred to as "Neopixels") are notorious for their potential for large current draw, since each one can pull up to 60mA at full brightness while showing white. This means the LED cube could draw up to around 245A at 5V, or about 1200 watts. It was for this reason that four power supplies had to be added underneath the base where each one provided 400W to four columns over two beefy copper wires to prevent overheating.

Pushing data to four thousand LEDs

With the LEDs wired up to a power source, Malt Whiskey had to determine the best way to get data from a microcontroller through the serial pins since WS281x LEDs are controlled in a sequential order. So to balance both speed and a limited number of I/O pins, a custom PCB was made that contains four 8-bit shift registers that, when added together, can output a total of 32 bits in parallel. This means just three pins coming from the Teensy 4.0 can address 32 channels with 128 LEDs each.

Programming summarized

The advantage to using hardware SPI pins means that serial data can be pushed very quickly, on the order of megahertz, over the shift registers. Additionally, direct-memory-access was integrated into the project so that data stored in a buffer can be toggled by hardware while not having to spend any CPU resources on it. Animations are simply header files that have init and draw methods which get called within the global loop, and they are responsible for putting pixel data in the correct location depending on the current iteration.

Viewing the results

This 16x16x16 LED cube project is incredible to look at while its bright, vibrant colors show interesting patterns such as fireworks, an oscillating 3D wave, and twinkling lights. You can watch Malt Whiskey's video here on YouTube to see the cube in action, or you can visit his Github repository to access design and code files.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles