(Deutsche Version) I recently built an LED-Cube. The Size is 4x4x4 and it consists of green LEDs.
The cuve is controlled via an ATMega16A, this ATMega (contrary to the ATMega8) has enough output channels. PORTA and PORTC are used for the columns and PORTD3..6 for the layers.
Here you can see the ATMega. On the left, there are 4 NPN-transistors which are able to supply a whole layer with power (16 LED/layer at 20 mA = 320 mA). All LEDs above each other are connected via their anodes (+) and then are connected to one of the 16 output channels of the ATMega (PORTA + PORTC). The cathodes (-) are connected to each other within a layer and every layer is connected to the collector of one transistor. The base of the transistor is connected via a resistor to one of the PORTD-outputs. The basic programming concept is relatively simpel: Each layer has got a variable which saves the state of every LED (from 0 to FFFF). The layers are lighted after each other for 100 µs, this results in a repetition rate of 2.5 kHz which should be much higher than any flickering the human eye can detect.
Every LED has a piece of opaque white on the top, otherwise, every LED would light the LED above and it seems that both LEDs are switched on.
The next step should be some kind of implementation of SPI for being able to control the cube via a Raspberry PI.
No comments:
Post a Comment