Arduino LED 4x4x4 Cube With 595 Shift Registers DIY Kit

4,932

12

12

About: I like tinkering with electronics, PCs, ESP8266s and Arduinos. Would like to share what I have done as it may help others getting started or just trying something new.

This is a 4x4x4 LED cube kit from Ebay costing about £3.50. It uses 2 x 74HC595 ICs to drive it. The kit comprises of a circuit board, 2 x ICs, 2 DIP Sockets, 70 LEDs, 6 resistors, and 2 x 40 rows of pins, but NO INSTRUCTIONS! I asked the supplier if there were any but did not get a reply. Anyway looking at it, I thought it should not be so difficult as there are some printed bits on the double sided board.

Anyway this is the result - IT WORKS!

There are 16 pins for the anodes which are connected to the output pins of the two 595 ICs. The four planes are connected to the arduino (pins 7,6,5,4) through 4 x 500 ohm resistors.

I have tested it on both the UNO & MEGA. The pins used are hard wired into the shield.

74HC595 pin ..... Arduino

SH - Clock................0

ST - Latch.................1

OE - Output Enable..2

DS - Data..................3

Shield

D16...........................4

D17...........................5

D18...........................6

D19...........................7

.

Step 1: Solder the Components to the Board

1. Solder the resistors to the the board.

2. Solder the DIP Sockets next.

3. Solder the round pins into each location (D0 - D19). Rather fiddly.

4. Solder the 4 blocks of long pins.

Step 2: Assemble the LEDs

I have no photos of the assembly, but looked at what others had done for their cubes

1. Make some sort of template to hold the LEDs in place.

2. Check each LED is working.

3. Bend legs.

4. Solder all 16 LEDs together (Cathodes).

5. Check that they are still all working!

6. Do this 3 times more.

7. Solder each layer together (Anodes).

8. Insert bottom layer into PCB pins and solder if required.

9. Connect the ground planes to D16, D17, D18, D19. (There were no wires in the kit to do this).

10. Enjoy your creation.

Step 3: Write Some Code

This code works with the Arduino UNO & MEGA.

There is a routine to deal with the code snippets that you find all over the internet in both code samples.

led4x4x4checker was written from scratch by myself.

LED4x4x4with595s is code I modified from another instructable.

2 People Made This Project!

Recommendations

  • Warm and Fuzzy Contest

    Warm and Fuzzy Contest
  • Sweet Treats Challenge

    Sweet Treats Challenge
  • Paper Contest

    Paper Contest

12 Discussions

0
None
skyracer1

8 weeks ago

Hi
first I want to thank you for the instructions and code.
I have a little problem maybe someone can help. My top level D19 pin7 is not lighting up, leds are fine when i connect them to d18. connected 1 led directly on pin7 arduino and nothing , on 6 and other there is power. is this software or is my arduino broken?

2 replies
0
None
skyracer1skyracer1

Reply 7 weeks ago

found it. burned blinking led (pin7) to test, still nothing. than removed atmega and bent all pins little bit out and led was blinking. burned your program and everything is working. thx

0
None
zeikkujakeb

2 months ago

Hello can I ask why not all led cannot be turn on for example B1111 until 16 only 2 part of the 4x4x4 is on

4 replies
0
None
KeiichiKzeikkujakeb

Reply 2 months ago

Hello!
What kind of program did you try?
Please refer to my comment on the previous discussion as well.

0
None
zeikkujakebKeiichiK

Reply 2 months ago

When i try to turn on the LED by B1111 only the 1st and 3rd was all on but the 2nd and 4th are only one Horizontal on

0
None
KeiichiKzeikkujakeb

Reply 2 months ago

Are you trying led4x4x4checker.ino or LED4x4x4with595s.ino?
If so, I think you should change "p[i] = patBuffer[(i*2)] + patBuffer[(i*2)+1];" into "p[i] = patBuffer[(i*2)] + (patBuffer[(i*2)+1] << 4);".
Because the 2nd and 4th are controlled by upper 4 bits.

0
None
JohnL142zeikkujakeb

Reply 2 months ago

You must have something wrong with your assembly.

0
None
KeiichiK

3 months ago

Hi,
Thank you for helpful information!!
I have completed to construct this DIY kit by your great help.

Anyway, I think both of your .ino programs have to be fixed a point.
patDisplay() function has a code "p[i] = patBuffer[(i*2)] + patBuffer[(i*2)+1];".
But I believe the code should be "p[i] = patBuffer[(i*2)] + (patBuffer[(i*2)+1] << 4);".
How about do you think?

2 replies
0
None
JohnL142KeiichiK

Reply 3 months ago

The program works fine for me. If your code works then fine also.

0
None
KeiichiKJohnL142

Reply 3 months ago

Thank you for your reply. I understood.