Volts, amps, watts — and the two rules that stop you frying your board.
This lesson is the one that protects your hardware. Most beginner disasters — dead pins, smoked
boards, mystery resets — come from misunderstanding power. Three ideas and two hard rules will keep
your home-automation gear alive.
The one win
You can answer two questions for any project: "Will this voltage damage my board?" and
"Can this pin supply enough current to drive that thing?"
Watts: how much work is being done
Power, measured in watts (W), is just voltage
times current: P = V × I. In plain terms — power is how much electrical work is
happening per second. It's what makes things bright, hot, or move. A device's power tells
you how much current it'll pull at a given voltage. That's all you need from the formula.
Rule 1 — Match the voltage (3.3V vs 5V)
Different boards run at different logic voltages. A classic Arduino Uno uses
5V. The ESP32 — your likely home-automation brain, because of its
built-in WiFi — runs at 3.3V. This difference is the single biggest "magic smoke"
trap for beginners
(SparkFun: Logic Levels).
The trap
Feeding a 5V signal into a 3.3V pin (like an ESP32's) can permanently damage it.
A 5V sensor's output wired straight to a 3.3V input is a common way to kill a board. When mixing
3.3V and 5V parts, you need a logic level converter (a cheap little board)
between them.
Going the other way is usually fine for power but check each part's datasheet for
signals — many 5V devices won't reliably read a 3.3V "HIGH."
Rule of thumb: know your board's voltage before you wire anything to its pins.
Write it on a sticky note: "ESP32 = 3.3V."
Rule 2 — Respect the current limit of a pin
A microcontroller pin is a signal, not a power supply. It can source only a tiny current —
roughly 20–40 mA per pin, with a total budget across all pins. That's enough to light
an LED. It is nowhere near enough to run a motor, a relay coil, a strip of LEDs, or a pump.
The trap
Wiring a motor or relay coil directly to a pin will, at best, brown out your board (random resets)
and at worst destroy the pin. Bigger loads need their own power and a "helper" switch
— a transistor or relay — which is exactly where Lessons 6 and 7 go.
A pin can flick a small load directly; anything hungry needs separate power and a helper switch.
The golden wiring rule: common ground
When your project has more than one power source (say, USB into the ESP32 plus a separate 5V supply
for a motor), their grounds must be connected together. Current needs a complete loop
(Lesson 1!) — without a shared GND reference, signals have nothing to measure against and
nothing works, or behaves erratically.
Rule of thumbAll grounds tie together. Separate + supplies are fine and often
necessary — but every part of the project must share one common GND.
Where your project's power comes from
USB (5V) powers the board and gets regulated down on-board to 3.3V for an ESP32.
A separate supply (a "wall wart" / DC adapter) for hungry loads — sized to the
load's voltage and at least its current draw.
Regulators step one voltage down to another cleanly. The "3V3" pin on an ESP32
board is a regulated output you can borrow small amounts from.
Check yourself
Recall first.
Read this next (primary source)SparkFun — Logic Levels.
The clearest explanation of why 3.3V and 5V parts need care when they meet.
I'm your teacher — ask me anything. Before you connect a new module, paste me its
name and your board, and I'll sanity-check the voltage and current. Cheap insurance against smoke.