Diodes and transistors as controlled paths
Use polarity and control conditions to protect a circuit and switch a load that a logic pin should not drive directly.
- Select the orientation and supporting resistor for a diode or transistor switch and trace current paths in on, off, and fault states.
Related study — optional context
Understand
The working idea
A diode strongly favors current in one direction. In a simple silicon model it conducts forward after its junction voltage becomes substantial and blocks reverse current within its ratings. The familiar fixed-drop model—perhaps 0.7 V for a silicon diode or a color-dependent LED drop—is useful for first calculations but is not a law. Current changes steeply with voltage, temperature matters, and ratings limit reverse voltage and power.
A transistor uses a small control signal to influence a larger load current. For an N-channel enhancement MOSFET used as a low-side switch, the load connects from positive supply to drain, source goes to ground, and a sufficiently positive gate-to-source voltage turns the channel on. A gate resistor can limit switching spikes, while a pull-down holds the gate off during reset. “Threshold voltage” does not mean fully on; use on-resistance specifications at the actual logic drive when selecting hardware.
Inductive loads such as relays and DC motors resist abrupt current change. When a transistor opens, the winding can produce a large voltage. A flyback diode across a one-direction DC winding provides a decay path, normally reverse-biased while powered. Its orientation is a deliberate protection decision: backwards during normal operation, forward-conducting during turn-off.
A common misconception is that a transistor automatically supplies current; it controls a path whose current still comes from the load supply. Another is driving a fan or printer motor directly from a microcontroller pin because its rated voltage matches. Pin current and transient energy can exceed limits even at 3.3 V. Trace load and control loops separately, share ground when the interface requires it, and verify device pinout—gate, drain, source order is not universal.
Follow the reasoning
Worked example
A 3.3 V GPIO drives an NPN transistor base for a 60 mA load. Assume forced gain of 10 and base-emitter drop 0.8 V. Choose a base resistor.
- 1
Required base current is 60 mA / 10 = 6 mA.
- 2
Resistor voltage is 3.3 V − 0.8 V = 2.5 V.
- 3
R = 2.5 V / 0.006 A = 417 Ω.
- 4
Choose 390 Ω; modeled base current is 2.5 V / 390 Ω = 6.4 mA, exceeding the 6 mA target. Confirm that the GPIO can supply this current at the assumed output voltage.
A 390 Ω base resistor gives a forced gain below 10 in this model, subject to verifying GPIO output voltage/current and transistor saturation ratings.
Sanity checkThe resistor prevents the base from looking like a near-short, and its current is an order of magnitude below the 60 mA load current.
Try it yourself
Independent check
Move to the bench
Operate an LED load with a transistor switch and diagnose control-path versus load-path faults.
- 3×AA battery holder
- logic-level N-channel MOSFET suitable at the available gate voltage
- LED
- 330 Ω resistor
- 10 kΩ pull-down
- breadboard
- multimeter
- jumper wires
Experiment
- With power removed, verify the MOSFET pinout from its trusted part documentation and build the LED-resistor load from positive supply to drain, source to ground.
- Add the 10 kΩ gate-to-ground pull-down; predict LED state with gate at ground and at battery positive.
- Power the circuit and use a jumper as the low-voltage control; measure gate-to-source and drain-to-source voltage in each state.
- Remove power and deliberately disconnect the gate pull-down; repower without touching the gate and diagnose any unstable or retained state as a floating-control fault.
- Restore the pull-down and confirm deterministic off behavior.
Observe
- Expected: high gate drive turns the LED on and reduces drain-to-source voltage; actual values depend on the device and must be recorded.
- Expected fault clue: without the pull-down, stored gate charge or pickup can make the state unreliable even though the load path is intact.
Draw the current path and flyback diode orientation for a small one-direction low-voltage fan switched by a transistor; list ratings that still require verification.
- Use an LED as the lab load, not a mains appliance or unknown motor.
- Remove power before rewiring and do not exceed the MOSFET, LED, resistor, or battery-holder ratings.
Keep evidence
Bench note
Record what you expected, what you actually measured or observed, and one difference worth investigating. This is self-reported evidence, not a certification.