Switching led with PNP transistor
Switching led with PNP transistor
(OP)
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
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





RE: Switching led with PNP transistor
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.
RE: Switching led with PNP transistor
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.
RE: Switching led with PNP transistor
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!
RE: Switching led with PNP transistor
I will look into the BC327. It gives me a direction to go in.
Thank Again for the help.
Merlin Knight
RE: Switching led with PNP transistor
http://www.interq.or.jp/japan/se-inoue/e_dance26.htm
etc. for more info
RE: Switching led with PNP transistor
Great site.
Merlinknight