RGB LED cube 5x5x5
What's this?Most useless decoration in your flat! LED cube is basicly real 3D display. Resolution is defined by number of LEDs. Higher resolution allow more "realistic" effects, but LED request increase by thirth power. So it is good idea to choose "right" number of LED (resolution vs difficult). This version have square size 5, but used LEDs are RGB which allow make effect more effective.
How it works?As controll unit was selected ATmega64 because of flash memory size (64kB). This AVR have enough I/O pins, harware PWM, UART, SPI and I2C interface. Because RGB LEDs are used we get 3 independent color channels. PWM is used for for LED intensity controll (channels R, G and B). If all color channels will be active, it is possible set any color we want. Limitation is mostly by software, because for one 3D frame is possible set exactly one combination PWM values.
Whole device was designed for supply from USB without need of external power supply. So for LED supply was used DC/DC converter (higher power effecitvity). This brings some advantages:
So device can be powered by one of the following power supply:
When device was designed there was also calculated with connection with matrix keyboard, I2C or SPI device.
Device also contain USB to UART interface. This feature allow connect LED cube with computer and for example play animations directly from computer, where is not such memory limit.
Reprogramming is possible through standard 10 pin ISP connector for AVR (allowed is 3.3 to 5V range thanks to protective resisitors).
Because controll every single LED directly by MCU would be nearly impossible (needed 375 pins), LED controll is done by multiplexing. Projection scheme and description is on following images.
Biggest problem is data processing because of need refresh 3D frame. Data processing is split to two threads. First thread load 3D images to framebuffer.
Assistans SW for generating animationsBecause creating animations in raw code is very complex there is simple console application which allow simplify this operation. On the following image is application demo.
Application show actual frame number, selected wall and column. Also show calculated time. On following picture is shown 2D image on selected wall. Colors are symbolized "R", "G" and "B". When user type "exit" animation is generated and saved to .c and .h files. These files user copy to project and set pointer to animation. Example:
/* Set pointer to animation in flash memory. It is basicly pointer top_anime = array_with_binary_data;
* array where are binary data stored
SW for control cubeAfter longer break I came back to this application. First version allow contorl cube through UART. Respectively clone actual image from PC to real cube. This is only first step and it menas that new options available (animation, random colors, maybe simple game?). Of course you can play with virtual cube without need real one.
Application is written for Python3 (you can not stop progression) and require pygame (3D cube) and optionally pyserial (communication through UART).
Application is still in development version, but comments are welcommed!
Demo videosVideo has crappy color resolutions, so in real are colors more colorful. Also human eye do not see LED blinking which cause PWM and on video is very annoying. Also I do not know why are there "ghosts" from LEDs. Anyway, You can make a picture.
Few demo animations
DownloadAll in one and up to date:
Old and not updated:
ConclusionProject come into existence as part of subject MPOA .
Project is not dead yet! Right now I'm working on PC application. (update 2018.10.22)