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.

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
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.
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.
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.
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.
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.
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.
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.
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+).
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.
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?
Show answer
Answer: A The GPIO provides control while the driver carries the load current.
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?
Show answer
Answer: D The wiring separates GPIO base drive from the LED supply current.
Print reference
Answers
Answer key.
- A · The GPIO provides control while the driver carries the load current.
- D · The wiring separates GPIO base drive from the LED supply current.