Power queries

Hi there,

I'm interested in doing an LED matrix, such as a 4x4 and ultimately ending up with a 4x4 RGB matrix.

I've stumbled at power. My understanding is that each arduino pin can only supply up to 40mA, with the overall limit being 200mA. Is the 5V power pin subject to the same limits? Or is it subject to the limits of the power supply, ie. usb 500mA? I've read that the regulator is only rated for 800mA, so is it safe to use a wall-plug that's rated above this, such as 1A?

I've seen lots of people using HC595s to multiplex 8x8 matrices, but I've also read the limit per pin on the HC595 is 30mA, but overall for the unit 70mA.

My understanding is that only one row would ever be on at one time, so assuming 15mA per LED this would add up to 60mA per row for a 4x4, but 120mA for a 8x8. How are people doing this safely with the HC595? Especially with an RGB matrix, where the power requirements would be 3x.

Final question, I've seen occasionally that the rows are less bright than the columns, due to being in series rather than parallel. How do you get around this? I've read that resistors are on each individual LED, but when calculating resister values I stumbled: if the voltage drop across an LED is 2V, and your power supply is 5V, can you only use 2LEDs? Obviously not as people are using more, I unfortunately don't understand how.

I think I'm misunderstanding or ignorant of some basic building blocks here. I'd be very grateful for any help and apologies if this sounds like a mash of confusion!

Many thanks.

Kaph:
Hi there,

I'm interested in doing an LED matrix, such as a 4x4 and ultimately ending up with a 4x4 RGB matrix.

I've stumbled at power. My understanding is that each arduino pin can only supply up to 40mA, with the overall limit being 200mA. Is the 5V power pin subject to the same limits? Or is it subject to the limits of the power supply, ie. usb 500mA? I've read that the regulator is only rated for 800mA, so is it safe to use a wall-plug that's rated above this, such as 1A?

The regulator is bypassed if you're powering the Arduino via the USB connector.

That doesn't change the amount of current you can draw from a pin though, it's a limit of the chip, not the power supply.

Kaph:
I've seen lots of people using HC595s to multiplex 8x8 matrices, but I've also read the limit per pin on the HC595 is 30mA, but overall for the unit 70mA.

My understanding is that only one row would ever be on at one time, so assuming 15mA per LED this would add up to 60mA per row for a 4x4, but 120mA for a 8x8. How are people doing this safely with the HC595? Especially with an RGB matrix, where the power requirements would be 3x.

If they're using the HC595 they either aren't running at 15mA per LED or they're using multiple chips.

(Or they're running the chip outside spec, perfectly possible...)

Kaph:
Final question, I've seen occasionally that the rows are less bright than the columns, due to being in series rather than parallel.

That doesn't make sense. LED brightness is a function of how long it's switched on for. That should be the same for every LED.

Thanks for the help.

So from what you're saying, the 5V supply pin on the arduino, next to the 3V3 pin is subject to the same 40mA limit?

I think my confusion re: LED's is whether you consider them separately or not when calculating resister values. So if each one is eg. (5V-2V)/0.015, or for example two in a row is (5V-2V-2V)/0.030.

Again, I feel I'm misunderstanding some basics. Apologies for my ignorance, I've googled but nothing quite clarifies.

Kaph:
Thanks for the help.

So from what you're saying, the 5V supply pin on the arduino, next to the 3V3 pin is subject to the same 40mA limit?

No, only the Arduino I/O pins.

Kaph:
I think my confusion re: LED's is whether you consider them separately or not when calculating resister values. So if each one is eg. (5V-2V)/0.015, or for example two in a row is (5V-2V-2V)/0.030.

Again, I feel I'm misunderstanding some basics. Apologies for my ignorance, I've googled but nothing quite clarifies.

Each LED should have its own resistor...

OTOH for multiple LEDs it's far better to use an LED driver chip then mess around with resistors, especially for things like LED cubes where you want all the LEDs the same brightness.

Look at chips like the TLC5916, TLC5925, TLC5940, etc.

Kaph:
Thanks for the help.

So from what you're saying, the 5V supply pin on the arduino, next to the 3V3 pin is subject to the same 40mA limit?

No, it's limited by either the 500ma USB thermofuse or the maximum capacity of the on-board +5vdc voltage regulator.

I think my confusion re: LED's is whether you consider them separately or not when calculating resister values. So if each one is eg. (5V-2V)/0.015, or for example two in a row is (5V-2V-2V)/0.030.

Neither. Typically common leds are designed to run at 20ma of current. If you are wiring two leds in series and wiring them to a output pin with a single series current limiting resistor the the calculation would be resistor ohms = (5v-(2v+2v) / .020, If wiring just one led to an output pin then resistor ohms = (5v-2v) / .02,
Wiring two leds in parallel from a single output pin, each with their own series wired resistor would not to recommended as their total current draw together from the output pin would be 40ma which is absolute maximum rated safe value of a output pin and should be avoided. Best to limit total output pin current to
20-30ma range.

Again, I feel I'm misunderstanding some basics. Apologies for my ignorance, I've googled but nothing quite clarifies.
Hope my explanation helps.
Lefty