320 LEDs controlled by Arduinos Uno & Sparkfun 74H595 breakout

Thread Starter

allenpitts

Joined Feb 26, 2011
162
Shift_Register_breakout_to_transistors_160727.gif Hello AAC forum,

Had an idea for a linear LED display project that
would turn on 320 LEDs one at a time then
turn them all of at once and then relight
them one at a time using an Arduino Uno
as a controller.

Started with the Max7219 but the IC
is designed to operate an 8x8 matrix
or a seven segment display and the
breakout to a linear geometry was
a rat's nest nightmare.

Then the SparkFun 74H595 Shift
Register Breakout board (BOB-10680)
was fgound which provided a more linear array.
The article that was the catalyst
http://bildr.org/2011/08/74hc595-breakout-arduino/
which talks about "1000 of these chained together".
But the article was misunderstood.
The daisy-chained Sparkfun Breakout boards
can control hundreds of LEDs
but it can only turn on a dozen
or so at one time.

The specs on the 3mm LEDs say they draw
20mA per diode.

The spec sheet on the Arduino lists
the ampereage output for the 3 volt
supply at 50 mA but does not list amps
for the 5v supply. But some digging
around on the forum reveals that
a safe limit is about 450 mA.
The 3mm LEDs used in the project
draw 20mA. So if my math is correct
I can have 22 LEDs on at a time.

Hoping to decrease the amps
required to control the LEDs
and increase the number of diodes
that could be controlled the idea of having
the breakout board control transistors
that supply hight voltage/amperage
was envisioned and design for such
an araangement is displayed herewith.

If the datatsheets for the transistors
is read correctly the current needed
to turn on the transistor is
2N3904 .1 mA 1v
BC108 2 mA 5v
BC182 2 mA 5v
BC548 2 mA 5v
I beleievev that with any of these transistors R1
could be fairly low like 100 ohms.
Is there a transistor that takes
less current to be come saturated?

Assuming these ideas hold true then
the design of the circuit controlled by the
breakout boards is the focus.

Again the LEDs draw 20mA per unit.
If the the display is 320 LEDS that
is 6400 mA or 6.4 amps. Is that right?
I see some power supplies up around 5 amps
but not any at 6 amps.
What is the method for calculating R2
and the voltage and amperage of the
LED power supply?

Thanks.

Allen Pitts, Dallas Texas
 
Last edited:

Sensacell

Joined Jun 19, 2012
3,420
Does the breakout board output 5 V or 3.3 V logic levels?

If it's 3.3V, the circuit might only work with RED LED's.

This is not a great circuit design for the task, the led current is very dependent on the type of LED used (LED Vf variations)

For sure you want to run this from a high-current external power supply.
The voltage should not be too high, this will make the driver dissipate (waste) more power.
 
Last edited:

takao21203

Joined Apr 28, 2012
3,702
such calculations are not of much use since the real behaviour will be different.

Large numbers of hc595 buffers will create supply rail problems.

Also mind a typical LED has about 20 Ohms internal resistance.

Ive used 16f59 PICs to drive 100 LEDs or so at once, and archieved 16 possible brightness levels via software (at 20 MHz).

The Maxim ICs cant control brightness of individual LEDs.
Theres also TM1637 TM1638 (Titan Micro) LED driver IC.

When using PICs ive ended up with roughly 1 Amp for 768 LEDs including the controllers.
So on average, the LEDs dont burn even at full 5 volts.

Instead of BJTs you could use digital MOSFETs, dont need gate resistors.
Such as FDV301 or FDV303, BSS138 2N7002
 

Attachments

takao21203

Joined Apr 28, 2012
3,702
Does the breakout board output 5 V or 3.3 V logic levels?

If it's 3.3V, the circuit might only work with RED LED's.

This is not a great circuit design for the task, the led current is very dependent on the type of LED used (LED Vf variations)

For sure you want to run this from a high-current external power supply.
The voltage should not be too high, this will make the driver dissipate (waste) more power.
Do you speak from experience? Ive powered 768 LED array using a small 12V 1A wall adapter, stepping down the voltage, so the available current is more than 1A. Nothing turned hot, neither the wall adapter, switching regulator, or controller ICs.
 

Sensacell

Joined Jun 19, 2012
3,420
Assuming you want to drive the LEDs with 20 mA (a totally reasonable current) and they must be independent,
you will have a max supply current of 320 X .02 = 6.4 Amps.
The LEDs themselves consume about 36 mW (assuming a red LED) per channel, for a total of 11.5 Watts.
If you run this contraption from 12 VDC, the total power consumption will be 76.8 Watts, a huge hot mess of wasted power.

The key is to optimize the supply voltage to the minimum that still provides a reasonable overhead of voltage for the current regulating mechanism to function well.

For example, the same setup running from 5 VDC would burn 6.4A X 5v = 32 Watts, much better.

You can always run the LED's at lower current levels, or stack them in series to use less power, but series connected LEDs are not independently controllable.

This example assumes the correct driver components are chosen to maintain the 20 mA current level in either case.
 

Thread Starter

allenpitts

Joined Feb 26, 2011
162
Hello AAC,

Thanks to taka021203 for the excellent reply. I have looked into the MOSFET enhancement mode transistors. I believe what was learned is the MOSFET devices are controlled by voltage, not current and therefore a lot more of the MOSFETS can be operated by the same power source.

Question: There are several specifications on the datasheets. I think the one I am looking for to see how much power is needed at the Gate to turn on the connection between the Source and the Drain is the 'Gate Threshold Voltage' Is that right? If not which spec should be heeded?
On the 2N7000 datasheet, attached herewith, at 'Electrical Characteristics' at 'ON CHARACTERISTICS' it lists the Gate Threshold Voltage as Min:0.8 V; Typ 2.1 V; and Max 3 V. So I think that means when the Gate gets more than .8 volts and less than 3 volts the connection between the Source and the Drain is made. I think.

The The 2N7000 by Fairchild looks like the best bet because I will be working with prototype boards and the TO-92 package is preferred. I believe the TN0106 by Microchip Technology or the ZVN4206A by Diodes Inc might also work.
I understand now that 'real behavior' will rely more on empiricism than on deductive calculations. Was trying to reduce the investment in time and money. But many times a pilot prototype was built to operate one or two elements as a prelude to expanding the operation to dozens or hundreds of elements only to find out that the logic used in the prototype was not applicable to an upscaled version because of manufacturing tolerances are some other variable or variables.

Will advise of builds and tests.

Allen Pitts, Dallas Texas
 

Attachments

takao21203

Joined Apr 28, 2012
3,702
You have two different regions of conduction.

At first the resistance decreases fast, then over the larger second region only some 25% or so.

smaller gate voltage results in higher ON resistance.

So you could have 80 milliohms chip resistance,
and somewhere at lower gate voltage maybe 130 milliohms

The gate has some charge so it takes a small amount of time to bring it to full voltage. The device does not conduct fully due to time required to build up gate charge, and there are propagation delays too.

If the voltage increase is too large in a too fast time, the chip can be damaged.

Like if you build up a static voltage slowly from zero to 3000 volts theres no damage, but it happens when it suddenly discharges in some microseconds.
 
Last edited:
Top