Transistor switching practice
An NPN transistor switches a load when current flows into its base: I_b = (V_in − 0.7 V) ÷ R_b. Fully on (saturated) it keeps only V_CE(sat) ≈ 0.2 V, so the load sets I_c = (V_cc − 0.2 V) ÷ R_L, and the base needs at least I_c ÷ β, given 2 to 10 times that to be sure.
Which of two drawn circuits switches its lamp on (a pin high or low, R_b there or missing), the base current from a pin, and the load current of a saturated transistor.
The transistor is switched fully on, which is called saturated, and keeps only V_CE(sat) = 0.2 V across it. What current flows through the relay coil, in mA? Give your answer to 3 significant figures.
How to solve these
Base current. The base-emitter junction takes about 0.7 V, so a 5 V pin through 4.7 kΩ gives I_b = (5 − 0.7) ÷ 4,700 ≈ 0.915 mA.
Saturation. Fully on, the transistor keeps only V_CE(sat) ≈ 0.2 V and the load sets the current: a 120 Ω lamp on 12 V carries (12 − 0.2) ÷ 120 ≈ 98.3 mA. The base must give at least I_c ÷ β (0.98 mA with β = 100); designers give it 2 to 10 times more, so with k = 3 the base resistor is (5 − 0.7) ÷ 2.95 mA ≈ 1.46 kΩ. If β × I_b is less than the load's current, the transistor is only partly on and I_c = β × I_b.
Power. Saturated, the transistor wastes only 0.2 V × I_c (about 20 mW at 98 mA), while the load takes (V_cc − 0.2 V) × I_c. That is why a switch runs cool.
Relays. A coil fights a sudden stop in its current. A flyback diode across the coil, its cathode towards +V_cc, carries the current round at switch-off, so the collector rises only to V_cc + 0.7 V instead of a spike of hundreds of volts.
NOT gate. With a resistor R_c from V_cc to the collector, a high input saturates the transistor and the output falls to 0.2 V; a low input leaves it off and the output rises to V_cc, less what a load draws through R_c.
Worked example
The transistor is saturated, with V_CE(sat) = 0.2 V across it. Leaving out the small base current, what power does the transistor turn into heat, in mW? Give your answer to 3 significant figures.
Answer: 4.51 mW. The transistor keeps V_CE(sat) and carries the load current: P = 0.2 V × 22.56 mA ≈ 4.51 mW.
Show the working
- Write down what is given: V_cc = 9 V, V_CE(sat) = 0.2 V, R_L = 390 Ω.
- First the collector current with the transistor saturated: I_c = (9 V − 0.2 V) ÷ 390 Ω ≈ 22.56 mA.
- The transistor keeps V_CE(sat) across it while it carries I_c: P = V_CE(sat) × I_c.
- Work it out and round to 3 significant figures: P = 0.2 V × 22.56 mA ≈ 4.51 mW.
- Check: this is small next to the load's power, which is why a switch runs cool. Answer: 4.51 mW.
Remember: A saturated switch wastes only V_CE(sat) × I_c; the load takes (V_cc − V_CE(sat)) × I_c. Formula sheet
Questions
How do you calculate the base resistor for a transistor switch?
Find the load current I_c = (V_cc − 0.2 V) ÷ R_L, the base current I_b = k × I_c ÷ β with k from 2 to 10, then R_b = (V_in − 0.7 V) ÷ I_b: 98.3 mA with β = 100 and k = 3 from a 5 V pin needs about 1.46 kΩ.
How do I know if a transistor is saturated?
Compare β × I_b with the current the load allows, (V_cc − 0.2 V) ÷ R_L. If β × I_b is bigger, the transistor saturates and the load sets the current; if it is smaller, the transistor is only partly on and I_c = β × I_b.
Why does a relay coil need a flyback diode?
When the transistor switches off, the coil keeps its current flowing and would make a voltage spike that can destroy the transistor. A diode across the coil, cathode towards +V_cc, gives the current a way round, so the collector reaches only about V_cc + 0.7 V.
How are these answers checked?
Each question is generated fresh and its answer computed by code. A separate test rebuilds the circuit from the drawing and solves it node by node with its own transistor model, trying every combination of off, partly on and saturated, and finds design values by searching the solved circuit.