Pages: [1]   Go Down
Author Topic: 4x4x4 LED cube build  (Read 2768 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey everyone, ive decided i wanted to build a 4x4x4 cube to challenge my self.

components:
64 5mm blue diffused LEDS
connection wires
arduino UNO v3
craft wire
breadboard

most of these items are currently one their way and i want to get a head start on programming it.

my first question is which is easier on the programming side? a cube connect directly to arduino or a cube connected to shift registers and then arduino. i already have 4 74595 shift registers and would love to use them, but if the learning curve is too high i will jsut attempt them at a later time.
Logged

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The easiest is probably with 4 planes of 16 LEDs, and 16 resistors. It uses a total of 20 pins (16 for the columns, and 4 for planes. You could do it without resistors, but you will be better off if you use them.

I started this thread about using shift registers with a 4x4x4 thread, you can find lots of stuff about running the same cube with 2 shift registers to control the columns.

Im also trying to build some RGB LED cubes, but right now I only have one cube built and working, and its a crazy "nothin but LED design", but it works, and has been running for months without breaking.
https://sites.google.com/site/rgbledcubes/

There is good info there that you can adapt to any LED cube building, especially the stuff about wire and  part prep.

There are a set of arduino tutorials for using shift registers, specifically the 74HC595, those are a good start. You can build the cube both ways, start without the shift registers, run the cube, then upgrade the cube to shift registers, and run the new software on it.

I did an instructable about upgrading 4x4x4 cube to using shfit registers at:
http://www.instructables.com/id/4x4x4-LED-cube-upgrade-with-Shift-Registers-74hc5/

What resistor you use is dependant on what LED you use, typically a red LED wants a 150 ohm resistor, while a blue wants more like 100 ohms.
Logged


Offline Offline
Newbie
*
Karma: 1
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ya that sounds good, should be pretty easy to switch to the shift registers. Is there a large difference in the brightness from the bottom led to the top led? Since I will only be using 16 resistors.

Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 436
Posts: 23643
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Get yourself 4 NPN, or 4 N-channel MOSFETS, and you can it this way, or use the shift registers to drive the anodes.
With all 16 LEDs in a layer turned on, could sink up to 320mA, be aware of that when selecting a transistor.
There are also limits on how much each Port (group of pins) can be sourced by the Atmega328, see the notes at the end of Table 29-1 in the datasheet, so that may impact your choice of resistor.
74HC595 is limited to 70mA total current, so another option is using PNP or P-channel MOSFETS as the current sources.


* 4x4LEDmatrix_transistors.jpg (93.83 KB, 960x720 - viewed 204 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ya that sounds good, should be pretty easy to switch to the shift registers. Is there a large difference in the brightness from the bottom led to the top led? Since I will only be using 16 resistors.


Brightness issues are not a top/bottom thing, in fact, it never lights the top and bottom LEDs at the same time. The variance in brightness is from lighting 0 to 16 LEDs. When you light all 16 at one time, its not as bright as when you only light a couple LEDs.

When the cube ran with resistors only on the planes (4) and shift registers, I noticed brightness variance. I changed the cube to use 16 resistors, and now the brightness is consistent.

Look in this other thread about 4x4x4 cubes, This post has a real nice circuit for running the cube. Its a more proper design.
http://arduino.cc/forum/index.php/topic,123495.msg1052188.html#msg1052188

Logged


Offline Offline
Newbie
*
Karma: 1
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i completely forgot i needed transistors, but why do i need transistors? also this instructables looks like a good place to learn about 4x4x4 led cubes as it is exactly what I want to start off with.
http://www.instructables.com/id/4x4x4-LED-Cube-Arduino/
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 436
Posts: 23643
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Transistors are needed so you can turn on a whole layer at one time, so 320mA of current needs to be controlled.
Without transistors, you are limited to 1 LED a time being controlled at a time (with a traditional 16 columns and 4 layers), and updates will occur a lot slower; 64 LED on/off cycles per cube compared to 4/cube.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 1
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oooo i understand now, so in animations you can turn on the layers that are connected to the transistors. then the rest would connect straight to the arudino.
Logged

Toronto
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Love Electronics
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Turtlesoup

Go to the Thread Hippyneard spoke about. at the bottom is the schematic and code for the 4x4x4 cube I built

Look in this other thread about 4x4x4 cubes, This post has a real nice circuit for running the cube. Its a more proper design.
http://arduino.cc/forum/index.php/topic,123495.msg1052188.html#msg1052188

Logged

Don't Shoot The Messenger

Offline Offline
Newbie
*
Karma: 1
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sorry for the lack of posts, but most of my parts finally arrived today!! that's what i get for ordering them through china... at least my ebaybucks paid for them

anyways later tomorrow i will begin to construct my cube.
Logged

Pages: [1]   Go Up
Jump to: