Single MCU output to Multiple ULN2004a inputs?

Thread Starter


Joined Mar 5, 2016
I'm working on an LED lighting project that uses several sets (3-6) of 4 LEDs each in series. In the past, I've used ULN2004a arrays to great effect, but each line needed to behave independently. For this project however, all the aforementioned sets of LEDs are either on or off.

My question is, can I use a single signal pin on MCU like an Atmega328 to drive multiple inputs on a ULN2004a? The fewer pins I use on the MCU, the better. I can't see anything on the datasheet that stands out to me as a no-go, but I've never been too good with the nuances of transistors.


Thread Starter


Joined Mar 5, 2016
hi Prop,
Check this clip from the d/s
How many input pins do you plan to drive from one MCU pin.?

Ideally, I'd want to drive at least 4 pins on the ULN2004a, but more would be nice.

I was scouring the d/s, but I just don't know which of that is pertinent to this specific issue. I prefer to limit my MCU i/o current to 20mA, but I don't think that should pose a problem.


Joined Sep 20, 2005
You could use 74HC595 to get however many outputs you want, and you need two threepins from the microcontroller at the least, three four could provide more predictable behavior on startup or with emc issues.


Joined Jul 1, 2009
@PropForge - IMHO Just keep input to the ULN at 1mA per pin- that provides noise-immunity and is more than enough current to make the transistor array work, per the datasheet. Whether parallel or series control of the input side, it means you only need 8mA to control the ULN2004 inputs. Keep your MCU J(th) as low as reasonably achievable (ALARA), it lets it run more smoothly, cooler, and allows more current to spread around to all the pins you want to use. Your MCU has a total limit of (perhaps) 40mA output on all pins simultaneously. Your datasheet will tell you, Just bare that in mind.


Joined Dec 2, 2017
I don't think it's possible to drive a ULN2004A input pin @ 1mA @ 5 volts. (built in 10.5 k resistor)

Also depending on the drive current needed for the LEDs, you might want to use the ULN2003A instead.


Joined Jun 5, 2013
If you don’t need separate outputs, why use the ULN? A single MOSFET could drive them all. You do need a logic level MOSFET though.



Joined Jun 8, 2013
You could also use a mosfet array to drive the LEDs. Its the same as the ULN2004 but has mosfets instead of BJTs.
Then no need to worry about arduino i/o output drive capacity.

Thread Starter


Joined Mar 5, 2016
Remember... The ULN2004A is NOT TTL compatable... The ULN2003A is.. You need @ 7v to trigger the ULN2004A.
Thanks for that catch; it should have been a 2003, but I've been soldering so many 2004s, I brain-farted.

I've actually found a different way to deal with these LEDs that will actually simplify the mechanical design of this circuit.

On the subject of ULN2003s, however, another question.

My overall design requires driving a pair of small 6V motors for brief periods of time, rated at 200mA maximum draw. Prior designs I experimented with used PN2222 and diode to drive small motors with an Arduino, but considering the characteristics of the ULN2003A IC, can I just use it instead (of the PN2222 and diode)?

Thread Starter


Joined Mar 5, 2016
The ULN2803a is better for inductive loads and has a 500mA collector current on each pair.. This would be my choice.

Well, I have a few spare pins on a ULN2003 I'm using for LEDs. Is there any issue using a ULN2803 for LEDs? I'm not seeing anything in the 2803 datasheet that stands out as a no-go, and the extra cost is acceptable.

Ian Rogers

Joined Dec 12, 2012
LED's take a tiny current.. The 2003a has 250mA outputs... The 2803 is around 40 pence dearer for the extra 250mA loading.

You don't even need a ULN to drive an LED Most LED's are very visible at 7~10mA which can be a simple buffer.