56 leds - 7 shift registers - how to power them?

hello, i am new to the arduino, although i have quite an experience in programming
i have been reading a lot of threads but it only got me more confused

i have an arduino uno, 7 74hc595 and 56 common 20mA leds
i am building something similar to an equalizer that has 7 rows with 8 leds each
each row will be controlled by each shift register

a lot of leds will be powered simultaneously(worst case scenario all 56 of them), so my problem is, how can i give them the proper power, this is where i am really lost
can i power them with a usb cable from the pc (and another for the arduino)?
ideally, can i have one power source for both arduino and the leds?

thanks in advance, cheers!

74HC595 can't drive 20x8 = 160 mA, you need much less power than you assuming, The highest I've seen is about 70mA, so usb power line should be fine in 5xx mA area

56 LEDs 20mA = 1.12A. Sink current thru them with TPIC6B595 shift registers.
http://www.dipmicro.com/store/DCA-0520

do you mind explaining it a little? :cold_sweat:
i read at the datasheet of the register that it outputs +-70mA per pin
since i have one led per pin isn't it enough?
do i have to change my shift registers? i can't remember where but i think i have seen a tutorial that they build a led matrix with those registers

You could use an IC like this

http://www.ti.com/lit/ds/symlink/uln2803a.pdf

All your outputs are fed into the 2803 and then it sinks (I think been a while) your LEDs... you'll need a resistor on each led(led/string)

"i read at the datasheet of the register that it outputs +-70mA per pin"
No, that is 70mA for the Vcc and the Gnd pin.
The 8 IO pins share that 70mA - so 8-9mA per pin.

Here's the datasheet for NXP's 74HC595 chip: http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf, it says on page 6 that the output pins can source or sink a maximum of 0.35mA each, but the maximum current to the VCC or GND pins is only 0.7mA, so that limits the total current you can source or sink across all the output pins.

Different manufacturers' versions might vary, but I haven't seen much above 0.7mA total current either.

do i have to change my shift registers? i can't remember where but i think i have seen a tutorial that they build a led matrix with those registers

It all depends on lighting condition, where your leds matrix 'd be installed. Led's are quite bright with 10 mA in the indoors environment. 7 x 8 is only 15 pins, you may drive it's by UNO w/o shift registers, only ULN2803 for the columns. Other options MAX7219 or similar drivers.

since i have already ordered the shift registers, is there anything i can do with them the way i have thought of it?
would transistors be of any help?

this is the pattern how i want to light the leds with

ps. I am also reading this Shift registers and LED's - LEDs and Multiplexing - Arduino Forum and trying to understand

thanks for the help, sorry i am a noob :smiley: :smiley:

reading the above, have i got it right?

two 74hc595's and one ULN2803 is what is used in this

since i do column scan, max power that i have to give is for 8 leds, so 820mA = 160mA
each 74hc595 can max at ~70, so i can divide the column into 4 + 4 leds (4
20mA = 80mA) each to a different shift register
and the leds will run a little lower

so finally, two 74hc595's to control column leds and one 74hc595 with one ULN2803 to move the walking bit
can this be powered by the arduino itself, without an external power supply?

if i am saying bull***t please let me know :stuck_out_tongue_closed_eyes:
not that i don't know it already ]:smiley: ]:smiley:

Sure, you can split 8-bit in two groups 4 and 4, to keep a current close to "optimum" 20 mA. Only there is no optimum value, since you multiplexing leds, you already driving them not in the normal mode, where 20 mA is perfect. Multiplexing 8:1, you basicaly decreasing current by 8 times. and your 20 mA becomes 2.5 mA. But led isn't a resistor, where heat power directly proportional to current, perceptive brightness of the led only slightly deteriorates with multiplexing. You hardly notice a difference between one shift register and two, but on software side spliting in two groups may complicate things a lot. So it's up to you, there is no "perfect" solution. Even manufacturer of the IC like MAX and TLC are cheating in data sheets on real values

you got me a little confused here

Don't mean to. IMHO, there is two option:

  1. easy and cheap - 1 shift reg and 1 shift reg with ULN2803 - multiplexing solution.
  2. complex and costly - 7 shift reg + 7 ULN2803 - no multiplexing at all.
    Anything in between is just a game on couple cents, and make sense only in high volume production.
    BTW, over a year ago I build myself a project w/o multiplexing, to get full power from the leds:
    http://coolarduino.wordpress.com/2012/06/21/tears-of-rainbow/
    Today, I 'd replace 595 + ULN2803 by one TPIC6B595

reading about all the options from all the posts in this thread was really helpfull, i am starting to have some thing cleared out, first project and all were mixed in my head

i also ordered a max7219 i found cheap, so when all things arrive i am going to try all the possible ways to get some knowledge

cant wait to set house on fire :grin: :grin: :grin:

Buy a fire extinguisher then 8)