Transistor / MOSFET selection help... calculations

Thread Starter


Joined Sep 30, 2013
I'd really appreciate some guidance here. I've tried to work this out, but I'm not confident I've worked it out correctly, or that I'm reading the graphs on the datasheets right...

I have a PIC with outputs that I want to drive chains of RGB LEDs. I've have a 5m long RGB LED strip that uses a common +12V line, and a separate GND connection for the R, G and B.

I intend to slice this up into several pieces, and would like to be able to drive them individually from the PIC.

I've been successful driving the whole chain using PWM and three IRL520 MOSFETS... but to do what I want with those alone would mean a lot of MOSFETs and the price quickly adds up... plus I think it may be overkill anyway.

So, what I'm thinking is using darlington transistor arrays on a chip to control the sections, and then MOSFETS for the PWM at the end.

My thinking so far...

I don't know what the spec of the RGB-LEDs is, however I do know that the 5m chain needs a 5A power supply. That's 1A per meter, or alternatively 1.667A per colour.

The PIC I'm using has 36 I/O pins (PIC16F1789).

I intend to slice the strip into 8 pieces, requiring 24 channels (8R, 8G, 8B).
I then intend to use 3 channels to control PWM (the intent being to have the colour universal across the strip, but sections individually on or off in time with the music).

Total: 27 channels - well within the 35 I have, so that leaves some for the audio data to be input.

1.667A / 8 slices = 0.208A per slice (say 210mA)

This means each transistor array needs to be switching 210mA on and off. The MOSFETS need to be switching 1.667A on and off quickly (PWM).

The PIC outputs +5V on its logic outputs. It says it can drive up to 25mA per channel, but it also specifies max 340mA on the Vss/Vdd pins, so I'm inclined to think it safer to split that between the pins... hence I am working on the assumption 10mA per pin max to drive things.

I've found the ULN2803A Darlington Transistor Array

Assuming I'm reading that right, it's up to 500mA per channel with 8 channels, which is more than enough for my 210mA requirement. However... if I'm reading the graph correctly, I need to feed 50mA in to get 210mA out!? Surely that should be nearer 50uA in to get 210mA out!?

Assuming it is 50uA (which I'm nervous about), then even if the PIC outputs 4.5V, I need a resistor... or can I feed that chip direct?
V=IR, so R=V/I
R=4.5V / 0.00005A = 90'000 (90k), so I could even use a 50k resistor and be fine.

...have I lost my marbles? I'm sure I'm going wrong somewhere.


Joined Oct 2, 2009
Ii(on) is 1.35mA, at the same time Vi(on) = 3.0V. A Pic (operated off 5.0V) pin will do that without breaking a sweat.

Further more, the data sheet says this:

The ULN2803A has a series base resistor to each Darlington pair, thus allowing
operation directly with TTL or CMOS operating at supply voltages of 5.0 V or 3.3 V.

For the total current:

Total substrate-terminal current –2.5 A

I assume that means out of the COM pin

Last edited:


Joined Jul 18, 2013
The base resistor should limit the load current to under 18microamps. The number of outputs on at a single time is governed by the thermal dissipation, formula supplied in the data sheet.

Thread Starter


Joined Sep 30, 2013
You only need to connect COM if you're using the flyback diode and inductive loads. I don't think I am as it's just LEDs. I'd assume the total 2.5A is out of the GND (which will actually be going to my MOSFET).

"The base resistor should limit the load current to under 18microamps."

If I'm pushing the transistor into saturation to use it as a switch, then that will always be the case, wont it? I thought those calculations in the data sheet only applied to inductive loads (coils), which I'm not using...?