Electronics Basics

LEDs, resistors, and why current matters

LEDs and resistors look simple, but they teach one of the most important lessons in electronics: voltage is only part of the story. Current is what heats parts, burns traces, trips power supplies, kills microcontroller pins, melts wires, creates shorts, and causes the puff of white smoke.

Voltage Check the board, battery, USB rail, or supply first
Current Know what the part will try to pull through the circuit
Limit Use the resistor so the LED and pin stay within limits
Test Start small, measure, and watch for heat or flicker
A resistor is not decoration. It controls current so small parts do not become heaters.

Why current matters

A circuit does not fail because electricity is “there.” It fails because too much current flows through something that cannot handle it.

Core idea: current is the actual electrical load moving through the circuit. Too much current turns wires, resistors, LEDs, chips, traces, and connectors into heaters. That is why small mistakes can become hot parts, dead pins, burned boards, or smoke.

Voltage pushes the circuit

A 5 V Arduino pin, a 3.3 V ESP32 pin, a USB power bank, a 9 V battery, and a 12 V supply are all voltage sources. The voltage tells you the electrical pressure available to the circuit.

Current is the demand

The part connected to the source decides how much current it tries to draw. A tiny LED, a motor, a relay coil, a fan, and a dead short all demand very different amounts of current.

The puff of white smoke usually means current won

The “puff of white smoke” is not random. It usually happens when a part is forced to pass more current than it was designed for, or when power reaches a path it was never supposed to reach.

01
No current limit
An LED connected directly to power can try to pull too much current and destroy itself.
02
Short circuit
Positive touches ground with almost no resistance. Current spikes hard and something becomes the fuse.
03
Wrong voltage
A 3.3 V sensor on 12 V is not “getting extra power.” It is being destroyed.
04
Weak wire or connector
Thin jumper wires, breadboard rails, cheap clips, or tiny PCB traces can overheat if the load is too high.
05
Backwards polarity
Some parts block reverse voltage. Others fail quickly. Electrolytic capacitors can fail violently when reversed.
Related guide: Read The Puff of White Smoke for the bigger failure-pattern view.

What an LED really is

An LED is not just a tiny light bulb. It is a diode that emits light. That means it has direction, polarity, and a current limit.

LED means light-emitting diode

A diode mostly allows current to flow in one direction. An LED does the same thing, but it gives off light when current flows through it correctly.

LEDs have polarity

The longer leg is usually positive on a new through-hole LED. The flat side of the LED body usually marks the negative side. Always check if the part is salvaged or unclear.

LEDs need current limiting

Once an LED turns on, it does not naturally limit itself well. Without a resistor or driver, it can pull too much current and burn out.

Beginner trap: an LED may flash once without a resistor and seem fine. That does not mean the circuit is correct. It may already be damaged, weakened, or running outside its safe range.

What a resistor does in this circuit

A resistor limits current. In an LED circuit, it protects the LED, the power source, and the microcontroller pin driving it.

5V or GPIO pin  →  resistor  →  LED  →  ground

The resistor can go before or after the LED. In a simple series circuit, the same current flows through both parts.

Too little resistance

More current flows. The LED may be very bright for a short time, then dim forever, burn out, or damage the pin powering it.

More resistance

Less current flows. The LED is dimmer, the circuit is safer, and the microcontroller pin has less stress.

The practical resistor calculation

You do not need to turn this into a math class. You just need a safe way to choose a resistor.

resistor value = (supply voltage - LED voltage) / target current
5V
Red LED example
A red LED may drop around 2 V. If you want about 10 mA: (5 V - 2 V) / 0.01 A = 300 ohms. Use a common value like 330 ohms.
3.3V
ESP32-style example
(3.3 V - 2 V) / 0.01 A = 130 ohms. A 220 ohm or 330 ohm resistor is often gentler and still bright enough for an indicator LED.
12V
Higher-voltage example
(12 V - 2 V) / 0.01 A = 1000 ohms. This is why directly connecting a bare LED to a 12 V rail is a bad idea.

Practical rule: for basic indicator LEDs, start conservative. A slightly larger resistor usually just makes the LED dimmer. Too small of a resistor can destroy parts.

Arduino and ESP32 pins are not power outlets

Microcontroller pins are for logic signals and small loads. They are not meant to power motors, fans, LED strips, relay banks, heaters, solenoids, or anything that pulls serious current.

One indicator LED

Usually fine with a proper resistor. This is the classic beginner circuit because the load is small.

Many LEDs

Current adds up. Ten LEDs at 10 mA each is already 100 mA, which should not be pulled through one tiny microcontroller pin.

Motors and relays

Use a transistor, MOSFET, relay module, motor driver, or dedicated power circuit. The GPIO pin should control the load, not carry the load.

Related guide: Read Arduino and ESP32 Pin Safety before connecting loads directly to GPIO pins.

Short circuits: when the circuit skips the work

A short circuit gives current an easy path from positive to ground. Instead of going through the intended load, current takes the low-resistance path. That can heat wires, brown out the supply, reset boards, trip protection, or burn something open.

Important: a short does not need to look dramatic. A single loose copper strand, solder bridge, reversed breadboard rail, or metal project box touching a terminal can be enough.
01
USB port shuts off
Some USB ports and power banks protect themselves by cutting power when a short or overload happens.
02
Battery gets hot
Batteries can deliver a lot of current. A shorted battery circuit can heat wires very quickly.
03
Trace burns like a fuse
On a PCB, a thin copper trace can become the weakest point and burn open.
04
Part becomes the fuse
If there is no actual fuse, the weakest component may fail first.
Related guide: Read Power Rails, Ground, and Polarity before building power rails on a breadboard or project box.

Why you can get shocked

A shock happens when your body becomes part of a circuit. The danger depends on voltage, available current, path through the body, contact area, skin condition, duration, and the power source.

Low-voltage hobby circuits

Arduino, ESP32, AA battery, USB, and small sensor circuits are usually low shock risk, but they can still burn parts, short wires, damage boards, or overheat if wired incorrectly.

Mains and large capacitors

Wall power, power supplies, amplifiers, CRTs, microwaves, and large capacitors can be dangerous even after a device is unplugged.

Safety line: low-voltage electronics are good for learning. Mains wiring and unknown power supplies are not beginner playgrounds. If a circuit plugs into the wall, treat it differently.
Related guide: Read Capacitors to understand why stored energy can still exist after power is disconnected.

Power draw: why one LED is easy and a strip is different

A single LED with a resistor is a tiny load. A strip of LEDs, a fan array, a motor, or a relay board is a power system. The wiring, supply, connectors, and switching method all start to matter.

Small
One indicator LED
Good for breadboards, GPIO pins, and beginner testing when a resistor is used.
Medium
Several LEDs or modules
Check total current. Power from a proper rail instead of forcing everything through one pin.
Large
LED strips, motors, fans, relays
Use external power, correct wire gauge, MOSFETs or drivers, fuses where appropriate, and common ground when needed.

Full-circle idea: clean wiring, correct polarity, resistor values, capacitor smoothing, and current limits are all connected. Most electronics failures are not mysterious. They are power problems, connection problems, or current problems.

Real beginner circuits

These are small circuits that teach useful habits without jumping straight into dangerous power.

LED power test

Use a resistor and LED to verify that a rail is live. This is useful on breadboards, project boxes, and simple power distribution boards.

GPIO indicator

Connect an LED and resistor to an Arduino or ESP32 pin to show when code turns a signal on. Blink is simple, but it proves software is controlling real hardware.

Current-limited panel light

Add an LED to a project box as a power indicator. Use heat shrink, clean wiring, and strain relief so the light survives being moved.

Related guides: Wire Cutters, Clean Wiring, and Strain Relief and Soldering Station Basics help turn the circuit into something that physically holds up.

Quick LED checklist

Before powering an LED circuit:

[ ] Correct voltage source
[ ] LED polarity checked
[ ] Resistor in series with the LED
[ ] Resistor value is reasonable
[ ] No bare wires touching
[ ] No positive-to-ground short
[ ] GPIO pin is not powering a large load
[ ] Power supply can handle the total current
[ ] Wires and connectors match the load
[ ] Multimeter ready if something looks wrong
Related guide: Read Multimeter Basics to check voltage, continuity, shorts, and power rails before guessing.

Common resistor values for simple LEDs

These are not magic values. They are safe starting points for basic indicator LEDs. The exact value depends on supply voltage, LED color, brightness target, and current limit.

Supply Common starting resistor What to expect
3.3 V 220 Ω to 330 Ω Usually safe for small indicator LEDs on ESP32-style projects.
5 V 330 Ω to 1 kΩ Good beginner range for Arduino-style LED indicators.
9 V 680 Ω to 1 kΩ+ Higher voltage needs more resistance for the same LED current.
12 V 1 kΩ+ Do not connect a bare LED directly to 12 V. Use the resistor calculation.

How this connects to the rest of the electronics path

LEDs and resistors are not throwaway beginner parts. They are the first clean lesson in polarity, current limiting, power rails, shorts, GPIO safety, wiring quality, measurement, and failure analysis.

LEDs
Show circuit state
Power indicators, status lights, test outputs, fault signals, and debugging clues.
Resistors
Control current
Protect LEDs, set signal behavior, divide voltage, pull inputs up or down, and prevent floating pins.
Capacitors
Support unstable power
Smooth dips, support quick current bursts, and help stop random resets from noisy loads.
Multimeter
Verify before guessing
Check voltage, continuity, polarity, and shorts before plugging in the next part.

Final idea

Current is where the consequences show up. LEDs need resistors because they cannot safely limit current on their own. Microcontroller pins need protection because they are not power supplies. Wires and traces need current limits because they can become heaters. Once that clicks, the puff of white smoke becomes less mysterious and more preventable.

Back to top Power rails Capacitors Back to guides