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 VCE(sat)=0.5VV_{CE(sat)} = 0.5VVCE(sat)​=0.5V, giving power dissipation PBJT=VCE(sat)×IC=0.5V×2A=1WP_{BJT} = V_{CE(sat)} \times I_C = 0.5V \times 2A = 1WPBJT​=VCE(sat)​×IC​=0.5V×2A=1W.
  • For simplicity, assume a base driver provides adequate current.
  • Gate current is essentially zero (<1µA).
iotclass.org

Major section

Circuit note: Why the MOSFET runs cooler

At 2.00 A, compare 1.344 W for the BJT with 0.112 W for the MOSFET, then check package temperature.

  • 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.
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 running iot transistor recommendations narrative uses that consequence to decide what is safe and measurable.

  • 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: 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).

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

Worked Example: 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.
iotclass.org

Major section

Worked Example: 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

Worked Example: 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

Screen the candidate transistor

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

Check load voltage, maximum current, gate drive, on-state loss, and temperature against the exact part.

Screen the exact transistor
ElectricalCheck load voltage and maximum current.
DriveUse available gate voltage.
ThermalCalculate on-state loss and temperature.
Check load voltage, maximum current, gate drive, on-state loss, and temperature against the exact part.
iotclass.org

Major section

Control mechanism is not a rating

"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.

BJT: continuing base current. MOSFET: gate voltage and transition charge. Both require a rated load path and thermal check.

Mechanism does not establish rating
BJTContinuing base current controls conduction.
MOSFETGate voltage and transition charge matter.
BothRequire a rated load path and thermal check.
BJT: continuing base current. MOSFET: gate voltage and transition charge. Both require a rated load path and thermal check.
iotclass.org

Deck summary

Key takeaways

This exceeds most GPIO limits, requiring a driver stage.

  • The mathematical gist: At load current III, a saturated BJT spends VCE(sat)IV_{CE(sat)}IVCE(sat)​I in its main path plus (Vdrive−VBE)I/β(V_{drive}-V_{BE})I/\beta(Vdrive​−VBE​)I/β in base drive.
  • Once the transistor family is narrowed, choose where the switch sits in the load path.
  • The running iot transistor recommendations narrative uses that consequence to decide what is safe and measurable.
  • The valve example ties together load current, flyback protection, GPIO limits, outdoor temperature, and battery life.
iotclass.org

Retrieval practice

Recall check 1 of 5

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

Q1A 2N2222 in a TO-92 package switches a 500 mA fan in a 60°C attic. Its measured saturated voltage is 0.3 V and the assumed junction-to-ambient thermal resistance is 200°C/W. Which concern should you check against the specific part’s ambient-temperature derating?

AESP32 overheating solely from the attic ambient temperature
BBJT conduction loss of 0.15 W, with package derating and switching loss to check
CTransistor damage proven solely by the 60 °C attic air temperature
DCopper resistance rise alone as the cause without transistor power review
Show answer

Answer: B see answers page

iotclass.org

Retrieval practice

Recall check 2 of 5

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

Q2A 12 V, 2 A door-lock motor uses an H-bridge of four IRF530N MOSFETs. Each has Rds(on) = 160 mΩ at the measured 10 V gate drive. With ambient at 60°C and junction-to-ambient thermal resistance of 70°C/W, operating MOSFETs reach about 105°C. Which selection issue best explains this heat?

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 see answers page

iotclass.org

Retrieval practice

Recall check 3 of 5

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

Q3An H-bridge motor runs normally in either direction, but supply current spikes during direction changes. A scope shows the high-side and low-side MOSFETs in the same bridge leg conduct at the same time during each spike, even with the motor disconnected. What fault does this identify?

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 The scope measurement identifies shoot-through: both devices in one leg conduct together during a direction transition, causing a supply-current spike even without the motor.

iotclass.org

Retrieval practice

Recall check 4 of 5

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

Q4A battery LoRaWAN node sleeps for 599 seconds at 1 µA and transmits for 1 second at 50 mA in every 600-second cycle. A sensor draws 100 µA standby if left powered. Its signal ground must remain connected to the MCU, and the available relay is non-latching. Which way to disconnect sensor power during sleep best protects battery life?

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 The P-channel high-side switch removes power from the sensor while retaining its common ground.

iotclass.org

Retrieval practice

Recall check 5 of 5

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

Q5Q5: transistor requirementsWhat turns switching loss and on-resistance into a temperature and margin decision?

AThermal check
BLoad requirement
CLogic-level gate
DFlyback protection
Show answer

Answer: A It converts on-resistance and switching loss into a temperature and margin decision.

Q6Q6: family recommendation helperComplete 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 · At 500 mA and 0.3 V saturated drop, conduction loss is 0.15 W. The stated thermal resistance gives a 30°C rise, or approximately 90°C junction temperature at 60°C ambient. That arithmetic alone cannot establish failure or a junction-rating exceedance. Check the actual TO-92 part’s derated power rating at the ambient temperature, switching losses, mounting, and measured temperatures. A suitable lower-loss switch may provide more margin.
  2. B · With the measured 10 V gate drive, use the stated 160 mΩ on-resistance: each conducting MOSFET loses 0.64 W at 2 A. A conducting pair loses 1.28 W, and 0.64 W × 70°C/W predicts a 44.8°C junction rise per device. At 60°C ambient that is roughly 105°C, consistent with the observation. Choose an appropriately rated lower-resistance device and check Rds(on) at the actual drive voltage, thermal path, switching losses, and motor start or stall current.
  3. D · The scope measurement identifies shoot-through: both devices in one leg conduct together during a direction transition, causing a supply-current spike even without the motor.
  4. C · The P-channel high-side switch removes power from the sensor while retaining its common ground.
  5. A · It converts on-resistance and switching loss into a temperature and margin decision.
iotclass.org

Print reference

Answers 2 of 2

Answer key.

  1. A · For most IoT loads, high current, PWM switching, or battery operation pushes the design toward a logic-level MOSFET.
iotclass.org