3x9 LED Matrix direct driven?

Hy,
I wanne build a 3x3x3 LED cube, but I first want to check my programm (not yet written). Can I drive 27 LED’s directly with the Arduino Uno in this way? Picture Below.

Thanks
Robohac

3d_Cdadadube_Schaltplan.jpg

Yes, that is exactly how I would wire them. Driving them directly off 5v logic signals without current dropping resistors might be a problem if you were going to have any one LED on for more than a few milliseconds at a time.

should there be 3 Resistors for safety? and which resistance should they have? (I am using standard 5mm red)

5V-1,9V = 3,1V R = 3,1V /20mA = 3,1/0,02 V/A = [u]155 Ohm[/u]

Is that right?

I directly drove a red LED 4-digit 7-segment display directly without problems. Each digit was lit for 2 mS. The display was running for two days straight without problems. I suspect if you put in the dropping resistors you would end up with a dim display.

If you want to put in the resistors the calculation is correct but you would need 9 of them, one per 'column', because each column only has one LED on at a time but each 'row' might have more than one 'column' lit.

Wouldn't one possibly get problems when Leds are driven for longer as a few mS ? While testing/programming, they could... be lit much longer. 9 leds on, sinked by one pin seems a lot to me.

A circuit I've used came from Ledstyles.de, it's in German, non C++ and it uses a smaller brother, the attiny2313. It uses 3 transistors to sink the current, but the rest... is basically the same. :D

http://www.ledstyles.de/index.php?page=Attachment&attachmentID=5162&h=14fd27d042c0853320f7f045e11838b113fe8373

Link to the complete article : http://www.ledstyles.de/fpost99870.html#post99870