Go Down

Topic: Using the arduino for an 8X8X8 LED CUBE (Read 4936 times) previous topic - next topic

aceshigh

Please bare with me if this seems like a stupid quest ive looked around the forum but cant find answers to the questions im looking for.

Im building an 8x8x8 LED cube but need to know if the arduino can

1. connect to the 64 LED columns to switch each of the LED lines.


2. Multiplex to allow me to isolate one LED and make animations exc.

any kind of information would be very helpful as im ripping my hair out.

THANKS IN ADVANCE FOR ANY HELP ;D

halley

Quote
Im building an 8x8x8 LED cube but need to know if the arduino can
1. connect to the 64 LED columns to switch each of the LED lines.
2. Multiplex to allow me to isolate one LED [glow]and make animations exc[/glow].


I think everything was fine until you got to this point.  An 8x8x8 box has 512 elements.  You could address any of the elements, and even write out 8 LEDs at a time in each of the 64 "columns."  But I don't think you'd be able to refresh all 64 columns fast enough to get smooth persistence-of-vision (POV) animations going.

I could be wrong, but that's pretty fast, and people are being challenged by 8x8x3 projects currently.

aceshigh

#2
Jan 06, 2009, 01:56 am Last Edit: Jan 06, 2009, 02:06 am by Aceshigh Reason: 1
ok lets say i just want to switch 64 switches forget multiplexing, to isolate one led.

if i just wanted to switch between column to column.

and light row by row and how would i go about doing this.


I have been looking at 4051 MULTIPLEXING an extending the analog. to allow a maximum of 64 outputs is the the correct path?

Anachrocomputer

There's a thread here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1231049070/
that talks about a 4x4x4 cube (at the very end, a link to Instructables).

But an 8x8x8 cube is much more ambitious!  Don't forget that you'll need to drive the full current requirements of (potentially) 64 LEDs, all on at once.  64 times 20mA is 1.28A through the ground return.  That's too big for the usual ULN2803 chip.  A 4051 wouldn't stand a chance -- it's the wrong sort of chip, anyway, since it's an analog multiplexer.

For a 64 LED array, organised 8x8, you'd need eight output drivers capable of sourcing 20mA each (74HC595 would do) and eight low-side drivers that could sink (8 X 20mA) = 160mA, so a ULN2803 would do, driven from another 74HC595.

Then, it's just a matter of selecting a column and driving the row data to the 74HC595, then a short delay, and go on to the next column.

aceshigh

i already have the power supply sorted, using transistors to trigger a main current. litterally any amount of voltage will trigger the LED's on. just a matter of what board has enough i/o pins to connect them all and switch to make some pretty things.


MikMo

If you just need to switch 64 things on/off then you could use 8 8bit shiftregisters. This is absolutely within the capability of Arduino.

There's an example in the playground using 2 595 registers, this could easily be expanded to 8.

aceshigh

i will try everything today and post some results. if anyone has any more ideas please do post and let me know.

thanks again for the help


westfw

You might want to take a look at this thread:
 http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225239439
which has some discussion of a 384-led display using the Holtek HT1632 driver chip.  In particular, there's a demonstration program that updates all 384 LEDs (serially, one at a time) and is still "fast enough for animation."
A couple of these chips would be a good start on an 8x8x8 cube, I think; they do all the period refresh, so your arduino would actually have time to do other things...  (However, I'm not sure where you'd buy them...)

(an 8x8x8 cube would be quite a substantial MECHANICAL undertaking as well...)

bitchen

aceshigh:

Quote
I have been looking at 4051 MULTIPLEXING an extending the analog. to allow a maximum of 64 outputs is the the correct path?


I was playing with this tonight on an 8X1 LED matrix. The problem is not with the 4051, but rather that the PWM (pseudo analog out) isn't fast enough to render a "true partial voltage" to each LED in the time you need to scan across them to keep persistence of vision intact.

I was just feeding Pin 3 analog to the 4015 and no dice unless your refresh rate is mind-numbingly slow. You have to put a "delay(1)" after each analogWrite to makesure the votage renders to the LED that you've selected.

I do, however, recommend using the  PORTD register to send the addresses to the 4051.

Now, my next goal is to use a D-to-A converter to send the true voltages to the 4051. That should clear that up (by circumventing PWM at the cost of using more digital lines for the d-to-a) and allow me to get shades of "grey" on my matrix. (I'm going to step up to an 8x8, once I get this mastered.)

Hope makes sense and helps someone out there.

More discussion of the 4051 here: http://www.arduino.cc/playground/Learning/4051

Fenrisulfr

If it has any bearing ULN chips can be stacked to increase the Amps they can handle.

regards

Fenrisulfr

raron

#10
Jan 21, 2011, 10:10 pm Last Edit: Jan 22, 2011, 06:44 pm by raron Reason: 1
@ bitchen
Quote
The problem is not with the 4051, but rather that the PWM (pseudo analog out) isn't fast enough to render a "true partial voltage" to each LED in the time you need to scan across them to keep persistence of vision intact.

Not that I know what you did and how you did it, but that's probably not what happened. More likely the PWM is not synchronized to the display multiplexing, causing no end to flicker. It could work (maybe) if if the PWM frequency was "really fast", compared to the display multiplexing, AND if the frequency difference is not within something visually noticeable (again causing flicker).

But that's not how it's normally done. To multiplex PWM signals, they should be syncronized to the display. IE make your own PWM multiplexing, don't use the built-in PWM (unless you can sync it somehow).

Quote
Now, my next goal is to use a D-to-A converter to send the true voltages to the 4051. That should clear that up (by circumventing PWM at the cost of using more digital lines for the d-to-a) and allow me to get shades of "grey" on my matrix.

Ok, I'm not saying using some DAC scheme to make different shades of LED light is impossible, but I would say it is "not likely"! That is an unusual, or rather impractical way to dim LEDs because it is difficult to get right (as in linearly increasing light output with each DAC step). For one thing a LED is not linear. Even if the light output might be somewhat linear to the electric current through it (but probably not quite, which further complicates matter, depending on the LED of course), the voltage-current relationship is not. It is like a typical diode curve with a threshold voltage to turn it on. Also, given small differences in this threshold region between "identical" LEDs, it would be difficult indeed to get multiple LEDs evenly lit.

In other words, while it might be easy(ish) to get it from the brightest to more dim, I imagine the hardest part would be from that "more dim" point to to completely off (if that made any sense).

I would suggest you start with a "simple" 8x8 display before you tackle an 8x8x8 one, especially if you want gray shades. Btw, imho it is very feasible on the 8x8, to a point, I doubt it is on an 8x8x8.


EDIT: It's not that I don't think one can't get any PWM steps in an 8³ cube, I just doubt one can get very many.

Go Up