[dorkbotdc-blabber] Re: LED Cube Workshop - use an Arduino?

R. Mark Adams, Ph.D. rmadams at epotential.com
Sun Dec 9 10:56:33 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter hit what I was thinking of at first right off the bat.  For
driving the LED cube directly from the Arduino, I was thinking the same
thing, and assuming (as it looked like Peter did) that the Arduino pins
can sink the current from each level, which based on the datasheets, it
should.  The software is actually very simple- my only concern is that
it can run fast enough to preserve the POV illusion.  Hence whu I wanted
to build one and try it out. :-)

What I got to thinking, though, was if we could set the cubes up to
dynamically 'draw' the last pattern, recieved by the serial port on the
chip.  If we can do that, and set up each Arduino to filter their
"block" of the code and then pass it along out a serial port, we could
"daisy-chain" all the blocks up and (potentially) address each one
independently from a controlling computer.  Everyone could make their
own that can draw patters on from stuff sent up the serial port (perhaps
with a default pattern for when it is started up unattached.)  I am
thinking a simple ASCII-based language for sending the patterns would
let us hooke up as many as we can get up to MAX or pd or even python for
some very cool visualizations.

There should be enough pins on the Arduino to do this without any fancy
multiplexing schemes- 12 outputs for the LEDs and the 'usb' port as
serial input.  The trick is how to get the serial _output_ to cascade
from one board to the next.  I have a couple of ideas, but I need more
then the one Arduino board I have right now to try it out...

I don't think this should be too hard to do, but we need to make a
couple of test units to give it a try.  Anyone up for a 'hack-a-thon'
sometime before the next Dorkbot?  Perhaps between Christmas and New
Years, when work is somewhat quiet?

- -Mark


Peter S. May wrote:
> R. Mark Adams, Ph.D. wrote:
> 
>>Okay-  I think I have a way to get the Arduino to run the LEDs without
>>needing anything fancy (read shift registers, etc.)  Now I need a way to
>>test it, and I do not have enough LEDs.  Someone (Tim?) had mentioned
>>that they buy LEDs on ebay and have good luck doing so- any suggestions
>>as to a vendor, delivery time and price?  I figured it might be the best
>>way to get some quickly to we can test out our ideas!  :-)
>>
>>Thanks-
>>Mark
> 
> 
> I've so far had decent luck buying LEDs and certain other electronics
> items (CR2032 coin cells, for example) from the various China/Hong Kong
> (gray market?) sellers.  It just happens that both LED orders I've
> placed came from giorgio11185, aka "Asia Engineer".  No complaints so
> far, other than the 17-20 days it takes to ship since it's not domestic,
> and at least in my experience 12 cents shipped (lot of 100) is a good
> price for a high-brightness white LED.  Some come with free resistors;
> see the auction description if you want to ask for resistors adjusted
> for 5V (the default is often 12V).
> 
> Your mileage may vary, but for me it's been unproblematic and worth the
> wait.
> 
> (As with any LED, take note of both spot brightness (mcd) and viewing
> angle (degrees) when picking one out.)
> 
> 
> Incidentally, what is this way you have to drive the LEDs "without
> needing anything fancy"?  Is it different than the multiplexing method
> used by Bre and Mitch?
> 
> Getting pedantic for the benefit of the unaware, so please skip with my
> apologies if this doesn't include you. :-)
> 
> Somebody who's done the Make version of this project, please tell me if
> the following description is correct--I took a look at the PDF for the
> Make mod of MiniPOV for the 3x3x3 cube, and it wasn't trivial to decode.
>  But from what I can tell they took the 8 LED outputs already on the
> kit, added one more by sticking a resistor onto one of the other I/O
> pins, and then implemented the multiplexing by using three more of the
> I/Os as a ground select.  The result looks a bit like the following
> ASCIImatic:
> 
> .               (X,Y,TOP)
> . XY ---/\/\--+->|-------------------- /TOP
> .             |    (X,Y,MID)
> .             +----->|---------------- /MID
> .             |        (X,Y,BOT)
> .             +--------->|------------ /BOT
> 
> Where XY is _each_ of
> 
> . NW N0 NE
> . 0W 00 0E
> . SW S0 SE
> 
> It's wired up such that all LEDs of a given Z share a cathode and all
> LEDs of a given XY share an anode.  That adds up to 12 I/O pins (9 to
> select XY and 3 to select the Z layer) and 27 LEDs (one per X per Y per
> Z).  A given LED on the cube will be lit if and only if its anode (XY
> pin) is high and its cathode (Z pin) is low.
> 
> The firmware draws the pattern one Z layer at a time by, for example,
> setting all Z pins high to clear, setting the XY pins to the desired
> pattern, and then setting the desired Z pin low.  By cycling through the
> layers faster than the viewer's flicker threshold, it appears that all
> layers are being drawn at the same time.
> 
> So, assuming the above is true, as long as the Arduino has 12 available
> outputs it can pull the same trick.
> 
> More garbage on this topic in the PS.
> 
> Was this what you had in mind?  If not, what?
> 
> Word
> PSM
> 
> 
> 
> Post Scriptum:
> 
> This is me getting (even more) carried away...
> 
> There's even a means of addressing 3x3x3 = 27 LEDs (or as many as 30)
> using only 6 pins, as long as each one is tri-state-able.  But this
> method can typically only address one LED at a time (as opposed to one
> layer) and it majorly complicates the firmware.  (See also
> "Charlieplexing".)
> 
> An unrelated project I have going on is a little heavy duty for any sort
> of multiplexing and instead uses a small fleet of 74HC595 shift
> registers.  For an immense number of LEDs (over 60 in my case) it's a
> bit more straightforward and can use as few as 3 pins for an arbitrarily
> large number of LEDs--as long as you buy one 74HC595 for every 8 LEDs.
> ........................................................................
> .......dorkbot dc: people doing strange things with electricity.........
> ................... http://dorkbot.org/dorkbotdc .......................
> ........................................................................
> 
> 

- --
|                            |   "Information is light.      |
| R. Mark Adams, Ph.D.       |    Information in itself,     |
| Computational Biologist    |    about anything, is light." |
| rmadams at epotential.com     |       - Tom Stoppard          |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFHXBAx5rQGeNhqYzcRAj8YAJwPVOcM1qTjtbqrYVJiSdLChyefSQCbBcl7
oR1lJFdEBGOMf0UVyKST1Yo=
=nWT3
-----END PGP SIGNATURE-----


More information about the dorkbotdc-blabber mailing list