[dorkbotdc-blabber] Re: LED Cube Workshop - use an Arduino?
Peter S. May
me at psmay.com
Sun Dec 9 13:41:28 EST 2007
R. Mark Adams, Ph.D. wrote:
> 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.
Let's examine that a little more closely, because it is too easy to
assume without scrutinizing the facts.
The Arduino's processing core is an ATmega168. The max DC current per
I/O pin is listed on its data sheet at 40.0mA. Normally a data sheet
will also specify both a max operating temperature (125 C for the '168)
and a thermal coefficient (in W/degC) by which one can determine the
total current possible through all pins, which is not simply max per pin
* number of pins.
Atmel hasn't provided the thermal coefficient, but has specified a max
current of 200.0mA for Vcc and GND. Since that current includes
anything sourced or sunk by the I/O, we can probably use it (after
subtracting what the chip itself uses. Also listed under "Notes" in the
spec is a bit about per-port current limitations.
In our case, the governing factor appears to be that, if we're using the
per-layer Z pin to sink, it has to be able to sink from up to 9 LEDs at
a time. From an engineering standpoint, you would thus not want to
drive each LED higher than about 4mA. Of course, the Maker philosophy
doesn't encourage paper-pushing, and in reality it will probably work
okay with higher current (though in the long run it's likely to fail
sooner if you do).
The nominal current of an LED is usually something like 20mA, but most
modern ones will produce acceptable output at around 2mA. My
understanding is that the nominal 20mA was set in the earlier days of
LEDs, when they were less efficient and required a significant current
just to be visible.
However, if we really wanted, for example, 10mA on each LED, a much
wiser idea would be to buffer each Z pin with a transistor (eg PN2222).
> 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'm not entirely sure what you're talking about here, but it may just be
a mistake in terminology. The 12-pin method _is_ multiplexing by
definition. A non-multiplexing method would require 27 pins...
But it kind of also sounds like you're trying to get more than one
Arduino in on this. If so...why? One ought to be enough for 3x3x3.
Speed probably isn't an issue because you'll get acceptable results with
a cycle of as low as about 60Hz--you could linger on each of the three
layers for as long as 5ms, which ought to be plenty of instructions
(order of 10K-100K) at Arduino's 16MHz clock.
As always, thanks for indulging
PSM
More information about the dorkbotdc-blabber
mailing list