Skip navigation
Digi-Key TechXchange Communities > Component Discussion and Reviews > Discussions
4167 Views 1 Reply Latest reply: Apr 16, 2014 5:56 AM by papalyle RSS
Currently Being Moderated

Apr 15, 2014 11:08 AM

Transistors and Base Resistor Values

I was looking at this MCU from Microchip, the PIC18F46K80 - and want to have a series of warning LEDs attached. The LED's I have are grouped in pairs, and draw around 25ma each at 2.2v. I want to save on GPIO so I'm going to put them in parallel, which means that I can't supply directly from the MCU anymore.


So, I was looking at using a basic NPN transistor as a switch, which I've never done before.


The unit I have on hand is a BC549 and I'm copying some of the characteristics of the transistor:

Ic (max) 100mA   (enough for the LED's)

Hfe min 420

VCEsat  200mV at  IC = 100 mA; IB = 5 mA

VBEsat 900mV at IC = 100 mA; IB = 5 mA


What I am struggling to understand is how to equate the base resistor value. I have read probably 20 different web theories and still do not fully understand, and have come up with a few different values as a result. Both the LED and the IC (connected to base) operate off the same VDD of +5v, and the MCU pin I want to control the transistor from has a Ic max of 2mA, but I also have a pin with Ic max 8mA also.


Can anyone point me to some clear-cut theory or help me to understand this a little better?

  • papalyle Novice 23 posts since
    Apr 6, 2014
    Currently Being Moderated
    Apr 16, 2014 5:56 AM (in response to Riley)
    Transistors and Base Resistor Values



    First off, I admire your research !


    Since Hfe is 400, you need a base current of 250 micro-amps or more to get 100 ma in the collector.


    Subtract 900mv from the output pin high voltage. Let's call that Vpin. Vpin/R = 250 micro-amps.


    Vpin / 250 microamps = R.



More Like This

  • Retrieving data ...

Bookmarked By (0)


  • Correct Answers - 4 points
  • Helpful Answers - 3 points