Electronics & Circuits · Study deck

Semiconductors: Fabrication and Switching Devices

An integrated circuit is built in layers that form many controlled junctions.

Voltage Vera is your guide for this deck.

dopingdiodes
Voltage Vera, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: 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.
  • Explain: 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.
  • Explain: Lithography -- the circuit design is drawn onto a photomask, then projected through it onto a photoresist-coated silicon wafer, exposing the pattern in UV light.
iotclass.org

Major section

How ICs Are Actually Made

The second option is an integrated circuit (IC), and the printing process is a direct extension of the doping this chapter just covered.

  • Lithography -- the circuit design is drawn onto a photomask, then projected through it onto a photoresist-coated silicon wafer, exposing the pattern in UV light.
  • Etching -- the exposed pattern is "carved" into the wafer, opening windows down to the silicon where each component will form.
  • Deposition -- dopants and metal are deposited into those windows, forming the p-type and n-type regions for diodes and transistors and the metal traces that wire them together.
iotclass.org

Major section

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.
  • Logic-level MOSFETs cost the same ($0.50) but save hours of debugging and prevent field failures.
  • Component damage: Thermal stress reduces MOSFET lifetime from 100,000 hours to <10,000 hours.
iotclass.org

Major section

For Kids: Meet the Sensor Squad!

the microcontroller smiled. "Don't worry -- we have a special protector called a DIODE.

  • Electricity can flow through in one direction, but if it tries to go backwards, the door slams shut!".
  • "How does that work?" asked the LED.
  • One side has extra electrons, the other side has holes where electrons are missing.
  • "Wait," said Lila, "my name has LED in it -- Light Emitting Diode!
iotclass.org

Major section

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.
  • Step 1: Calculate the inductive voltage spike (worst case): When the relay coil current is cut, the inductor generates: V = -L × (di/dt).

Key terms

Average power
Average power is negligible for low-frequency relay switching.

Numbers to remember

120VThe relay controls a 120V AC lamp.
60Vthis idealized spike would instantly destroy the transistor (rated for 60V max).
300mAAll three diodes exceed this (300mA to 1A rating).
The 1N4007 chosen above for this 12V relay is exactly this part class -- a cheap, axial-leaded general-purpose rectifier -- installed in reverse bias across the coil, where its slow ~30 microsecond recovery time never matters because the relay switches under 1 Hz. Photo: oomlout, CC BY-SA 2.0
The 1N4007 chosen above for this 12V relay is exactly this part class -- a cheap, axial-leaded general-purpose rectifier -- installed in reverse bias across the coil, where its slow ~30 microsecond recovery time never matters because the relay switches under 1 Hz. Photo: oomlout, CC BY-SA 2.0
iotclass.org

Major section

Flyback Diode for 12V Relay (continued)

Step 2: Select diode voltage rating: The flyback diode must withstand at least the supply voltage in reverse bias: V_reverse > 12V.

  • Worst-case scenario: transistor switches off in 100ns (modern MOSFETs are fast!).
  • All three diodes exceed this (300mA to 1A rating).
  • Average power is negligible for low-frequency relay switching.
iotclass.org

Major section

Flyback Diode for 12V Relay (continued)

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 4: Check reverse recovery time: When the relay switches ON again, the diode must stop conducting quickly to avoid shorting the power supply.
  • For a relay switching at <1 Hz, even the slow 1N4007 is adequate.
iotclass.org

Deck summary

Key takeaways

The second option is an integrated circuit (IC), and the printing process is a direct extension of the doping this chapter just covered.

  • 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 microcontroller smiled. "Don't worry -- we have a special protector called a DIODE.
  • Scenario: You are building an ESP32-controlled smart home hub that switches a 12V electromagnetic relay (coil: 120mA, inductance: 150mH).
iotclass.org

Retrieval practice

Recall check 1 of 6

Voltage Vera says: answer from memory, then check your reasoning.

Q1You're reverse-engineering a commercial IoT smart plug. The teardown reveals the main switching device is a triac, not a MOSFET. The product switches 120V AC mains at 15A. Why use a triac?

ATriacs are cheaper than MOSFETs at all power levels
BMOSFETs cannot handle 120V voltages
CTriacs offer galvanic isolation between control and load circuits
DTriacs are bidirectional AC switches ideal for mains voltage.
Show answer

Answer: D Explanation: Triacs are specialized bidirectional AC switches perfect for controlling mains AC power.

iotclass.org

Retrieval practice

Recall check 2 of 6

Voltage Vera says: answer from memory, then check your reasoning.

Q2You're designing an ESP32-based soil moisture sensor that must run on a coin cell battery for 2 years. The sensor needs to switch a 12V solenoid valve (100mA) to water plants. Which transistor type should you use?

ANPN BJT (2N2222) - widely available and cheap
BPNP BJT (2N3906) - better for high-side switching
CN-channel logic-level MOSFET with near-zero gate current
DP-channel MOSFET - easier gate drive circuit
Show answer

Answer: C Explanation: N-channel logic-level MOSFET is the best choice for battery-powered IoT devices.

iotclass.org

Retrieval practice

Recall check 3 of 6

Voltage Vera says: answer from memory, then check your reasoning.

Q3You connect an LED directly between an ESP32 GPIO pin (3.3V output) and ground. With no current-limiting resistor, what happens and why?

ALED lights at full brightness - GPIO provides perfect voltage
BGPIO pin or LED likely fails - excessive current exceeds 40mA maximum rating
CLED doesn't light - 3.3V insufficient for forward voltage
DESP32 automatically limits current to safe level
Show answer

Answer: B Explanation: Both GPIO and LED are at risk of damage due to excessive current.

iotclass.org

Retrieval practice

Recall check 4 of 6

Voltage Vera says: answer from memory, then check your reasoning.

Q4You're testing a voltage regulator circuit using a 1N4007 diode for input protection. With 24V input applied correctly, you measure 23.3V on the output side of the diode. When the power supply is accidentally reversed, the output reads 0V and the circuit remains undamaged. What physical change occurs inside the diode during reverse bias?

AP-N junction heats up and increases conductivity
BDepletion region collapses, allowing bidirectional current flow
CDepletion region expands to several micrometers.
DDiode enters avalanche breakdown mode and conducts in both directions
Show answer

Answer: C Explanation: During reverse bias, the depletion region dramatically expands, transforming the junction into an effective insulator.

iotclass.org

Retrieval practice

Recall check 5 of 6

Voltage Vera says: answer from memory, then check your reasoning.

Q5You're designing a battery-powered door lock with an H-bridge motor driver (4 MOSFETs). The 12V motor draws 2A. You select IRF530N MOSFETs (Rds(on) = 160mΩ) rated for 14A. During testing, MOSFETs get extremely hot (>100°C). What's wrong?

A14A rating is peak; continuous current should be derated to 50%
BHigh Rds(on) causes excessive conduction losses - need lower resistance MOSFETs
CGate drive voltage insufficient - MOSFETs not fully enhanced
DH-bridge topology always has high losses - should use linear driver
Show answer

Answer: B Explanation: The problem is excessive conduction loss, made worse if the gate is not driven at the voltage used for the datasheet Rds(on) value.

iotclass.org

Retrieval practice

Recall check 6 of 6

Voltage Vera says: answer from memory, then check your reasoning.

Q6Place each electronics concept where it lives so you can trace how added carriers become a junction and then a controllable switching channel.

AN-type semiconductor
BP-type semiconductor
CReverse-biased LED
DPull-up resistor
Show answer

Answer: A These boundaries keep dope material, form junction, control a load distinct so you can trace how added carriers become a junction and then a controllable switching channel.

iotclass.org

Print reference

Answers 1 of 2

Answer key.

  1. D · Explanation: Triacs are specialized bidirectional AC switches perfect for controlling mains AC power.
  2. C · Explanation: N-channel logic-level MOSFET is the best choice for battery-powered IoT devices.
  3. B · Explanation: Both GPIO and LED are at risk of damage due to excessive current.
  4. C · Explanation: During reverse bias, the depletion region dramatically expands, transforming the junction into an effective insulator.
iotclass.org

Print reference

Answers 2 of 2

Answer key.

  1. B · Explanation: The problem is excessive conduction loss, made worse if the gate is not driven at the voltage used for the datasheet Rds(on) value.
  2. A · These boundaries keep dope material, form junction, control a load distinct so you can trace how added carriers become a junction and then a controllable switching channel.
iotclass.org