J
Jollino
Hello,
apologies if this question is very stupid.
I have been toying with electronics for a little while, but I know I
lack some basic knowledge to wrap everything up together so... here is
my doubt.
I am designing some Christmas decoration with a bunch of LEDs driven by
an array of 74HC595s (controlled by an ATtiny45). The whole thing will be
I did something similar in the past, using three 595s to control three
7-segment LED displays, but I did it fairly randomly: I just connected
each output to each segment, with a resistor between the two.
Since this thing I'm planning to do is going to be simple yet much
bigger -- involving twelve 595s -- I'd like to do things properly.
The 96 LEDs could and probably will be all on at some point, so
considering a current draw of 15 mA for each LED, the whole thing would
draw a total of about 15 A, which is pretty much impossible to handle.
Correct? I will probably have to investigate charlieplexing to such a
big scale, or maybe make it so the 595s are working one by one at a fast
rate (by pushing a series of logic zeros down the data line).
In any case, let's assume for the sake of the example that I want to be
able to drive eight LEDs with a single 595. The datasheet tells me that
the maximum current load on each output pin is 35 mA, and the current
load on the supply pins (Vcc and ground) is 70 mA. I am not sure how to
interpret this: does it mean that the sum of the output currents can't
be more than 70 mA?
If that is the case, I suppose that I could use transistors. Would
connecting each output to the base of an NPN and the LED (with a series
resistor) between Vcc and the emitter work?
Also, I'd like to finally understand whether it's better to source
current from a pin or sink current into a pin. I would think that
sourcing is "cleaner" because one doesn't "overdo" the chip -- if the
current is not enough, it simply doesn't work -- but I'm not sure about
that at all, because on many schematics I have seen LEDs sinking into
MCUs' ports.
Thank you in advance, and apologies again if I sound like an airhead.
When it comes to these things, well... I am!
apologies if this question is very stupid.
I have been toying with electronics for a little while, but I know I
lack some basic knowledge to wrap everything up together so... here is
my doubt.
I am designing some Christmas decoration with a bunch of LEDs driven by
an array of 74HC595s (controlled by an ATtiny45). The whole thing will be
I did something similar in the past, using three 595s to control three
7-segment LED displays, but I did it fairly randomly: I just connected
each output to each segment, with a resistor between the two.
Since this thing I'm planning to do is going to be simple yet much
bigger -- involving twelve 595s -- I'd like to do things properly.
The 96 LEDs could and probably will be all on at some point, so
considering a current draw of 15 mA for each LED, the whole thing would
draw a total of about 15 A, which is pretty much impossible to handle.
Correct? I will probably have to investigate charlieplexing to such a
big scale, or maybe make it so the 595s are working one by one at a fast
rate (by pushing a series of logic zeros down the data line).
In any case, let's assume for the sake of the example that I want to be
able to drive eight LEDs with a single 595. The datasheet tells me that
the maximum current load on each output pin is 35 mA, and the current
load on the supply pins (Vcc and ground) is 70 mA. I am not sure how to
interpret this: does it mean that the sum of the output currents can't
be more than 70 mA?
If that is the case, I suppose that I could use transistors. Would
connecting each output to the base of an NPN and the LED (with a series
resistor) between Vcc and the emitter work?
Also, I'd like to finally understand whether it's better to source
current from a pin or sink current into a pin. I would think that
sourcing is "cleaner" because one doesn't "overdo" the chip -- if the
current is not enough, it simply doesn't work -- but I'm not sure about
that at all, because on many schematics I have seen LEDs sinking into
MCUs' ports.
Thank you in advance, and apologies again if I sound like an airhead.
When it comes to these things, well... I am!