My LED Cube is made out of 125 red LEDs arranged in a 5x5x5 matrix. It can play visual sequences directly from a computer connected via a USB. Alternatively, it can store a visual sequence inside an internal 2kB EEPROM and play it on its own, without any USB connection. One "frame" in a sequence is represented by 125 bits of LED data and a 16 bits delay, consuming 18 bytes. The 2kB internal memory can therefore hold a maximum of 113 frames, which is enough for about 10-second-long visual effects at a reasonable framerate.
The circuit utilizes an Atmega162 microcontroller and a 2kB I2C EEPROM - 24LC16B. Atmega162 doesn't have a hardware I2C interface, so the communication with the EEPROM is provided by a software I2C from www.eXtremeElectronics.co.in. USB communication with a pc is based on a CDC-232 and V-USB library and a custom-made protocol.
LEDs are wired in a matrix of 5 layers and 25 columns, so just 30 I/O pins of Atmega162 are used for driving all of the 125 LEDs. The remaining pins are used for USB and I2C communication.
The host software is written in a Qt Creator and communicates with the cube using a qextserialport library. It is, essentially, a very simple IDE where one can create visual sequences in a custom scripting language using simple text commands. These scripts can be "compiled" into the 18-byte-long frames and then be either played directly (real-time) on the cube or stored in the internal 2kB EEPROM and played whenever the cube is not connected to a computer.
Firmware for the Atmega162, schematic, and source code of the host application is here.
Copyright © 2023 Jiri Stepanovsky. All Rights Reserved.