Electronics & Circuits · Study deck

Transistor Selection

A microcontroller means the small computer that runs the device program and connects to pins, sensors, and outputs.

Voltage Vera is your guide for this deck.

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

After studying this chapter

Learning objectives

You will be able to:

  • Apply a systematic decision framework to choose between BJT and MOSFET transistors for a given IoT application
  • Distinguish between logic-level and standard MOSFETs and explain why logic-level devices are required for 3.3V/5V microcontroller circuits
  • Choose BJT or MOSFET switches for IoT loads
  • Evaluate voltage, current, heat, and switching ratings
iotclass.org

Major section

Deep dive: Putting Numbers to It

This exceeds most GPIO limits, requiring a driver stage.

  • A power NPN BJT (TIP31C, rated for 3A) has $V_{CE(sat)} = 0.5V$, giving power dissipation $P_{BJT} = V_{CE(sat)} \times I_C = 0.5V \times 2A = 1W$.
  • For simplicity, assume a base driver provides adequate current.
  • Gate current is essentially zero (<1µA).

Numbers to remember

3Arated for 3A) has $V_{CE(sat)} = 0.5V$
iotclass.org

Major section

Phoebe's Field Notes: Why the MOSFET Runs Cooler

The mathematical gist.: At load current $I$, a saturated BJT spends $V_{CE(sat)}I$ in its main path plus $(V_{drive}-V_{BE})I/\beta$ in base drive.

  • For this chapter's 2.00 A motor case, those ledgers give 1.344 W against 0.112 W, a 12.0x loss advantage, before package temperature limits are checked.
iotclass.org

Major section

Checkpoint: Family Choice

Once the transistor family is narrowed, choose where the switch sits in the load path.

  • Its purpose is to reveal MOSFET Switching Circuits: Low-Side, High-Side, and H-Bridge Configurations before a design claim is accepted.
  • This connects the visual to transistor switching circuits for iot by making the relevant component behaviour part of the design check.

Key terms

Lamp
Lamp is the load whose current bypasses the logic input.

Numbers to remember

80%while : N-Channel MOSFET (80% of use cases) marks the contrasting role
MOSFET Switching Circuits: Low-Side, High-Side, and H-Bridge Configurations
MOSFET Switching Circuits: Low-Side, High-Side, and H-Bridge Configurations
iotclass.org

Major section

Checkpoint: Family Choice (continued)

The detailed criteria below are the safety checks that decide whether that part survives in the actual product.

  • NPN BJT Switch Circuit names the low-side device,: Load Out shows the controlled relay node, and: Diode spans the inductive load to carry current when the transistor turns off.
  • The: Flywheel path matters for an inductive load even though the pictured lamp itself is resistive.
  • The recommendation table gives a starting part.
iotclass.org

Major section

Checkpoint: Family Choice (continued)

At the left of Figure: N-channel FET as a switch, FET as a Switch Circuit establishes the low-side topology; the: Lamp is the load whose current bypasses the logic input.

  • Relating those labels to the input and output traces shows why the MOSFET gate network, load supply, and transient protection must be specified as one switching circuit.
  • The visual shows a small-signal transistor in the through-hole TO-92 package -- the same footprint as the 2N2222, 2N3904, and BC547 parts in the recommendation table above.
  • The running iot transistor recommendations narrative uses that consequence to decide what is safe and measurable.
iotclass.org

Major section

Checkpoint: Ratings and Gate Drive

The valve example ties together load current, flyback protection, GPIO limits, outdoor temperature, and battery life.

  • Solenoid: 12V → need ≥24V rating for safety (2x rule).
  • With flyback diode, inductive spikes are clamped to ~12.7V.
  • Requirement: V_DS ≥ 24V (flyback diode limits spike voltage).
  • Requirement: I_D ≥ 400mA (most MOSFETs exceed this).

Numbers to remember

12VSolenoid: 12V → need ≥24V rating for safety (2x rule).
≥24VSolenoid: 12V → need ≥24V rating for safety (2x rule).
~12.7Vinductive spikes are clamped to ~12.7V.

Why it matters

I_D: 115mA continuous (2N7002, SOT-23 package limited; OK for 50mA nominal because the 200mA inrush is brief).

iotclass.org

Major section

LoRaWAN Valve Transistor

The system runs on 4× AA batteries (6V total) with a boost converter to 12V.

  • The LoRa module (RFM95) GPIO output is 3.3V at 12mA max.
  • Battery life target is 2 years with 10 valve actuations per day, each lasting 30 seconds.
  • With flyback diode, voltage spikes are clamped to ~V_supply + V_diode_forward (~12.7V).

Key terms

Logic-level
Logic-level is non-negotiable for 3.3V systems - standard MOSFETs won't fully turn on, causing excessive heat 3.

Numbers to remember

3.3VThe LoRa module (RFM95) GPIO output is 3.3V at 12mA max.
iotclass.org

Major section

LoRaWAN Valve Transistor (continued)

Selected rating: 55V (IRLZ44N, provides ample margin with flyback diode).

  • Worst-case Rds(on) at V_GS=3.3V: Need from datasheet.
  • Example candidate: IRLZ44N has Rds(on) = 28mΩ @ V_GS=4.5V, approximately 35mΩ @ 3.3V.
  • AA batteries in series: 2,500 mAh capacity (series does not multiply mAh).
iotclass.org

Major section

LoRaWAN Valve Transistor (continued)

Gate resistor: 10kΩ pull-down from gate to ground (keeps MOSFET OFF when RFM95 is sleeping).

  • Gate series resistor: 100Ω between GPIO and gate (limits current spikes).
  • Inductive loads always need flyback diodes - without it, inductive kickback can generate 300V+ spikes destroying the MOSFET.
  • Logic-level is non-negotiable for 3.3V systems - standard MOSFETs won't fully turn on, causing excessive heat.
iotclass.org

Major section

Deep dive: Re-deriving the chapter's numbers

The BJT case begins with required collector current and a conservative forced gain, exposing an 80 mA base-current demand that a typical GPIO cannot supply.

  • The valve example then carries that MOSFET loss through daily on-time, two-year battery charge, and package thermal resistance.
  • The design implication is that the MOSFET is not just more efficient in the calculator.
  • It removes an impossible GPIO base-current demand, leaves thermal headroom for outdoor temperatures, and keeps the battery penalty small enough that the valve coil energy dominates the lifetime budget.
iotclass.org

Major section

Chapter Summary

The worked examples have done the arithmetic; the summary turns those checks into a reusable field procedure.

  • Logic-level MOSFETs are essential for microcontroller-driven circuits.
  • Standard MOSFETs require Vgs = 10V to achieve their rated Rds(on), leading to excessive heating when driven from 3.3V/5V GPIOs.
  • Gate pull-down resistors keep MOSFETs off during microcontroller reset or sleep states.

Key terms

Protection circuits
Protection circuits are non-negotiable for inductive loads: flyback diodes across relay coils, solenoids, and motors prevent destructive voltage spikes when the transistor switches off.
iotclass.org

Major section

For Kids: Meet the Sensor Squad!

Max picked up a MOSFET called the 2N7000. "Let's check if this one works for us.

  • I need a transistor helper.".
  • The Sensor Squad went to the Electronics Store, where they found LOTS of transistors. "There are two main types," explained Temperature Terry. "BJTs and MOSFETs.".
  • Voltage rating: 60V -- our valve is 12V, so we have plenty of safety margin.

Numbers to remember

60VVoltage rating: 60V -- our valve is 12V
12VVoltage rating: 60V -- our valve is 12V
200mACurrent rating: 200mA -- that's double what our valve needs
iotclass.org

Major section

For Kids: Meet the Sensor Squad! (continued)

"A BJT is like a faucet," said the LED. "You have to keep pushing the handle (sending current to the base) to keep it open.

  • If you let go, it closes." "A MOSFET is like a light switch," added the battery. "You just flip it (send voltage to the gate) and it stays on without you pushing.
  • Current rating: 200mA -- that's double what our valve needs, giving us a safety margin.
  • "Don't forget the flyback diode!" warned Sammy. "The valve has a coil inside that stores energy in a magnetic field.
iotclass.org

Deck summary

Key takeaways

This exceeds most GPIO limits, requiring a driver stage.

  • The mathematical gist.: At load current $I$, a saturated BJT spends $V_{CE(sat)}I$ in its main path plus $(V_{drive}-V_{BE})I/\beta$ in base drive.
  • Once the transistor family is narrowed, choose where the switch sits in the load path.
  • The detailed criteria below are the safety checks that decide whether that part survives in the actual product.
  • At the left of Figure: N-channel FET as a switch, FET as a Switch Circuit establishes the low-side topology; the: Lamp is the load whose current bypasses the logic input.
iotclass.org

Retrieval practice

Recall check 1 of 5

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

Q1You're building a smart home temperature sensor. The circuit works on your bench but fails when deployed in your attic at 60°C (140°F). Your design uses a 2N2222 NPN transistor (TO-92 package) to switch a 500mA fan. What's the most likely cause?

AThe ESP32 is overheating due to ambient temperature
BThe BJT overheats; junction temperature exceeds its rating.
CThe 60°C ambient damages the silicon in the transistor
DIncreased resistance in copper traces due to heat
Show answer

Answer: B Explanation: The 2N2222 is experiencing thermal runaway.

iotclass.org

Retrieval practice

Recall check 2 of 5

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

Q2You'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 losses + insufficient gate voltage.

iotclass.org

Retrieval practice

Recall check 3 of 5

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

Q3You're debugging an H-bridge motor controller. Motor runs forward (A-high, B-low) and reverse (A-low, B-high) correctly. But during direction changes, you hear a loud "pop" and see 5A current spikes, occasionally blowing fuses. What's wrong?

AMotor is defective - internal short circuit
BH-bridge MOSFETs have insufficient current rating
CPower supply voltage too high for motor
DShoot-through during high/low-side MOSFET overlap.
Show answer

Answer: D Explanation: Shoot-through (cross-conduction) occurs when both high-side and low-side MOSFETs conduct simultaneously, creating a short circuit from Vcc to ground.

iotclass.org

Retrieval practice

Recall check 4 of 5

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

Q4You're designing a LoRaWAN sensor node that must operate for 5 years on AA batteries. The microcontroller spends 99.9% of time in deep sleep (1µA), waking every 10 minutes to transmit (50mA for 1 second). Which power switching strategy extends battery life most?

ANo switching - all components always powered
BNPN BJT to switch 5V to sensors during wake
CP-channel high-side MOSFET with <1µA leakage
DRelay for perfect isolation when OFF
Show answer

Answer: C Explanation: P-channel MOSFET for high-side switching is optimal for ultra-low-power battery applications.

iotclass.org

Retrieval practice

Recall check 5 of 5

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

Q5Place each electronics concept where it lives so you can reject a transistor that cannot be driven, protected, or cooled in the real circuit.

ALoad requirement
BScreen brightness
CWi-Fi password
DJSON payload
Show answer

Answer: A These boundaries keep define the load, prove control, prove heat distinct so you can reject a transistor that cannot be driven, protected, or cooled in the real circuit.

Q6Complete the quick transistor-family recommendation helper:

Aneeds_mosfet = load_current_ma > 500 or pwm_hz > 10000 or battery_powered
Bneeds_mosfet = load_current_ma < 10 and pwm_hz == 0
Cneeds_mosfet = load_current_ma + pwm_hz
Dneeds_mosfet = battery_powered == False
Show answer

Answer: A For most IoT loads, high current, PWM switching, or battery operation pushes the design toward a logic-level MOSFET.

iotclass.org

Print reference

Answers 1 of 2

Answer key.

  1. B · Explanation: The 2N2222 is experiencing thermal runaway.
  2. B · Explanation: The problem is excessive conduction losses + insufficient gate voltage.
  3. D · Explanation: Shoot-through (cross-conduction) occurs when both high-side and low-side MOSFETs conduct simultaneously, creating a short circuit from Vcc to ground.
  4. C · Explanation: P-channel MOSFET for high-side switching is optimal for ultra-low-power battery applications.
iotclass.org

Print reference

Answers 2 of 2

Answer key.

  1. A · These boundaries keep define the load, prove control, prove heat distinct so you can reject a transistor that cannot be driven, protected, or cooled in the real circuit.
  2. A · For most IoT loads, high current, PWM switching, or battery operation pushes the design toward a logic-level MOSFET.
iotclass.org