0% found this document useful (0 votes)
110 views17 pages

6x6x6 Led Cube

The document describes the design and construction of a 6x6x6 Arduino LED cube that creates 3D visual effects using 216 LEDs controlled by an Arduino Uno. It outlines the materials needed, the step-by-step procedure for assembly, and includes code snippets for programming the LED patterns. The project utilizes shift registers to manage the LED control efficiently, demonstrating the concept of Persistence of Vision.

Uploaded by

e8120sucabdwcl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views17 pages

6x6x6 Led Cube

The document describes the design and construction of a 6x6x6 Arduino LED cube that creates 3D visual effects using 216 LEDs controlled by an Arduino Uno. It outlines the materials needed, the step-by-step procedure for assembly, and includes code snippets for programming the LED patterns. The project utilizes shift registers to manage the LED control efficiently, demonstrating the concept of Persistence of Vision.

Uploaded by

e8120sucabdwcl
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

DIVINE WORD COLLEGE OF LAOAG

SCHOOL OF ENGINEERING AND ARCHITECTURE


Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

INTRODUCTION

A 6x6x6 Arduino LED cube with 3D effects and patterns is a visual treat. It is based on
the concept of Persistence of Vision, which is a property of the human eye that tricks our brain
into believing that an object is permanently present at a position when it appears.

Since an 6x6x6 Arduino LED Cube consists of, well 6x6x6 = 216 LEDs, we cannot control all these
216 LEDs at once. What we can do is control 36 LEDs at a time at an extremely fast rate and
trick our brain as if we were controlling all the 216 LEDs. All of the cathodes in a level are
soldered to their neighbors in a net. All anodes in a column are soldered to their upper and
lower neighbors. A 1-1 shift register controls the levels and each row. Using seven shift
registers, one for each level to control its ground and the other six for each row. A shift register
controls a whole row; it has eight output ports, but a row only has six columns, so it is plenty. A
6x6x6 Arduino LED cube is a display light that is controlled by an Arduino Uno board. The cube
is controlled by an Arduino Uno mounted on the prototyping board. Power for the Arduino
comes from the USB supply thru a computer device, also it is where the code is being read,
uploaded or changed. A 6x6x6 LED cube capable producing any type of pattern, including live
preview and animations.

1
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

PROJECT DESIGN

IC SPECIFICATIONS

2
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

MATERIALS
1. 216x 5 [mm] Red LED (optional)

2. 6x 180 [Ω] Resistor

3. 7x SN74HC595N Shift Register

4. 7x Shift Register Mount

3
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

5. 1x Arduino UNO

6. Solid Wires

7. 4x 9x15 cm Prototyping Board


(PCB 201)

8. Wooden Board

4
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

PROCEDURE
1. Using a drill, we drilled a hole in the wooden board with a 5mm diameter for the LED to
fit. The holes on the board acts as a layout. There are a total of 36 holes in the wood
with 6 rows and 6 columns. Each hole has a 1 inch space.
2. After drilling the holes, the LED’s are inserted in the holes.
3. Bend the ground terminals or the cathode and connecting each of it in a sturdy solid
wire and then they are soldered to fix it in place.
4. Next is to bend all the LED anodes a little bit sideward and then bending it downward.
5. 6 layers or levels should be made.
6. The anodes of the first level should be soldered to the anodes in the second layer.
Continue until all the levels are soldered.
7. Next is to combine all 4 of the 9x15 cm prototyping boards by soldering solid wires
connecting all of the boards.
8. If the LED cube is finished, solder the first level anodes to the prototyping board (PCB
201).
9. In the prototyping boards, place the shift register mounting and the resistors according
to your liking. And put the actual shift registers in their mountings.
10. Solder the connections from the resistor to the shift registers, from IC to the anodes of
the LEDs.
11. Connect the ground, 5V supply and the pins to the IC.
12. Lastly is to work on the code. Now, try if the LED cube is working.

5
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

FLOW CHART

Start

Execute
Code from
Arduino

LEDs pattern The LEDs pattern


A random LED A random LED
into a All LEDs glow will turn into a
will light up will light up
countdown growing cube

End

6
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

6x6x6 ARDUINO LED CUBE

int dataPin = 4;
int latchPin = 5;
int clockPin = 6;
byte SR[7]; // an array for the shift registers, SR[0-5] control the rows and the SR[6] control the
levels

int LEVEL[6] = {0x7F, 0xBF, 0xDF, 0xEF, 0xF7, 0xFB};


int LEVEL2[5] = {0x3F, 0x9F, 0xCF, 0xE7, 0xF3};
int ROW2[5] = {0xC0, 0x60, 0x30, 0x18, 0x0C}; int potdelay;

void setup() {
pinMode(dataPin, OUTPUT);
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);

Serial.begin(9600);
}

void loop() {
potdelay = analogRead(A5);

three();
two();
one();
delay(1500);
full();
delay(2000);
frame6x6();
GrowingCube();
frame4x4();
frame6x6();
randomLED();
FrameInFrame();
frame4x4();
centerCube();
randomCUBE();
7
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

custom();

void one() {
SR[6] = 0x00;
SR[0] = SR[1] = 0x30;
shift_out();

void two() {

for (int k = 0; k < 100; k ++) {


SR[6] = 0xF8;
SR[0] = SR[1] = 0x30;
shift_out();
delayMicroseconds(1);
clear_out();

SR[6] = 0xF4;
SR[0] = SR[1] = 0x48;
shift_out();
delayMicroseconds(1);
clear_out();

SR[6] = 0xEF;
SR[0] = SR[1] = 0x08;
shift_out();
delayMicroseconds(1);
clear_out();

SR[6] = 0xDF;
SR[0] = SR[1] = 0x30;
shift_out();
delayMicroseconds(1);
clear_out();

8
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

SR[6] = 0xBF;
SR[0] = SR[1] = 0x40;
shift_out();
delayMicroseconds(1);
clear_out();

SR[6] = 0x7F;
SR[0] = SR[1] = 0x78;
shift_out();
delayMicroseconds(1);
clear_out();

void three() {
for (int k = 0; k < 150; k ++) {
SR[6] = 0x7F;
SR[0] = SR[1] = 0x30;
shift_out();
delayMicroseconds(1);
clear_out();

SR[6] = 0xBF;
SR[0] = SR[1] = 0x48;
shift_out();
delayMicroseconds(1);
clear_out();

SR[6] = 0xDF;
SR[0] = SR[1] = 0x08;
shift_out();
delayMicroseconds(1);
clear_out();

9
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

SR[6] = 0xEF;
SR[0] = SR[1] = 0x10;
shift_out();
delayMicroseconds(1);
clear_out();

SR[6] = 0xF7;
SR[0] = SR[1] = 0x08;
shift_out();
delayMicroseconds(1);
clear_out();

SR[6] = 0xF8;
SR[0] = SR[1] = 0x78;
shift_out();
delayMicroseconds(1);
clear_out();
}
}

void GrowingCube() {

SR[6] = 0x3F; //2x2


SR[0] = SR[1] = 0x0C;
shift_out();
delay(300);

SR[6] = 0x1F; //3x3


SR[0] = SR[1] = SR[2] = 0x1C;
shift_out();
delay(300);

SR[6] = 0x0F; //4x4


SR[0] = SR[1] = SR[2] = SR[3] = 0x3C;
shift_out();
delay(300);
10
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

SR[6] = 0x07; //5x5


SR[0] = SR[1] = SR[2] = SR[3] = SR[4] = 0x7C;
shift_out();
delay(300);

SR[6] = 0x03; //6x6


SR[0] = SR[1] = SR[2] = SR[3] = SR[4] = SR[5] = 0xFC;
shift_out();
delay(300);

clear_out();
delayMicroseconds(10);

SR[6] = 0x80; //5x5


SR[5] = SR[4] = SR[3] = SR[2] = SR[1] = 0xF8;
shift_out();
delay(300);
clear_out();
delayMicroseconds(10);

SR[6] = 0xC0; //4x4


SR[5] = SR[4] = SR[3] = SR[2] = 0xF0;
shift_out();
delay(300);
clear_out();
delayMicroseconds(10);

SR[6] = 0xE0; //3x3


SR[5] = SR[4] = SR[3] = 0xE0;
shift_out();
delay(300); clear_out();
delayMicroseconds(10);

SR[6] = 0xF0; //2x2


SR[5] = SR[4] = 0xC0;
shift_out();
delay(300);
clear_out();
11
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

delayMicroseconds(10);
}

void frame6x6() {

for (int k = 0; k < 200; k ++) {


SR[6] = 0x7B;
SR[0] = SR[5] = 0xFF;
SR[1] = SR[2] = SR[3] = SR[4] = 0x84;
shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);

SR[6] = 0x84;
SR[0] = SR[5] = 0x84;
shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);

}
}

void frame4x4() {

for (int k = 0; k < 200; k ++) {


SR[6] = 0xB7;
SR[1] = SR[4] = 0x78;
SR[2] = SR[3] = 0x48;
shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);

12
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

SR[6] = 0xCF;
SR[1] = SR[4] = 0x48;
shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);
}
}

void FrameInFrame() {
for (int k = 0; k < 200; k ++) {
SR[6] = 0x7B;
SR[0] = SR[5] = 0xFF;
SR[1] = SR[2] = SR[3] = SR[4] = 0x84;
shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);

SR[6] = 0xB7;
SR[0] = SR[5] = 0x84;
SR[1] = SR[4] = 0x78;
SR[2] = SR[3] = 0x48;
shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);

SR[6] = 0xCF;
SR[0] = SR[5] = 0x84;
SR[1] = SR[4] = 0x48;
shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);

}
}
13
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

void custom() {
for (int k = 0; k < 200; k ++) {
SR[6] = 0x7B;
SR[0] = SR[5] = 0xFF;
SR[1] = SR[2] = SR[3] = SR[4] = 0x84;
shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);

SR[6] = 0xB7;
SR[0] = SR[5] = 0x00;
SR[1] = SR[4] = 0x78;
SR[2] = SR[3] = 0x48;
shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);

SR[6] = 0xCF;
SR[2] = SR[3] = 0x30;

shift_out();
delayMicroseconds(5);
clear_out();
delayMicroseconds(5);

}
}

void centerCube() {
SR[6] = 0xCF;
SR[2] = SR[3] = 0x30;
shift_out();
delay(500);}

void randomCUBE() { //2x2 cube


for (int k = 0; k < 20; k ++) {
14
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

int SRrandom = random(0, 5);

SR[6] = LEVEL2[random(0, 5)];


SR[SRrandom] = SR[SRrandom + 1] = ROW2[random(0, 5)];
shift_out();
delay(potdelay);
clear_out();
}
}

void randomLED() { //only 1 LED will light


for (int k = 0; k < 20; k ++) {
SR[6] = LEVEL[random(0, 6)];
bitSet(SR[random(0, 6)], random(2, 8));
shift_out();
delay(potdelay);
clear_out();
}
}

void full() {
for (int i = 0; i < 6; i ++) {
SR[i] = 0xFC;
}
SR[6] = 0x00;
shift_out();
}

15
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

DOCUMENTATION

16
DIVINE WORD COLLEGE OF LAOAG
SCHOOL OF ENGINEERING AND ARCHITECTURE
Department of Elactrical Engineering
General Segundo Avenue, Laoag City, 2900

COST OF EXPENSES
MATERIALS COST
1. Prototyping Board (PCB 201) x4 ₱ 340.00
2. LED x216 ₱ 1100.00
3. Lead ₱ 190.00
4. Solid Wire ₱ 250.00
5. Shift Register (IC) x7 ₱ 90.00
6. Shift Register Mount (IC) x7 ₱ 60.00
7. Arduino Uno ₱ 650.00
TOTAL ₱ 2680.00

References
Tamas, T. (n.d.). Trybotics. Retrieved from 6x6x6 Arduino LED Cube:
https://trybotics.com/project/6x6x6-Arduino-LED-Cube-1712#:~:text=This%20is%20a
%206x6x6%20LED,the%20upper%20and%20lower%20neighbours.
ttemplom. (n.d.). instructables circuits. Retrieved from 6x6x6 Arduino LED Cube:
https://www.instructables.com/6x6x6-Arduino-LED-Cube/

17

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy