ULN2803 Limiting Current Problem

Thread Starter

RavenerAbnorm

Joined Sep 2, 2015
9
Hi,
I was testing a small circuit I had which I intend to recreate on a larger scale once I had the basics down.
It involves using a micro controller and a P channel MOSFET to switch an LED on. And to later add a ULN2803 to sink the current.
What I found weird is that by adding the ULN2803, the current to the LED drops significantly (20mA to 1mA). I am aware there is a voltage drop across the NPN transistor and that I did not change the value of the resistor value between adding the ULN2803 but the current supplied seems to be a constant 1mA making me believe that the ULN2803 is acting as a constant current device.

Can anyone shine some light on this and maybe how I can get the load current back to around 20mA?
Thanks
 

Attachments

Thread Starter

RavenerAbnorm

Joined Sep 2, 2015
9
Hi. Thanks for your reply. I originally had it on the output- but the LED did not light. So I thought I had it the wrong way around.
 

be80be

Joined Jul 5, 2008
2,072
Think you don't understand how a uln2803 works you hook the input side to your uC the led on the output side then too supply no need for MOSFET
 

blocco a spirale

Joined Jun 18, 2008
1,546
Hi. Thanks for your reply. I originally had it on the output- but the LED did not light. So I thought I had it the wrong way around.
The output of the ULN2803 is an open-collector so you must connect the anode side of the LED to +V and the cathode to the output (with a series resistor, of course).

And yes, the mosfet does appear to be redundant.
 

Thread Starter

RavenerAbnorm

Joined Sep 2, 2015
9
Thanks for the reply. I'm using the uln2803 and a mosfet to protect the micrcontroller from sourcing and sinking too much current so I think its the correct way.

I've since moved the LED to the output side. I've figured out my mistake. It was regarding the microcontroller software. Both outputs need to be driven high to turn it on - as the mosfet is P channel. I had originally one as a low and the other as high.

Its redundant currently but it won't be when I have much more LEDs to supply current to.

Thanks anyway guys.
 

blocco a spirale

Joined Jun 18, 2008
1,546
Take a look at the datasheet for the microcontroller to determine its output current capability. You certainly don't need a mosfet between the output and the ULN2803. Since they both do the same job, use one or the other but not both.
 

ScottWang

Joined Aug 23, 2012
7,409
When you want to using the I/O ports to control the external device or components, you should send a high to active them, if you send a low, it could be active them during the uC initializing.

And here, you don't need the p mosfet as be80be and blocco a spirale mentioned.
 

be80be

Joined Jul 5, 2008
2,072
Its redundant currently but it won't be when I have much more LEDs to supply current to.
No you'll just have more leds that don't work. Your going about this all wrong.
You only need to worry about current going one way use the mosfet and tie the grounds of the leds to ground.
or use the uln2803 and tie the leds to VDD input to your I guess arduino with a 1 k then the output use a 200 ohm to the led and led tied to VDD not both.
 

be80be

Joined Jul 5, 2008
2,072
I didn't pick the parts I just showed how it's done you can't fix something if you don't have all the part's
He would need to make changes for how many leds he is using and a red led if you look the voltage is 7.5 volts
which works out to 20 mA a led . It would light up nice.
I just posted how it could be done.

Not how it shouldn't like the OP is thinking
 

ScottWang

Joined Aug 23, 2012
7,409
I didn't pick the parts I just showed how it's done you can't fix something if you don't have all the part's
He would need to make changes for how many leds he is using and a red led if you look the voltage is 7.5 volts
which works out to 20 mA a led . It would light up nice.
I just posted how it could be done.

Not how it shouldn't like the OP is thinking
I knew you just linked the page for reference, I did the similar things and waiting the response from TS to see what to do the next step ... :)
 

Thread Starter

RavenerAbnorm

Joined Sep 2, 2015
9
Guys thanks for your input. But I assure you I will need a p channel mosfet in my final design. It will be a 32x8 LED matrix and an arduino is working with an led driver in the final design. This driver is capable of only sinking and sourcing small amounts of current when using common anode LEDs. 32 LEDS per column requires about 2A so there is a requirement to use the small current from the LED driver to allow current to flow from a power supply to the LEDs. I realise from the schematic I posted where things were lost in translation.

An NPN switch requires high to turn the switch on, a P channel FET requires high to turn it off. To light an LED in a column you would need to write a column low (FET high) and row high (NPN high) in the LED driver.
 

be80be

Joined Jul 5, 2008
2,072
Some small modifications have changed in the meantime. Mostly on the powering of the project but matrix set up is the same.
OK you think so that's not the same at ALL
I don't see no leds going to the input of a uln2803
 
Top