Paul Makepeace ;-)

March 9, 2008

High power darlington array

Posted in: Tech

What's an easy way of driving a ton of LEDs? Unfortunately the the Arduino boards can only sink or source about 40mA on each pin, which is enough to drive a few LEDs at most.

Here's how to drive up to eight LED clusters or other high current device off a single, cheap 18-pin IC with no extra components.

The typical solution to drive higher currents is to use the computer (in our case, an Arduino board) to provide the signal, i.e. small current, to a transistor that bears the brunt of switching the lights. The transistor requires a, say 3Kohm, base current limiting resistor and the collector-emitter line requires a resistor too (which you would've needed with the LED anyway). If you have a number of LED clusters to drive you end up having a fair bit of extra componentry to deal with = more soldering/breadboarding.

It turns out someone's thought of this already and produced a handy IC that contains a bunch of these transistor circuits. The doodad in question is a €1.15 ULN2803A darlington pair array [datasheet]. Page 4 of the datasheet, figure 1a has an example circuit.

How these work: The left side of these chips are the input (pins 1-8) and the right side are the ouputs (pins 10-17). Pin 9 is the ground, pin 18 the common +V. Connect your +5V to your load, e.g. LED cluster + appropriate resistor (e.g. 20ohm for ~8 LEDs), and connect the cathode (-V) end of that circuit to an output pin. The darlington circuit acts as a sink. Here's the circuit,

From Darlington pairs driving LED clusters

Each darlington circuit can sink 500mA (peak 600mA) and they can be wired in parallel so e.g. connecting two can drive a 1A load.

The example here is using the included Fade demo sketch with an extra write to another pin to flip one cluster one and off just to demonstrate the circuit doing two things. Note how the LED clusters have a common +V and they source separately into different outputs via the small resistors.

Posted by Paul Makepeace at March 9, 2008 12:24 | TrackBack

I've been really liking the PCA9532 LED drivers, controlled off a Picaxe using the i2c bus, 16 outputs at 20 mA each, 200 mA total rating, and does all the PWM for you.

Does require surface mount soldering, but I've found that less hard than some people make it out to be.

Oh yeah, I'm working on something...

Posted by: Jez Weston at April 8, 2008 06:51

That's a very nice, simple solution.

Would it be possible to use the Darlingtons as a power source instead of sink?
There's no example of this in the datasheet...

Other devices, such as the 6800, also describe sinking but not sourcing.

I'm looking for a way to drive LED arrays with a TLC5940 driver, which is itself a sink. I need 5 or 10 sources that are switched on/off in sequence to multiplex the TLC. Since each line must drive up to 16 leds the Arduino output is just not enough. Any ideas?

Posted by: marser at April 15, 2009 16:10

Hi marser, have you looked into a UDN2981? Couple of those should source 16 LEDs.

Posted by: Paul Makepeace at April 15, 2009 16:52

Hi - I am a computer science student taking a class in wireless sensor networks. We are programming Sun SPOTs. For my project, we are creating an autonomous glockenspiel - that is, we're using SPOTs to control solenoids which will percuss on the instrument, using midi as input. We have not had much hands-on electronics experience, so this guide was quite helpful in helping us understand how our darlington works (which we are using because of the flyback diode on pin 18 - it protects our circuit from the solenoid's back emf.)

Thanks so much for posting!

Posted by: Jay at April 12, 2010 05:09
Post a comment

Remember personal info?