Arduino LED 4x4x4 Cube With 595 Shift Registers DIY Kit

9.0K1620

Intro: Arduino LED 4x4x4 Cube With 595 Shift Registers DIY Kit

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.

13 Comments

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?
I know this thread is pretty old ... anyway ... I was just testing your suggestion as the animations looked a bit incomplete on my cube.
Changing to "p[i] = patBuffer[(i*2)] + (patBuffer[(i*2)+1] << 4);" solved it for me :-)
The program works fine for me. If your code works then fine also.
Thank you for your reply. I understood.
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?
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
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
Hello!
What kind of program did you try?
Please refer to my comment on the previous discussion as well.
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
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.
You must have something wrong with your assembly.

Shift registers are so helpful!