×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Switching led with PNP transistor

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

RE: Switching led with PNP transistor

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.
 

RE: Switching led with PNP transistor

(OP)
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.

RE: Switching led with PNP transistor

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!

RE: Switching led with PNP transistor

(OP)
Thank You BrianG.

 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

(OP)
Thank You jbartos
Great site.

Merlinknight

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources