Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switching led with PNP transistor 1

Status
Not open for further replies.

MerlinKnight

Computer
May 1, 2003
23
Hello,

I am trying to put a transistor on the output of a PIC chip. It can sink 150ma. It's power by 5VDC. I am using a 2n2906. Hfe=180. Led is a 3v 20ma super brite.
I want to calculate the Base resistor and the led current limiting resistor.
My calculation have come up with 90ohms for the led and 34.6kohm for the base resistor.
My question is why does my base resistor so high, but when i look at other circuits they are 5.6k or 10k. Even when i calculate the resistance for those circuits i get a higher answer. Is there some formula i am missing. A percent of offset that i am not doind.I have hunted the internet and can't find the answer for PNP's.
I would like to be able to calculate these resistors and get them correct.
Any help would greatly be appreciated.

Merlin Knight
 
Replies continue below

Recommended for you

First point: if your PIC chip can sink 150mA and the LED requires 20mA for the brightness you want, why don't you drive the LED directly from the PIC output?

Second point: although the hfe of your transistor is 180 this is specified at a particular collector voltage. For switching transistor applications is is usual to assume a much lower gain, usually 10 to 20, to ensure a low collector-emitter saturation voltage (VCEsat)when the device is turned on. That is why the resisitors values are lower than you have calculated. This is true whether you use a PNP or NPN type.
 
The reason for the transistor is the output of the pic chip is being used to control a matrix of leds.
Are you saying, instead of using a Hfe of 180 as the ECG book shows , to just use 10 or 20 as the Hfe instead.
Trying to get an understanding of saturation of a transistor and calculating the resistor values.
 
Hi again - yes that's exactly what I'm saying, using Hfe of 180 is way too high. I looked up the data sheet (Philips semiconductors) for the 2N2906 and they only specify the Hfe as being 40-120 at IC 150mA and 10V.

You need to understand that for most transistors Hfe peaks at a certain mid-range current and goes down sharply at high collector currents. The 2N2906 is not a particularly good device for this application as it has a VCEsat of 400mV at IC 150mA. This is using a test IB of 15mA, i.e. a gain of 10. With your calculations your 90ohm resistor is correct for 5V supply only if the transistor saturation voltage is 200mV or less.

There are literally thousands of transistors you could use for this sort of task, and everyone has their personal favourites. A quick check suggests that something like a BC327 might be better. If you check the Motorola data sheet for this device it has some super graphs which will explain the relationship between saturation voltage and collector current versus gain.

Hope that helps!
 
Thank You BrianG.

I will look into the BC327. It gives me a direction to go in.

Thank Again for the help.

Merlin Knight
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor