Arduino LED 4x4x4 Cube With 595 Shift Registers DIY Kit
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
KeiichiK 5 years ago
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?
p43lz3r 3 years ago
Changing to "p[i] = patBuffer[(i*2)] + (patBuffer[(i*2)+1] << 4);" solved it for me :-)
JohnL142 5 years ago
KeiichiK 5 years ago
skyracer1 5 years ago
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?
skyracer1 5 years ago
JohnL142 5 years ago
zeikkujakeb 5 years ago
KeiichiK 5 years ago
What kind of program did you try?
Please refer to my comment on the previous discussion as well.
zeikkujakeb 5 years ago
KeiichiK 5 years ago
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.
JohnL142 5 years ago
tomatoskins 8 years ago
Shift registers are so helpful!