Basic Electronics, Chapter 6: Challenge 1 solution (BJT base resistors) Formulas: IC(sat) = (Vs - VCE(sat)) / RL IB = IC(sat) / 10 (forced beta 10) RB = (Vdrive - VBE) / IB forced beta = IC(sat) / IB(actual) P(transistor) = VCE(sat) x IC (a) 2N3904 switching a 12 V, 400 ohm relay coil. VCE(sat) = 0.2 V, VBE = 0.8 V. From a 5 V pin: 1. IC(sat) = (12 - 0.2) / 400 = 29.5 mA 2. IB = 29.5 / 10 = 2.95 mA 3. RB = (5 - 0.8) / 0.00295 = 1424 ohm -> E12 value BELOW: 1.2 kohm (1.5 kohm would give only 2.8 mA, forced beta 10.5, still fine, but round down by habit so the transistor is never short of base current) 4. Actual IB = 4.2 / 1200 = 3.5 mA forced beta = 29.5 / 3.5 = 8.4 5. Transistor power = 0.2 x 0.0295 = 5.9 mW (negligible) Flyback diode across the coil (cathode to +12 V, anode to the collector): Basic Electronics 5. From a 3.3 V pin that supplies at most 2.5 mA: RB = (3.3 - 0.8) / 0.0025 = 1000 ohm (an E12 value) IB = 2.5 mA forced beta = 29.5 / 2.5 = 11.8 The datasheet minimum hFE at 30 mA is about 60 or more, so IB(min needed) = 29.5 / 60 = 0.49 mA. We supply 2.5 mA: 5.1 times the minimum needed. Margin is good. (b) RB = 47 kohm by mistake, 5 V drive, VBE = 0.7 V IB = (5 - 0.7) / 47000 = 0.0915 mA hFE = 100: IC would be 100 x 0.0915 = 9.15 mA (less than 29.5 mA, so NOT saturated) coil voltage = 9.15 mA x 400 = 3.66 V VCE = 12 - 3.66 = 8.34 V The coil gets only 3.7 V: the relay does not pull in. Transistor power = 8.34 x 0.00915 = 76 mW. hFE = 300: IC would be 27.4 mA (just below 29.5 mA, so still not fully saturated) coil voltage = 27.4 mA x 400 = 10.98 V VCE = 12 - 10.98 = 1.02 V The relay (which pulls in at about 9 V) probably works, but the transistor is dropping 1 V and wasting 28 mW. Result: the same circuit with two different transistors either fails or works. This is why you size the base current for a forced beta of 10 rather than relying on the typical gain. (c) 9 V motor at 500 mA, TIP120 Darlington, 5 V pin. VBE(total) = 1.4 V, VCE(sat) = 0.9 V, forced beta 250. 1. IB = 500 / 250 = 2.0 mA 2. RB = (5 - 1.4) / 0.002 = 1800 ohm (exactly the E12 value 1.8 kohm) IB = 3.6 / 1800 = 2.0 mA 3. Motor voltage = 9 - 0.9 = 8.1 V (10 % of the supply lost) 4. Transistor power = 0.9 x 0.5 = 0.45 W (a TO-220 is fine for this in free air, but it is warm) MOSFET with RDS(on) = 25 mohm: VDS = 0.5 x 0.025 = 12.5 mV, motor voltage = 8.99 V, P = 0.5^2 x 0.025 = 6.25 mW. 72 times less heat. The Darlington still draws 2 mA from the pin; the MOSFET draws nothing once the gate is charged. Checklist - IC(sat) from the supply and the load, not from the transistor. - Forced beta 10 (about 250 for a Darlington); round RB DOWN. - Use the datasheet MINIMUM hFE at your collector current, never the typical figure. - Check the pin can supply IB; if not, relax the forced beta (to 20) or use a MOSFET. - Coil or motor load: add the flyback diode.