Electronic – I don’t care how a transistor works, how to get one to work


Every reference I can find on transistors immediately launches into theory-heavy alphabet soup. The above seems also to be assumed knowledge for reading a datasheet. I don't care; I just want to get one to work.

I understand there's some relationship between the current/voltage applied to the base to get a particular current to flow from the collector to the emitter. Which numbers on the datasheet relate to that? If I'm only trying to operate the transistor in "switch" mode, do I really need to care what current I apply to the base or will I be fine just whacking a 1k resistor in between my logic level output and the transistor base?

Is the only difference between an NPN and a PNP transistor which way the current flows when a current is applied to the base?

Best Answer

The base-emitter junction is like a diode. When the voltage across it (Vbe) exceeds approximately 0.65V (can be as low as 0.55V and as high as 0.9V, check the datasheet for your transistor) it begins conducting.

The current (not voltage!) through the base emitter junction is amplified by the gain of the transistor, which is known as HFE. Ic(collector current) = Ib(base current) * HFE. Remember HFE is not constant for transistors, it varies from transistor to transistor and depending on temperature, previous usage, etc., so don't rely on it for controlled amplification. For the 2N2222 it is around 160, plus or minus 30.

By applying a base-emitter voltage exceeding 0.65V to the transistor you can use it as a switch.


simulate this circuit – Schematic created using CircuitLab

(It is an NPN transistor you want. 2N3904 or 2N2222 will do.)

If you want to use an LED which is not blue or white then use a 47 ohm resistor in series with it.

When you press the switch the LED will come on.