Few month ago I decided to build a cube made of hand-built 8x8 LED panels (Adafruit did not sell their panels yet). I ordered from AliExpress 500 LEDs and spent a few evenings with my soldering iron, a bit repetitive task but its a hobby so I can't complain. A 5V 60W power supply was also purchased from the same vendor, the cube can use around 6 Amperes when fully white.
Note: I paid 0.12$ per LED at the time, now it seems the price almost doubled!
Here is the cube almost finished. It was first assembled with hot glue which melt after 5 minutes of use! This think can get very hot. Everything is now assembled with transparent Silicon caulk, so far so good and it is easy to dismount for maintenance.
My first animation test was to play Space Invaders; the faces are animated like in the game. Each face is an array of 64 binary values, and there are eight arrays for the scrolling motion of each alien.
It's hard to evaluate on the picture but these LED are very bright, almost painful to watch, certainly too bright for kids eyes.
To reduce brightness and give a nice blurred effect I covered the faces with a white somehow opaque film supported by a simple frame. My idea was to give a Japanese lantern style of light.
I decided to complete this project before Christmas, indeed the cube is a nice addition to the Christmas tree. A simple loop of random colors switches the lights every second, finally my kid was amazed... a little.
Programming the CubeSince my kid is a fan of Minecraft, I thought that he would be happy to paint cubes like in the game; so to make the device more interactive and interesting, my intent was to build a realtime "pixel paint" application for 3D objects.
I coded a small application with Processing to represent the cube as a map. One can choose a color and just paint the faces. The LEDs are lighted in realtime, by Serial communication. I added a cheap bluetooth module for remote programming, et voila!
Here is the code I wrote (in part) for this project. There is a Sketch for the Teensy 3, it needs the OctoWS8211 library. The sketch is a simple adaptation of an example given with the library.
The wiring of the Teensy 3 follows the recommendation to use a 74HCT245 to convert 3.3v signal to 5v for the LEDs and 100Ohm resistors close to each pin.
The sketch for the Teensy 3 CubePaint.ino
Then the Processing project to send colors by Serial communication to the Teensy 3. The color wheel was copied from an example by Ira Greenberg This sketch shall work with any micro controller connected to Serial. Should be re-wrote with objects for clarity and easy update.
The Processing project CubeCross