I might read the datasheet for the chip
to see how it works but building one
doesn't seem much fun (to me). There's
not much leeway to let your imagination
run wild.
It's also not really something you can
show to people or put on your desk.
To a point. I've done some interesting graphics stuff before, and if I
could put it into a little device that plugs into the TV, that might be
enough. Arduino might not be powerful enough for the effects I'm think
of, but maybe it will be. Otherwise I'm going to have to build my own
ARM computer to show off ;-)
Anybody remember the "Demo scene" in the late 80's early 90's? Those are
the kinds of things I'm thinking of. Simple "fire" and "plasma" effects.
Did you enjoy it? Time to ramp it up!
Yep, it was exciting. It was really the first thing I did on my own
without any guidance (after "make a single LED blink).
I've got one of these planned as soon
as I get some free time. I already
bought some parts, including an SD
card shield to store the light sequence
files.
Storing light sequences? Why not generate them real-time? That's the fun
part, for me ;-) 8x8x8 is only 512 values. Even if you have some sort
of dimming ability, you probably only need a few bits worth to support
that. Manipulating that number of bits shouldn't take so much processor
time that you would need to precalculate entire sequences. Maybe a
quarter sine table, if you need that kind of curve. Floating-point ops
tend to be the killer, but you can do a lot with just integers, if you
know a few tricks.
I'm going to start with 4x4x4
and aim for 8x8x8 when I figure out
how LEDs interact with the human eye
(they have to be multiplexed).
The LEDs don't interact with the human eye, they only act upon it.
Unless you smash your face into the LED cube, but I wouldn't recommend
that
Please take the following with the caveat that I've never built anything
like this, so this is all from theory and math, and experience with
computer animation, not electronics.
If you refresh the entire display somewhere between 24hz and 60hz, you
would get a decent persistence-of-vision. If you wanted to reduce the
effect of reference-frame shifts (people moving or the device moving),
you could bump that up. Also, if you wanted to have N levels of
intensities, one approach would be to refresh N times faster, and have
that LED be on "x" number of "frames" and off "x-N" number of frames.
That's similar to PWM.
So, if you multiplexed in a way that turned on exactly one LED at a
time, you'd have to update 8x8x8 (512) per frame. If you had only
on/off, and wanted a 60hz refresh rate, you'd need to update points at
30.72kilohertz. If you wanted 4 levels of intensity, you'd need 122.88khz.
Of course, if you controlled 8 leds in parallel, you could reduce that
rate by a factor of 8. which would be 15.36khz. That means you have 65
microseconds to choose values for that particular 8 led pairs.
If I'm doing my math right, that gives you 260 instructions on a 4mhz
processor to set the values how you want. If you only have a 4x4x4 cube,
you have an 2083 instructions.
Does all this seem correct?
I've read through an Instructables 8x8x8 cube guide. This was before I
had any practical experience (not that I have a lot now). I recall
thinking their driver circuit was overly complex for not having PWM
support. Maybe they intended that to be software, but they didn't
discuss it at all.
On a related note of obtaining LEDs... You might already know this, but
you can get batches of 1000 LEDs on ebay pretty cheap. red, green, and
yellow seem to be right around $10, where blue and uv are $20-$30. 1000
is enough for a 32x31 display, with a few spares. It is also enough for
a 10x10x10 cube of course, if you don't have any defective parts ;-).
You can *almost* built 2 8x8x8 cubes, you'd be 24 short.
Get hold of a 14 segment display...?
I suppose I could do that. I think I'd rather move on to matrix
displays. If I need to render only characters, I'll probably just buy
an LCD character display or something.