Main Content

This project is for an Arduino powered 4x4x4 cube of RGB LEDs. I have seen other LED cube projects using mono-colored LEDs and Charlieplexed RGB LEDs. This one is different in that it uses APA106-F5 addressable LEDs. An APA106-5F LED is similar to the well known WS2812 LED in that it is an RGB LED that can be daisy changed and driven by a single pin on the Arduino. Where the APA106-F5 differs from the WS2812 is in the package style and the communications timing. The APA106-F5 used in this project is in a 5mm domed, frosted package. Fortunately, the Adafruit Neopixel driver can drive the APA106-F5 LEDs the same as it does the WS2812. The domed, frosted package allows the colors to mix within the dome, thus providing better colors for each individual LED. I have included a rotary encoder with a push-button switch. The rotary encoder allows the user to vary the maximum brightness of the cube and/or the speed with which some of the patterns move. Selection is made by pressing down on the control knob. When the indicator LED is green, the brightness is set by rotating the knob. When the indicator is red the speed is set by rotating the knob. When the indicator is off the the knob is disconnected, turning it has no effect. The software for this project was developed in C++ using the Arduino IDE. C++ was used to take advantage of some of the features of object oriented programming, namely inheritance and overloading. The code was written to use a minimum amount of RAM. As much as possible, initial values were pushed into the Flash memory and copied to RAM when needed. Being an older nerd, I like to think of this as the 21st century equivalent of the Lava Lamp. Make one for yourself, sit back and get mesmerized.
Make no mistake, this is a complicated project. I have tried to simplify it as much as possible. You do not need to know anything about C++ to use the provided software. In some later steps I explain how the software works and how to add your own visual effects to the cube. The most complicated part of this project is wiring up the APA106-F5 LEDs into the 4x4x4 cube. You will need good soldering skills to make a good looking, functioning cube. The build has been simplified by assembling four individual 4x4 grids of LEDs (one layer of the cube) and then wiring all the layers together.
If you are interested in building one of these and do not have access to a 3D printer, contact me. I have the 3D printed jig that I used to build my cube with. I will send it to one lucky individual.
If you need help understanding how the code works or with implementing a new Action, contact me.”

Link to article