Electronics & Circuits · Study deck

Electronics: Power and Transistor Switching

A GPIO pin can request that a valve open, but it cannot supply the valve.

Voltage Vera is your guide for this deck.

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 how semiconductors, diodes, and transistors form the foundation of all IoT device hardware
  • Distinguish between conductors, insulators, and semiconductors and describe how doping creates N-type and P-type materials
  • Compare BJT and MOSFET transistors and determine which is appropriate for a given IoT switching or amplification task
  • calculate base or gate drive for a switched load
iotclass.org

Major section

Start Simple

A microcontroller is a small computer built to read inputs and control outputs.

  • GPIO means general-purpose input/output and names the pins used for many of those jobs.
  • An actuator is a part that turns an electrical command into a physical change.
  • The control pin can request the action, but it cannot safely supply the valve's power.

Key terms

Electronics
Electronics is the set of parts that keeps those jobs within safe voltage, current, timing, and protection limits.
iotclass.org

Major section

Start Simple (continued)

A driver must carry the load current.

  • A protection path must handle the energy left when the valve turns off.
  • This path does not explain every semiconductor or switching detail.
  • Electronics is the set of parts that keeps those jobs within safe voltage, current, timing, and protection limits.
iotclass.org

Major section

Key Concepts

Transistor: A controllable semiconductor switch or amplifier; BJTs use base current, while MOSFETs use gate voltage.

  • Logic-level MOSFET: The default IoT power-switching device when a microcontroller must control relays, motors, solenoids, or LED strips without overstressing GPIO pins.
iotclass.org

Major section

Overview

This book is the bridge between basic electricity and practical IoT hardware design.

  • It explains what semiconductors are, how diodes and transistors behave, and how to choose safe switching circuits when a microcontroller needs to control real loads.
iotclass.org

Major section

Chapter Navigation

With that boundary established, compare diode types, applications, and forward versus reverse bias, then use the checks to test whether the physical explanation predicts circuit behaviour.

  • Finish with switching speed, gate-drive requirements, logic-level behaviour, and the practical selection criteria that decide whether a GPIO can control the device safely.
iotclass.org

Major section

How To Use This Book

If you are new to electronics, do not treat the five sections as interchangeable.

  • On a first pass, aim to understand what each component does and when it is used.
iotclass.org

Major section

Smart Light from Silicon

Silicon has 4 valence electrons, making it a semiconductor - not a great conductor, but not an insulator either.

  • This becomes our power rectifier to convert AC wall power to DC.
  • All from Doping Silicon: Every component except resistors and capacitors is made from doped silicon forming PN or NPN/PNP junctions.
  • Key Insight: Electronics is applied semiconductor physics.
iotclass.org

Major section

Deep dive: LED switch numbers

Worked example: With a 33Ω standard resistor, actual current is $I = \frac{2.8V}{33\Omega} = 85\text{ mA}$, which is safe (below 100 mA max) and provides sufficient brightness.

  • Flyback Protection: When relay coil de-energizes, collapsing magnetic field induces voltage spike (can reach 100V+).

Numbers to remember

2.8Vactual current is $I = \frac{2.8V}{33\Omega} = 85\text{ mA}$
100 mAwhich is safe (below 100 mA max)
100Vcollapsing magnetic field induces voltage spike (can reach 100V+).
iotclass.org

Deck summary

Key takeaways

A microcontroller is a small computer built to read inputs and control outputs.

  • A driver must carry the load current.
  • Transistor: A controllable semiconductor switch or amplifier; BJTs use base current, while MOSFETs use gate voltage.
  • This book is the bridge between basic electricity and practical IoT hardware design.
  • With that boundary established, compare diode types, applications, and forward versus reverse bias, then use the checks to test whether the physical explanation predicts circuit behaviour.
iotclass.org

Retrieval practice

Recall check 1 of 2

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

Q1A plant monitor’s GPIO requests a water-valve opening. Which path should supply the valve current?

AThe load supply through a suitable driver
BThe GPIO output without a load driver
CThe sensor input through its measurement resistor
DThe protection path as the normal control signal
Show answer

Answer: A The GPIO provides control while the driver carries the load current.

iotclass.org

Retrieval practice

Recall check 2 of 2

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

Q2An ESP32 controls the example’s high-current LED through a transistor. What does the base resistor path provide?

AThe complete LED current from the GPIO pin
BA replacement for the LED’s current-limiting path
CA measurement input for the LED’s optical output
DA small control current that switches the larger load
Show answer

Answer: D The wiring separates GPIO base drive from the LED supply current.

iotclass.org

Print reference

Answers

Answer key.

  1. A · The GPIO provides control while the driver carries the load current.
  2. D · The wiring separates GPIO base drive from the LED supply current.
iotclass.org