14 Semiconductors, Doping, and Diodes
electronics
doping
diodes
14.1 Start Simple
Imagine current allowed through a part in one direction but blocked in the other. Doping creates the P-N junction that makes that behavior useful for rectifiers, clamps, LEDs, and protection paths. Start with the direction of current, the voltage needed to turn the junction on, and the reverse condition the circuit must survive.
14.2 Learning Objectives
- Distinguish N-type (excess electrons) from P-type (holes) semiconductors and explain how doping concentration determines conductivity
- Explain PN junction behavior in forward bias (depletion narrows, current flows) and reverse bias (depletion widens, current blocked) using carrier physics
- Contrast BJT (current-controlled, continuous base drive) against MOSFET (voltage-controlled, near-zero gate current) switching behavior for IoT load control
- Select logic-level MOSFETs with Vgs(th) below your MCU GPIO voltage (3.3V or 5V) and verify Rds(on) at that gate voltage
- Calculate MOSFET power dissipation using P = I²×Rds(on) at actual gate voltage and determine if heatsinking is required
Key Concepts
- Semiconductor Doping: Intentionally adding impurity atoms to pure silicon to create excess electrons (N-type, donor atoms like phosphorus) or electron holes (P-type, acceptor atoms like boron), dramatically increasing conductivity and enabling transistor and diode fabrication
- P-N Junction: The interface between P-type and N-type semiconductor regions; free electrons from the N-region combine with holes from the P-region to form a depletion zone with an internal electric field; this built-in potential is approximately 0.6-0.7 V for silicon
- Forward Bias: Applying positive voltage to the P-side and negative to the N-side reduces the depletion zone and allows current to flow; silicon diode conducts when applied voltage exceeds approximately 0.6-0.7 V; current increases exponentially above this threshold
- Reverse Bias: Applying negative voltage to the P-side widens the depletion zone and blocks current flow (only tiny leakage current); this is the ‘off’ state of a diode — high resistance, minimal current, fundamental to rectifier and protection circuits
- Zener Diode: Operates in controlled reverse breakdown at a specific voltage (Zener voltage, typically 2.4-75 V); maintains constant output voltage across a range of currents; used as voltage references and protection circuits
- Schottky Diode: A metal-semiconductor junction diode with lower forward voltage (0.2-0.4 V vs. 0.6-0.7 V for silicon PN) and faster switching speed; used in RF circuits, high-frequency power supplies, and as flyback protection diodes where low voltage drop matters
- LED (Light Emitting Diode): A P-N junction where recombining electron-hole pairs release energy as photons; forward voltage and photon wavelength depend on semiconductor material: red (~1.8-2.0 V), green (~2.0-2.5 V), blue/white (~3.0-3.5 V)
- Diode I-V Characteristic: The exponential relationship between current and voltage in a diode: I = Is x (e^(V/nVT) - 1) where Is is reverse saturation current, n is ideality factor (1-2), and VT is thermal voltage (~26 mV at 25 C); explains why diodes have a sharp turn-on voltage threshold
For Beginners: Semiconductors and Diodes
Semiconductors are materials that sit between conductors (like copper wire that lets electricity flow freely) and insulators (like rubber that blocks it completely). By adding tiny amounts of other elements (called “doping”), engineers can make semiconductors conduct in controllable ways. A diode is the simplest semiconductor device – it acts like a one-way valve that lets electricity flow in only one direction, much like a turnstile that only lets people through one way.
14.3 Why This Chapter Matters
- This is the chapter that explains why modern electronics work at all. Without it, diodes and transistors can feel like magic parts with arbitrary rules.
- In real projects, this knowledge shows up whenever you choose a protection diode, interpret an LED forward voltage, or decide whether a MOSFET will really turn on from a 3.3 V GPIO pin.
- You do not need to become a semiconductor physicist, but you do need enough mental model to stop copying circuits blindly.
14.4 How To Use This Chapter
- Read it in two passes if needed. First understand the big ideas: doping creates controllable materials, PN junctions create one-way behavior, and that one-way behavior becomes useful devices.
- Use the deeper formulas and carrier-physics details as support, not as the first thing to memorize.
- As you read, keep asking: how does this explain a real IoT part I already know, such as an LED, a reverse-polarity diode, or a transistor switch.
Chapter Roadmap
This is a long chapter, so here is the shape of the journey:
- First we meet pure silicon and see why it must be doped before it becomes useful.
- Then we join N-type and P-type material into a PN junction – the one-way valve behind every diode.
- Next we stack junctions into transistors (BJT vs MOSFET) and learn how to choose and drive one from a 3.3 V or 5 V GPIO pin.
- After that we pressure-test everything with quizzes and real debugging scenarios – flyback diodes, level shifting, hot MOSFETs.
- Finally you measure real diode voltages yourself, review the common pitfalls, and see where to go next.
Checkpoints along the way recap what you have covered, and anything titled “Deep dive” is optional on a first read.
14.5 Semiconductor Foundations
Stop one on the roadmap: the raw material. Before anything can conduct on command, we need a material that can be persuaded to conduct – and pure silicon, on its own, is surprisingly bad at the job.
14.5.1 Pure Semiconductors
Common Materials:
- Silicon (Si) - 95% of all semiconductors
- Germanium (Ge) - Historical use, now rare
- Gallium Arsenide (GaAs) - High-frequency applications
Pure semiconductors aren’t very useful because they don’t conduct well at room temperature.
Atomic Structure
Understanding atomic structure helps explain why silicon (4 valence electrons) makes an ideal semiconductor material.
Deep dive: Putting Numbers to It
Doping concentration determines semiconductor conductivity. Pure silicon has ~\(5 \times 10^{22}\) atoms/cm³ but only ~\(1.5 \times 10^{10}\) free carriers/cm³ at room temperature (300K).
N-type doping with phosphorus (1 in 10⁶ atoms):
\[n = \frac{5 \times 10^{22}}{10^6} = 5 \times 10^{16} \text{ free electrons/cm}^3\]
This increases free carrier concentration by a factor of ~\(\frac{5 \times 10^{16}}{1.5 \times 10^{10}} \approx 3 \times 10^{6}\), roughly 3 million times more than intrinsic silicon!
Carrier mobility determines switching speed. In silicon at 300K: - Electron mobility: \(\mu_n = 1400 \text{ cm}^2/(V \cdot s)\) - Hole mobility: \(\mu_p = 450 \text{ cm}^2/(V \cdot s)\)
N-type semiconductors switch 3× faster than P-type because electrons have higher mobility – this is why NMOS transistors are preferred for high-speed digital logic.
Depletion width in a PN junction with 1V reverse bias (the potential that matters is the total across the junction, \(V = V_{bi} + V_R \approx 0.7 + 1 = 1.7\) V):
\[W = \sqrt{\frac{2\epsilon V}{q} \left(\frac{1}{N_A} + \frac{1}{N_D}\right)} \approx 0.1\mu m \text{ to } 1\mu m\]
This microscopic insulating region prevents current flow in reverse bias, enabling diode rectification.
Doping Calculator
Adjust the doping ratio to see how many free carriers are created and the conductivity improvement factor over intrinsic silicon.
14.5.2 Doping: Creating Useful Semiconductors
We just saw that pure silicon barely conducts. The fix is deliberate contamination – and it is the single most important trick in all of electronics.
Doping = Adding impurities (dopants) to semiconductors to control conductivity
Checkpoint: Doping
You now know:
- Silicon dominates real devices (95% of all semiconductors), but pure semiconductors conduct poorly at room temperature.
- Doping means intentionally adding impurity atoms to control conductivity.
- Even a tiny dose works: about 1 dopant per million silicon atoms raises the free-carrier count roughly 3 million times over pure silicon.
14.6 N-type and P-type Semiconductors
Doping creates extra charge carriers – but which kind of carrier you get depends entirely on which element you add. That one choice splits the semiconductor world into two families.
14.6.1 N-type (Negative)
Doping: Add elements with extra electrons (e.g., Phosphorus)
Result: Excess of free electrons (negative charge carriers)
| Atom Type | Valence Electrons | Result |
|---|---|---|
| Silicon atom | 4 | Normal semiconductor lattice |
| Phosphorus dopant | 5 | One extra electron becomes available for conduction |
Properties:
- Majority carriers: Electrons (-)
- Minority carriers: Holes (+)
- Better conductivity than pure silicon
14.6.2 P-type (Positive)
Doping: Add elements with fewer electrons (e.g., Boron)
Result: Deficit of electrons creates “holes” (positive charge carriers)
| Atom Type | Valence Electrons | Result |
|---|---|---|
| Silicon atom | 4 | Normal semiconductor lattice |
| Boron dopant | 3 | One missing electron creates a mobile hole |
Properties:
- Majority carriers: Holes (+)
- Minority carriers: Electrons (-)
- Holes act as positive charge carriers
14.6.3 How It Works: PN Junction and Diode Bias
On their own, N-type and P-type are just two flavors of doped silicon. The interesting behavior appears the moment you join them into a single crystal.
Diode Forward and Reverse Bias
The big picture: A PN junction diode conducts current easily in one direction (forward bias) but blocks it in the reverse direction, acting as an electronic one-way valve controlled by voltage polarity.
Step-by-step breakdown:
Forward Bias (Conducting): Connect P-side to positive voltage, N-side to ground, reducing depletion zone width from 500nm to ~10nm, allowing electron flow across junction with only 0.7V voltage drop - Real example: 1N4007 diode passing 1A forward current drops 0.9V, dissipating 0.9W as heat
Reverse Bias (Blocking): Connect N-side to positive, P-side to ground, expanding depletion zone to 5-10um, creating insulating barrier that blocks current with only <1uA leakage - Real example: Same 1N4007 diode blocking 12V reverse voltage passes only 0.5uA leakage current, negligible 0.006mW power loss
Breakdown (Destructive): Exceed reverse voltage rating (1000V for 1N4007), causing avalanche effect where electric field tears electrons free, creating runaway current that generates heat until junction melts - Real example: Applying 1200V reverse voltage to 1N4007 rated for 1000V causes catastrophic failure within milliseconds
Why this matters: Forward voltage drop (0.7V silicon, 0.3V Schottky) wastes power in rectifiers and protection circuits. Using Schottky diodes in 5V supplies recovers 8% efficiency compared to silicon diodes.
Checkpoint: Junctions and Bias
You now know:
- N-type material (phosphorus, 5 valence electrons) carries current with electrons; P-type material (boron, 3 valence electrons) carries it with holes.
- Forward bias shrinks the depletion zone and a silicon diode conducts with about a 0.7 V drop; reverse bias widens the zone and blocks current except for tiny leakage (<1 uA).
- Exceeding the reverse voltage rating (1000 V for a 1N4007) causes destructive avalanche breakdown.
14.6.4 Transistor Types Overview
We just turned one junction into a one-way valve. The obvious next question: what happens with two junctions back to back? That is a transistor – a switch one circuit can operate on behalf of another.
Understanding the different transistor families helps you select the right component for IoT applications:
The BJT can be understood as two PN junctions sharing a common middle layer (base). In an NPN transistor, a small base current allows a much larger collector-emitter current to flow, providing current amplification essential for sensor signal conditioning and motor driver circuits.
MOSFETs control drain-source current through gate voltage without significant gate current, making them ideal for microcontroller-driven switching. The insulated gate oxide provides high input impedance, allowing direct connection to GPIO pins for logic-level MOSFETs.
Cross-Hub Connections
Explore More Electronics Resources:
- Simulations Hub - Try interactive circuit simulators (TinkerCAD, Falstad) to build transistor switches and test diode circuits without physical components
- Videos Hub - Watch visual explanations of semiconductor physics, PN junction behavior, and transistor operation at the atomic level
- Quizzes Hub - Test your understanding of BJT vs MOSFET selection, power dissipation calculations, and circuit design decisions
- Knowledge Gaps Hub - Clarify common confusions about gate drive voltage, current vs voltage control, and thermal management
Why This Matters: Electronics fundamentals connect to nearly every IoT topic. Understanding transistors enables you to design sensor interfaces (signal conditioning), control actuators (motor drivers), optimize power consumption (load switching), and troubleshoot hardware issues (thermal problems, shoot-through).
IoT Transistor Selection
When choosing between BJT and MOSFET for an IoT switching application, follow this 3-step decision process:
Step 1: Determine load current
| Load Current | Recommendation | Reason |
|---|---|---|
| < 100 mA | BJT (2N2222, BC547) | Simple, $0.02-0.05, no gate driver needed |
| 100 mA - 5 A | Logic-level MOSFET (IRLZ44N) | Low Rds(on) (~22mΩ), direct GPIO drive at 3.3V |
| > 5 A | MOSFET + gate driver (IR2110) | High-side switching, proper gate voltage |
Step 2: Check supply voltage compatibility
| MCU Voltage | BJT Base Resistor | MOSFET Gate Drive |
|---|---|---|
| 3.3V (ESP32, STM32) | R_base = (3.3V - 0.7V) / (I_load / hFE) | Must use logic-level MOSFET (Vgs_th < 2V) |
| 5V (Arduino Uno) | R_base = (5V - 0.7V) / (I_load / hFE) | Standard logic-level MOSFET (Vgs_th < 3V) works |
Step 3: Calculate power dissipation
- BJT: P = V_CE(sat) x I_C = 0.2V x I_load (typically 0.1-0.3W for small loads)
- MOSFET: P = I2 x Rds(on) (e.g., 2A2 x 0.022 ohm = 0.088W for IRLZ44N at Vgs=10V)
Worked example: ESP32 driving a 12V DC fan (0.5A)
- Option A (BJT 2N2222): R_base = (3.3 - 0.7) / (0.5/100) = 520 ohm. Power = 0.3V x 0.5A = 0.15W. Cost: $0.03. Works fine.
- Option B (MOSFET IRLZ44N): Direct GPIO to gate. Power = 0.52 x 0.022 = 0.0055W at Vgs=10V (slightly higher at 3.3V Vgs). Cost: $0.65. Runs cooler.
- Verdict: BJT is cheaper and adequate at 0.5A. MOSFET becomes clearly superior above 1A where BJT dissipation exceeds 0.3W.
MOSFET vs BJT Power Loss
Compare power dissipation between BJT and MOSFET switching for your load current. Adjust the sliders to see which device runs cooler.
GPIO Voltage MOSFET Limits
The Misconception: Many beginners assume any MOSFET can be driven directly from microcontroller GPIO pins (3.3V or 5V), leading to circuits that “sort of work” but run hot, waste power, and fail prematurely.
The Reality with Real Numbers: Standard MOSFETs require Vgs = 10-12V to fully turn ON and achieve their datasheet specifications. When driven with insufficient gate voltage, they operate in the linear region with dramatically higher on-resistance.
Real-World Impact (IRF540N Example):
- Datasheet spec: Rds(on) = 77mΩ @ Vgs=10V
- With 5V gate drive: Rds(on) ≈ 200mΩ (2.6× higher!)
- Switching 2A load:
- Expected power: (2A)² × 0.077Ω = 0.31W (manageable)
- Actual power: (2A)² × 0.2Ω = 0.8W (hot!)
- TO-220 package without heatsink: 1W max → MOSFET runs at 80°C → premature failure
Measured in Real Projects: A student designed a smart fan controller using IRF540N driven from 5V Arduino. Initial testing worked fine for 10 minutes, but after 30 minutes the MOSFET reached 95°C and the fan speed dropped 40% due to voltage drop across the partially-on MOSFET. After switching to IRLZ44N (logic-level), temperature dropped to 35°C and fan ran at full speed.
The Solution: Always check the Vgs specification in datasheets: - Logic-level MOSFETs: low Rds(on) specified at 4.5-5V, and preferably at 2.5-3.3V for ESP32-class GPIO; Vgs(th) only tells you where conduction begins - Standard MOSFETs: Vgs(th) = 2-4V, but require 10V for rated Rds(on)
Cost of This Mistake:
- Wasted heat: 0.8W - 0.31W = 0.49W continuous loss
- Battery life: For a 2A load running 50% duty cycle, that’s 5.9Wh/day wasted → significant drain on any battery-powered system
- Component damage: Thermal stress reduces MOSFET lifetime from 100,000 hours to <10,000 hours
- Debugging time: Students typically spend 2-4 hours troubleshooting “hot MOSFET” before discovering gate voltage issue
Key Takeaway: When selecting MOSFETs for microcontroller projects, ALWAYS verify Rds(on) at YOUR gate voltage (not the datasheet headline spec). Add 50% safety margin for thermal calculations. Logic-level MOSFETs cost the same ($0.50) but save hours of debugging and prevent field failures.
Deep dive: Re-deriving the chapter’s numbers
| Check | Arithmetic | What it proves |
|---|---|---|
| Doping creates many more carriers | Silicon has 5 x 10^22 atoms/cm³. At 1 dopant per 10^6 atoms, 5 x 10^22 / 10^6 = 5 x 10^16 dopant carriers/cm³. Compared with 1.5 x 10^10 intrinsic carriers/cm³, the ratio is 5 x 10^16 / 1.5 x 10^10 = 3.33 x 10^6. |
The “roughly 3 million times” conductivity improvement is the right order of magnitude. |
| Electron mobility is about three times hole mobility | The chapter gives electron mobility mu_n = 1400 cm²/(V·s) and hole mobility mu_p = 450 cm²/(V·s). 1400 / 450 = 3.11. |
N-channel devices often switch faster because electron mobility is about 3.1x hole mobility, not because holes are absent. |
| A forward-biased rectifier must dissipate heat | The 1N4007 example gives 1 A and 0.9 V. P = V x I = 0.9 x 1 = 0.9 W. In reverse at 12 V and 0.5 µA, P = 12 x 0.5 x 10^-6 = 6 µW, or 0.006 mW. |
Forward conduction is the thermal case; normal reverse leakage is negligible until breakdown is approached. |
| Schottky savings are a supply-budget calculation | Replacing a 0.7 V silicon drop with a 0.3 V Schottky drop saves 0.4 V. On a 5 V rail, 0.4 / 5 = 0.08, or 8%. |
The “recovers 8% efficiency” claim is a voltage-drop fraction, so it applies when diode drop is a dominant series loss. |
| MOSFET switch loss scales differently from BJT loss | For the 12 V, 0.5 A fan example, BJT loss is 0.3 x 0.5 = 0.15 W. MOSFET loss is 0.5^2 x 0.022 = 0.0055 W. 0.15 / 0.0055 = 27.3. |
Above small currents, I^2R MOSFET loss can be tens of times lower than BJT saturation loss when the gate is driven properly. |
Carry full precision through the calculation, then round for the learner-facing statement. That keeps the panel consistent with the chapter’s own warning: gate threshold, voltage drop, and current gain are selection inputs, not decorative datasheet trivia.
Checkpoint: Choosing and Driving Transistors
You now know:
- BJTs are current-controlled and need continuous base drive; MOSFETs are voltage-controlled with near-zero gate current – which is why MOSFETs win in battery-powered IoT designs.
- A 3.3 V GPIO needs a logic-level MOSFET. A standard MOSFET like the IRF540N specifies 77 mΩ at Vgs = 10 V but rises to about 200 mΩ with 5 V gate drive.
- Conduction loss is P = I² × Rds(on) – always verify Rds(on) at your gate voltage, not the datasheet headline spec.
14.7 Knowledge Check
Test your understanding with these questions. They put the selection rules above under field conditions – treat them as part of the chapter, not optional homework.
For Kids: Meet the Sensor Squad!
The Sensor Squad learns about one-way doors and super switches!
Sammy the Sensor had a problem. “Bella, what happens if someone plugs your battery in backwards?” Bella the Battery looked worried. “That could fry Max and all our friends!”
Max the Microcontroller smiled. “Don’t worry – we have a special protector called a DIODE. Think of it like a one-way door. Electricity can flow through in one direction, but if it tries to go backwards, the door slams shut!”
“How does that work?” asked Lila the LED. Max explained: “Remember how we learned about N-type and P-type semiconductors? When you stick them together, you get a PN junction. One side has extra electrons, the other side has holes where electrons are missing. When electricity pushes the right way, electrons jump across to fill the holes and current flows. But push the wrong way, and a big empty gap forms that blocks everything!”
“Wait,” said Lila, “my name has LED in it – Light Emitting Diode! Am I a diode too?” “Yes!” said Max. “You’re a special diode that gives off light when electrons jump across the junction. Different materials make different colors – that’s why you can glow red, green, or blue!”
Then Sammy asked the big question: “But what about transistors? How do they work?” Max got really excited. “A transistor is like TWO PN junctions sandwiched together – NPN or PNP. It’s a super switch! I send a tiny whisper of electricity to the middle layer called the base, and it controls a HUGE flow of electricity through the other two layers. It’s like a kid whispering to a giant who then opens or closes a massive gate!”
Bella clapped. “So that’s how you control the big fan motor even though you’re so small!” Max nodded proudly. “One tiny signal from me, and the transistor lets all of Bella’s power flow through to spin the motor. That’s the magic of semiconductors!”
14.7.1 Key Words for Kids
| Word | What It Means |
|---|---|
| Diode | A one-way door for electricity – lets current flow one way only |
| LED | Light Emitting Diode – a diode that glows with light |
| Transistor | A super switch controlled by a tiny signal |
| N-type | Semiconductor with extra electrons (negative charges) |
| P-type | Semiconductor with missing electrons called holes (positive charges) |
| PN Junction | Where N-type meets P-type – the magic boundary that makes diodes work |
Flyback Diode for 12V Relay
Scenario: You are building an ESP32-controlled smart home hub that switches a 12V electromagnetic relay (coil: 120mA, inductance: 150mH). The relay controls a 120V AC lamp. What flyback diode should you use?
Step 1: Calculate the inductive voltage spike (worst case)
When the relay coil current is cut, the inductor generates: V = -L × (di/dt)
Worst-case scenario: transistor switches off in 100ns (modern MOSFETs are fast!)
V_spike = -(150 × 10⁻³ H) × (0.12A / 100 × 10⁻⁹ s) = -180,000V
Without protection, this idealized spike would instantly destroy the transistor (rated for 60V max). In a real circuit, parasitic capacitance and arcing limit the spike to hundreds of volts rather than 180kV — still far beyond the transistor’s rating, which is why the diode is non-negotiable.
Step 2: Select diode voltage rating
The flyback diode must withstand at least the supply voltage in reverse bias: V_reverse > 12V
Add 2× safety margin: 12V × 2 = 24V minimum
Common diodes meeting this: - 1N4148 (100V, 300mA fast-switching signal diode) - 1N4007 (1000V, 1A general-purpose rectifier) - 1N5819 Schottky (40V, 1A, fast recovery)
Step 3: Select diode current rating
The flyback diode must handle the relay coil current: I_diode ≥ 120mA
All three diodes exceed this (300mA to 1A rating).
Step 4: Check reverse recovery time
When the relay switches ON again, the diode must stop conducting quickly to avoid shorting the power supply.
| Diode | Reverse Recovery Time | Suitability |
|---|---|---|
| 1N4148 | 4 ns (very fast) | Excellent for high-frequency switching |
| 1N4007 | 30 µs (slow) | Acceptable for relays (slow mechanical switching) |
| 1N5819 Schottky | <10 ns (very fast) | Best for motor PWM and high-frequency applications |
For a relay switching at <1 Hz, even the slow 1N4007 is adequate.
Step 5: Calculate power dissipation in the diode
When the relay switches OFF, the collapsing magnetic field forces current through the flyback diode.
Energy stored in inductor: E = ½ × L × I² = 0.5 × 0.15H × (0.12A)² = 1.08 mJ
This energy dissipates through the diode over several milliseconds. Average power is negligible for low-frequency relay switching.
Decision: Use 1N4007 – it is cheap ($0.02), over-specified for voltage (1000V >> 12V), handles the current easily, and the slow recovery time does not matter for relay applications.
For motor drivers or high-frequency solenoid valves, upgrade to 1N5819 Schottky for faster recovery and lower forward voltage drop (0.3V vs 0.7V).
Verification: After installing the 1N4007, measure the voltage across the transistor with an oscilloscope when switching the relay OFF. You should see voltage clamped to ~12.7V (12V supply + 0.7V diode drop) instead of the 180kV spike.
BJT vs MOSFET Checklist
Use this checklist alongside the detailed Transistor Selection Decision Framework above:
| Question | If YES → | If NO → |
|---|---|---|
| 1. Is load current < 100mA? | BJT (2N2222) works fine, costs $0.02 | Go to Q2 |
| 2. Is the GPIO voltage 5V or higher? | BJT or MOSFET both work | Go to Q3 |
| 3. Is GPIO voltage 3.3V? | Must use logic-level MOSFET (Vgs(th) <2V) | Cannot drive standard MOSFET |
| 4. Is switching frequency >1kHz (PWM)? | MOSFET (BJTs waste power driving base continuously) | BJT acceptable |
| 5. Is battery life critical? | MOSFET (zero gate current) | BJT acceptable |
| 6. Is load current >5A? | MOSFET with proper heatsink | Use relay or SSR instead |
Checkpoint: Applied Diode and Transistor Design
Between the quizzes and the worked examples above, you now know:
- Any inductive load (relay, motor, solenoid) needs a flyback diode: the collapsing field generates V = -L × (dI/dt), and the diode clamps the spike to about 0.7 V above the supply (~12.7 V on a 12 V rail).
- A cheap 1N4007 ($0.02) is fine for slow relay switching; upgrade to a Schottky like the 1N5819 for motor PWM and high-frequency switching.
- The quick selection rule: BJT below 100 mA, logic-level MOSFET from 100 mA to 5 A, MOSFET plus gate driver above 5 A.
14.8 Concept Check: PN Junction Behavior
Test your understanding before proceeding:
14.9 Concept Relationships
This chapter connects to other electronics topics:
| Related Concept | Chapter Link | Relationship |
|---|---|---|
| Transistor Operation | Transistor Selection Guide | Transistors are two PN junctions sharing common layer |
| Voltage Regulation | Power Management | Zener diodes provide voltage reference |
| Flyback Protection | Motor Control Circuits | Diodes clamp inductive voltage spikes |
| Rectification | Power Supplies | Diode bridges convert AC to DC |
14.10 Try It Yourself
You have been reading numbers all chapter – 0.7 V silicon, 0.3 V Schottky, color-dependent LED drops. Now put a multimeter on real parts and watch those same numbers appear on your bench.
Challenge: Measure Diode Forward Voltage Drop
Objective: Verify diode forward voltage varies by type and current, understanding real vs ideal behavior.
Materials Needed:
- Multimeter with diode test mode
- 1N4007 silicon diode
- 1N5819 Schottky diode
- LED (any color)
- 9V battery, 1kΩ resistor, breadboard
Steps:
- Use multimeter diode mode to measure forward voltage of each diode (no circuit needed)
- Build circuit: 9V battery → 1kΩ resistor → diode → ground
- Measure voltage across diode with multimeter
- Calculate current: I = (9V - Vdiode) / 1kΩ
- Compare measured Vf at load current vs diode test mode
Solution Example:
- 1N4007 diode test: 0.65V (low current ~1mA)
- 1N4007 in circuit at 8mA: 0.72V (increases with current)
- 1N5819 Schottky: 0.28V (lower Vf, better efficiency)
- Red LED: 1.8V (forward voltage depends on semiconductor bandgap)
- Blue LED: 3.1V (wider bandgap = higher voltage)
Expected Observation: Forward voltage increases with current due to semiconductor resistance. Schottky diodes have 0.4V lower drop than silicon, saving power. LEDs show color-dependent forward voltage related to photon energy.
Key Takeaway
Doping creates N-type and P-type semiconductors that, when combined into PN junctions, form diodes (one-way current flow) and transistors (electronically controlled switches). MOSFETs are preferred for most IoT applications because they are voltage-controlled with nearly zero gate current, offer lower power losses, and are simpler to drive from microcontroller GPIO pins.
14.11 See Also
Diode Applications:
- Flyback Diode Protection - Protect transistors from inductive spikes
- Voltage Regulators - Zener diode voltage references
- LED Driver Circuits - Current limiting for LEDs
Advanced Semiconductor Physics:
- Band Gap Theory - Why forward voltage varies by material
- Temperature Effects - Forward voltage decreases ~2mV/°C
- Diode Clamp and Recovery Contracts - Review forward-voltage drift, GPIO clamp current, Schottky protection choices, and reverse-recovery limits
- Transistor Selection Guide - Switching speed considerations for BJT vs MOSFET
14.12 Match the Concepts
Two quick games – matching and ordering – lock in the vocabulary and the LED design procedure before we look at the most common mistakes.
14.13 Order the Steps
Common Pitfalls
These four mistakes account for most diode-related debugging sessions. Skim the titles now, and open any that touch your current project.
Diode Voltage Variation
A silicon diode’s forward voltage is approximately 0.6-0.7 V, but this varies: increasing current increases forward voltage; increasing temperature decreases forward voltage by approximately 2 mV/C. In precision rectifier or voltage reference applications, account for these variations. A diode used as a rough 0.7 V reference drifts significantly with temperature.
Silicon Diode Recovery Check
Standard silicon rectifier diodes (1N4001-1N4007) have reverse recovery times of 1-4 microseconds. At high switching frequencies (>50 kHz), they remain partly conductive during the reverse transition, causing power loss and heating. Use Schottky diodes (nanosecond recovery) or ultrafast diodes for switching power supplies and high-frequency rectifier circuits.
LED Reverse Voltage Limits
LEDs have very low reverse breakdown voltage (typically 5-30 V). In AC circuits or H-bridge motor drivers, LEDs can be momentarily reverse-biased. Exceeding the reverse voltage instantly destroys the LED junction. Add a small signal diode in reverse parallel with the LED to clamp reverse voltage, or ensure the circuit never applies reverse voltage to the LED.
Diode Forward Voltage Varies
Forward voltage varies significantly by diode type: germanium 0.2-0.3 V, Schottky 0.2-0.4 V, silicon PN 0.6-0.7 V, LED 1.8-3.5 V depending on color. Using the generic 0.7 V value for a Schottky or LED in a circuit calculation introduces significant errors. Always look up the actual forward voltage for the specific diode type at the expected operating current.
14.14 What’s Next
| Direction | Chapter | Why Read It |
|---|---|---|
| Previous | Electricity Applications | Ohm’s Law and power calculations that underpin diode and transistor circuit design |
| Next | Transistor Selection Guide | Systematically choose BJT vs MOSFET for every IoT load-switching scenario |
| Related | Electricity Fundamentals | Voltage, current, and resistance basics that explain forward voltage and diode conduction |
| Applied | DC Motor Control | See flyback diodes and H-bridge transistor circuits in real actuator designs |
14.15 Diode Clamp and Recovery
The main chapter above stays focused on semiconductors, doping, PN junctions, diodes, and transistor switching choices. For the deeper design contract behind diode forward-voltage approximation, GPIO clamp-current sizing, Schottky reverse-polarity tradeoffs, temperature drift, and reverse-recovery limits, continue to Diode Clamp and Recovery Contracts.
14.16 Summary
This chapter shows how doping creates p-type and n-type semiconductor behavior and how diodes use junctions to control current direction. It connects diode voltage drops, LEDs, flyback protection, and MOSFET behavior to practical IoT switching circuits.
