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?