LED Cube

From Idea Shop Wiki

Introduction

Github: github.com/InfyxPro/LED_CUBE

This 8x8x8 LED cube had three major components: hardware, hardware code, and software code. Hardware involved creating the PCB through eagle and mapping out all of the components to make the LED work; this is the lowest level of the system. Then, the hardware code was made through the Arduino program with the ATmega328P. This code allowed to control the LEDs with an [8][8][8] array and there brightnesses. The system also includes an SD card, this would allow the cube to play whatever is on the file. My next component involves a high end software for users to create any design for the LED cube. After the design is made, it could be saved as a .cub file and placed into the SD card; then, the file will be played on the cube. The program was made in python and the libraries used to create the GUI was pygame and OpenGL. The program was also compiled and can be run on any windows system.

The Hardware

The system was going to use an atmega 328p, this is the same micro controller that the Arduino uses. It would be impossible to control 512 LEDs however, the arduino can use 9 of its bits to talk to each individual LED. Basically, the Arudino is going to be able to toggle each individual LED. It's now the hardwares job to be able to take a 9 bit input and output one of the LEDs. This is basically a big mux. The inputs were first fed into three 3-8 bit encoders, each encoder represents an axis and can turn on the entire plane of the axis. In turn, allowing only one LED at a time to be lit. A PCB board was made using eagle to house all of the electronics. The eagle file can be found on the github. led pcb.jpg led cube1.jpg

Embedded Systems code

The codes job is to send out a 9 bit signal to control all of the LEDs. The code hosted an 8x8x8 byte matrix that represents the matrix, and the value inside that matrix represents the brightness. The code on the micro controller would would basically run as fast as possible trying to print out the array to the LEDs. The brightness was a combination of turning off the LEDs for the givens value of iterations allowing for a brightness change. Now there are pre-built animations that update the array at some set frequency. The cube also has an SD card slot that allows to play a pre-built animation. This just grabs a large string of numbers that represent the brightness of each LED and prints it out on the array.

Python GUI code

This part of the project allows the user to easily control every single LED in an easy to use GUI. The GUI uses pygame. The GUI then allows the user to save the file on an SD card and can be played through the LED cube.

gui1led.jpg