There are many sites that discuss transistor switches including:
https://learn.sparkfun.com/tutorials/transistors/allIn general, we don't care about the actual value of h
FE because we're going to assume a low value, like 10, to guarantee saturation. The collector current is 10x the base current, or the other way around, that base current is 1/10 of the collector current.
Since h
FE is the DC current gain, we can just say that if we want to drive that LED with 10 mA, we need 1 mA of base current.
Looking at the base circuit, we have some signal voltage, let's say 3.3V from a uC, and we assume a 0.7V drop from V
BE(sat) (the voltage difference between the base and emitter) and, for an NPN switch, the emitter is ground or 0V. So, we need 1 mA to drop (3.3V - 0.7V) or 2.6V across the base resistor. This implies we need a 2600 Ohm resistor and this isn't a common value. We can pick 2700 Ohms and still get the transistor into saturation. If we had 5% resistors, we could pick 2400 Ohms.
The uC will drive about 1 mA of base current. Should work...
On the collector side, assume the LED has a V
f of 2.2V and V
CE(sat) is 0.2V so the collector resistor needs to drop 5.0 - 2.2 - 0.2 or 2.6V at 10 mA. A 260 Ohm resistor works here. I would choose 270 Ohms because I don't care if the LED is not quite as bright. It will still be bright enough.
So, this is all of the work to figure the resistors for an LED on a 5V source driven by a 3.3V logic signal.
The first couple of times you work this out, it will be a chore. Later on it becomes automatic.