Hello,
I bought a Arduino Mega to build a LED Cube. I plan to multiplex the Cube. I attached a circuit layout (I plan a 555 layout but it should be the same).
https://cccgoe.de/w/images/b/bf/Cube-structure-06.png
My question is,which resistor do i need (LED: 20mA ;50mA max, 3.2-3.4V Blue)? I calculated 90 Ohm, but I checked my result with a online calculator and it said that 5V(Vcc) will not be enought to power 5 LEDs (One row).
I thought it doesn't matter because of the multiplexing there will be only one LED shining at the same time. What do you think? Will it be possible to light up 125 LEDs at the same time with the multiplexing? Because each LED is just blinking and if there will be to many LEDs the frequency will drop and you can see the blinking.
I planed to make the code like this (Pseudocode):
Turnon(LED1);
Wait(shortTime);
Turnof(LED1);
Turnon(LED2);
Wait(shortTime);
Turnof(LED2);
...
Thanks for your help
The calculator assumed you meant you have 5 LEDs in series. Tell it you have only 1 LED on 5V. That will give you the right value for your 25 resistors. Your 5 'common' pins will need a lot of current capability. Since you can have 25 lights at a time all drawing 20 mA you will need 500 mA of current on each common. Easiest way is to make the common pins the Cathodes (negative). Then you can use an NPN transistor for each of the 5 commons.
Ok so should I use 5 transistors with at least 500mA Collector-Emiter current for each layer of the cube (all Cathodes on one layer are connectet). Do I have to use transistors for each column or is it ok to drive them with the Arduino pins? Can I power the hole thing via USB? The USB connection should be able to deliver 500mA. And what is about the brightness, if I use multiplexing I will power up only one LED at a time, but this will result that a LED is only 1/125 of the time powerd. Will they be very dark?
The LEDs draw 20 mA each. Individual Arduino output can handle 20 mA with no problem. Unfortunately there is a maximum limit for all pins combined. For the ATmega2560 it's 200 mA. That means no more than 10 LEDs at a time without external drivers.
I think most of the larger cubes use shift registers for output pin expansion. You might want to consider that.