24th January 2012, 22:31 #1
Advanced Member level 4
LED cube 4x4x4 – Atmega16 C
It is a project of LED cube 4x4x4. This cube is directly connected with the board without many cables when using an universal board. The knowledge, materials and the general idea to create such a cube can be taken from http://www.instructables.com/id/LED-Cube-4x4x4/.
The LED cube was made accordingly to the schema:
The schema differs from the original one:
- the programming connector was changed to 7 headers bar
- new 3 buttons (stop/start, switch, check) were added
- on/off switch was added
- the RS 232 communication was removed
The project consists of 64 LEDs, combined in 4 layers of 16 LEDs, creating a cube in three dimensions. LEDs in the project were specially selected to be diffuse, so as to distract as much light as possible.
The main element of the system is Atmega16, clocked by an external quartz with a frequency of 14.7456 MHz. It controls the buttons, transistors, programming connector and LEDs. Atmega16 can at one time release the current of 200mA (note sheet), hence the choice of the value of 220ohm resistors, which in turn gives: 200mA/16 LEDs = 12,5mA per a LED. A satisfactory result, especially at night, was created in this way.
The system has 4 buttons for communication with user:
- reset (system reset)
- stop/start (stop/start of the sequence chosen)
- switch (choice of the sequence)
- checking the correctly uploaded code
LED anodes are fed to the microprocessor pins (8 pins on port A and 8 pins on port C). At each soldering point, 4 LEDs are connected in a vertical with anodes. Cathodes are connected to four transistors. Transistors control the whole layers (16 pins from each cathode are connected together in a layer). By “multiplexing”, using a single cable (from the transistor), you have the ability to control up to 16 LEDs. This allow you to control a single LED without the need to use up to 64 individual connections. Now only using the code, you can invent and create custom sequences.
After running the system, the boot sequence turns on, but before that, two control LEDs (green and red) check whether the program was successfully uploaded to the microprocessor. If you are not sure of the correct operation of the processor, you can check the correctness of the uploaded code using the “CHECK” button. When the cube is already lit, you can switch to select the sequence mode. To do this, press the “STOP/START” button. For a moment the sequence of clearing the tube turns on and then using the SWITCH buttons, you can select any sequence. In order to facilitate the selection each time you press, the LED indicating the desired sequence number is lit.
Among available sequences, the most functional one is the night light (all LEDs lit).
The board was designed in Eagle and milled.
Scheme of the board in Eagle:
Visualization of the board in graphics overlay 3D (POV-Ray) front / rear
The way to make matrix presented on the base webpage of the project is ideal. You must have a plate (e.g. wooden) with the planned dimensions and drill holes in it (e.g. using a drill 5mm and distances between LEDs 2,5cm when the diameter of LEDs is 5mm). Soldering rather does not cause problems, one layer is about 15 minutes of work.
Another advantage of the system is that it has a programming bar. So at any time you can connect the programmer and change the existing code to suit your needs. The programmer used in this project was USBasp. The program was written in C and compiled in Eclipse+Avrdude+WinAvr.
The system can be powered by the alternating voltage in the range of 0-35V, because it has a +5V voltage stabilizer built on the system 7805.
- Atmel AVR Atmega16 + stand
- 64 LEDs (diffusion – blue) 5mm
- 2 LEDs 5mm (red, green)
- resistor 220ohm x 18
- resistor 470ohm x 2
- resistor 10kohm x 5
- transistor BC338 NPN x 4
- capacitor 10uF x 1
- capacitor 1000uF x 1
- ceramic capacitor 0,1uF x 6
- ceramic capacitor 22pF x 2
- crystal oscillator 14.7456 MHz
- 4x micro switch
- power socket
- metal spacers
- rubber bands for distances
Link to original thread (useful attachment) – LED CUBE 4x4x4 [Atmega16][C]
24th January 2012, 22:31
26th January 2012, 17:59 #2
Member level 5
Re: LED cube 4x4x4 – Atmega16 C
Hi dear vermes *
it's very beautiful and fantastic !
how can i connect the leds for make a cube ?