5*5*5 LED cube and Arduino Mega

Hi,

I have recently started building my first 555 LED cube and so far, I have finished soldering the LEDs. Now I am trying to connect it to my Arduino Mega but after I read about using transistors to connect it, I am worried that connecting directly to its pins might harm the arudino. I realized that currents flowing out from the layers add up so given my LEDs take 20 mA each, it will for sure exceed the individual pin's 40 mA limit. Therefore, I would be really grateful if anyone could help me connecting it together. I have 25 anode columns powered thru resistors from my arudino but without any transistors.(I read this should be okay). This works even though the 5 LEDs in each column should consume 5*20 mA, the entire column shines, maybe less but this works. Is this OK?

On the other hand, it seems almost certain that I cannot connect the 5 cathode wires, one from each layer, directly to arudino pins and define them as GND bcs the current sum is just too much. I bought some UNL 2803 to fix this, am I right about this? Also, could anyone help me connecting the transistor array as I am not really sure. Collector to the layers, emitter to arudino?

Is this all I need to be able to start programming?

Thanks so much!
Mike

Hi, I am new to this forum, new to the arduino. Actually this is my first post here.
I am doing the same. Bought a arduino due... ehh 2009. Am just finished soldering a 3x3x3 to test my long-not-used skills.

Read this instructable:

Maybe it is a long article, but it addresses many things and also the things you ask for.

In simple words
If you addresses each vertical led column with a + you need to switch one layer to the -. In theory, it should switch 5x5x10mA os 625mA when all leds in one layer are on. That's way too much for the Arduino's I/O ports. You should use a transistor to do that.
So: if one particular LED should be on, his dedicated IO port should be high, PLUS "his" layer should be connected to 0. That will be done if you put HIGH on the base of the transistor.

In the instructable article, step 30 and the third "picture" you can see the transistors. Actually, they use 2 transistors per layer. Read it, it's very informative.
Great first project (for me).

Hi,

thank you! Now, I actually know how to it works and how to control it, at least I was told what has to be done to sink the layers with transistors. Personally, I am using a transistor array ULN 2803 which should be able to sink 500mA per channel(pin) or the whole layer(25*20mA). So 1 array should be enogh for the whole cube. What I dont know yet is whether I can power all 25 anodes(columns) with aruino pins only. One arduino pin can source up to 40mA whereas I need just 20mA per LED but in total, I need to draw 500mA which might/might not exceed its total current limit. Any ideas?

Yeah, I know the instructable, but I couldnt find that there.

Thanks, Mike

Without looking at the diagram or such like, there is a knee-jerk reaction to this question (which comes up again and again ...)

Always use a "driver" circuit for your LEDs (which can be as little as a single transistor) - unless it only is a handfull small indicator LEDs. You Arduino will stay with you longer. The current quoted are "absolute maximum" above which damage is likely to occur.

hi,
i'm new to this forum can give suggetion regarding 5*5 cube using arduino.?
i want code building.