2  How Electricity Works

electronics
electricity

2.1 Start Simple

Imagine an LED that sometimes turns on and sometimes stays dark. Before blaming the program, check the loop: source, load, return path, current limit, and a voltage you can measure across the part. Start with one safe path that works before adding sensors, radios, or firmware decisions.

Phoebe the physics guide

Phoebe’s Why

A battery is not an ideal voltage source; it always has some internal resistance \(R_{int}\) in series with its true EMF \(V_{oc}\), which is exactly the “source to rail” handoff this chapter’s own debugging list points at. Every load draws current through that internal resistance too, so some of the chemical energy is always spent heating the battery itself before the rest reaches the load. Two different questions have two different right answers here: “what load draws the most power out of this battery” is answered by calculus, and “what load wastes the least energy as heat inside the battery” is answered by simple algebra – and IoT designers almost always want the second answer, not the first.

The Derivation

Current from a battery with \(V_{oc}\), \(R_{int}\) driving a load \(R_{load}\):

\[I = \frac{V_{oc}}{R_{int}+R_{load}}\]

Power delivered to the load:

\[P_{load} = I^2 R_{load} = \frac{V_{oc}^2\,R_{load}}{(R_{int}+R_{load})^2}\]

Maximizing with calculus, \(dP_{load}/dR_{load}=0\), gives the matched-load condition:

\[R_{load}=R_{int} \implies P_{load,max}=\frac{V_{oc}^2}{4R_{int}}\]

But efficiency – the fraction of power that actually reaches the load instead of heating the battery – is a separate quantity:

\[\eta = \frac{R_{load}}{R_{int}+R_{load}}\]

At the matched-load condition \(\eta=50\%\); efficiency keeps climbing toward \(100\%\) only as \(R_{load}\) grows well past \(R_{int}\), even though \(P_{load}\) itself falls once \(R_{load}>R_{int}\).

Worked Numbers: One AA Cell, Two Different Loads

  • Cell: \(V_{oc}=1.50\) V; catalog-typical fresh alkaline AA \(R_{int}\approx0.150\ \Omega\)
  • Matched load (\(R_{load}=R_{int}=0.150\ \Omega\)): \(I=1.50/0.300=5.00\) A, \(P_{load}=5.00^2\times0.150=3.75\) W \(=V_{oc}^2/4R_{int}\), efficiency \(=50.0\%\) – and \(5.00\) A is close to a dead short for a single AA cell, not a real operating point
  • A realistic sensor-node load (\(R_{load}=330\ \Omega\)): \(I=1.50/330.15=4.54\) mA, \(P_{load}=4.54^2\times10^{-6}\times330=6.81\) mW, efficiency \(=330/330.15=99.95\%\)
  • The lesson in one line: the “maximum power” load point burns half the battery’s energy as internal heat and would flatten a AA cell in minutes; the everyday IoT load, with \(R_{load}\gg R_{int}\), wastes only \(0.05\%\) of the delivered energy as internal heat – the physical reason a sane IoT design keeps its load resistance high relative to the source instead of “matching” it.

Overview: What Electricity Must Explain

Electricity fundamentals give an IoT designer a way to reason about whether a circuit can power, protect, measure, and communicate safely. The core ideas are voltage, current, resistance, power, grounding, and the closed path that lets charge move through a load and back to its source.

The practical claim is not just "the board turns on." The practical claim is that every load has the right voltage, the expected current path, enough power margin, a shared reference where needed, and measurement evidence that matches the design.

Closed circuit showing a battery as the voltage source, current around the loop, a resistor limiting current, and a lamp load turning electrical energy into light and heat.
Read the circuit as four linked claims: the source provides the push, the closed loop gives current a return path, the resistor limits the flow, and the load turns electrical power into useful output plus heat.

This is the beginner model to keep while debugging. A voltage value is always between two nodes, a current value belongs to a path through a component, a resistance value only explains behavior under the right conditions, and a power value tells you what the battery, regulator, package, or enclosure must survive. Treat those quantities as separate evidence, then connect them with Ohm's Law and measured data.

If you only need the intuition, this layer is enough: voltage pushes, current flows, resistance limits, power heats and drains sources, ground is the reference, and measurement proves the circuit.

The Four Quantities Beginners Must Separate

Voltage

Electrical potential difference between two points. It is measured across components and usually referenced to ground.

Current

Charge flow through a path. It is measured in series with the load and must return to the source.

Resistance

Opposition to current. It is useful for limiting current, setting dividers, sensing conditions, and protecting pins.

Power

Energy use per time. It determines battery drain, heat, regulator load, and component power ratings.

Beginner Rules Of Thumb

  • A circuit needs a complete path from source, through load, and back to the source.
  • Voltage is measured between two points, not at a point in isolation.
  • Current through a microcontroller pin must stay below the pin and package limits.
  • Ohm's Law is for resistive behavior; diodes, motors, capacitors, and radios need additional checks.
  • Power ratings matter because excessive current or voltage drop becomes heat.
  • Measurement should match the real wiring, firmware state, and supply used in deployment.

Overview Knowledge Check

Practitioner: Build A Circuit Review Ledger

A practical electronics review should produce a small ledger for the circuit. The ledger does not replace a schematic, but it makes the important assumptions visible: what each rail supplies, which loads draw current, where the return path runs, which limits protect components, and what measurement proves the design.

The safest workflow is to review voltage, current, resistance, power, and reference behavior before connecting a fragile part. In IoT work, that usually means checking sensor supply range, GPIO voltage compatibility, pull-up values, current limits, regulator heat, battery capability, and the exact measurement setup.

Circuit Review Sequence

  1. Name the rails. Record source voltage, regulated rails, allowed range, and what each rail powers.
  2. Trace current paths. Follow current from source through load and back through ground or return wiring.
  3. Check limiting parts. Confirm resistors, pull-ups, dividers, fuses, protection parts, and component ratings.
  4. Compute power. Convert voltage and current into heat, battery drain, regulator load, and safe margins.
  5. Measure the real circuit. Check voltage across loads and current through loads in the actual firmware state.
  6. Retest after changes. Repeat the ledger when wiring, firmware state, load, source, or environment changes.

Evidence Ledger

Review Item
What To Record
Common Failure
Retest Trigger
Voltage
Rail name, nominal voltage, allowed range, reference point, and measured voltage at the load.
The supply is measured at the source but drops at the sensor, relay, or radio module.
Source, regulator, cable length, connector, load current, or power mode changes.
Current
Expected load current, peak current, sleep current, return path, and current-limit evidence.
A GPIO pin or regulator is expected to supply more current than its rating allows.
Load, firmware state, duty cycle, relay, radio power, LED, or sensor warm-up changes.
Resistance
Current-limiting resistor, pull-up or pull-down value, divider ratio, tolerance, and power rating.
A resistor value is copied without checking the actual supply, LED drop, bus speed, or input impedance.
Supply voltage, LED, bus capacitance, sensor input, divider target, or measurement instrument changes.
Power and ground
Power per component, regulator dissipation, battery impact, shared ground, return path, and safe margin.
Current returns through an unintended path, or heat and battery drain are ignored until the prototype fails.
Enclosure, duty cycle, battery, regulator, cable, load sharing, or grounding layout changes.

Practitioner Knowledge Check

Under The Hood: Why Simple Circuits Still Fail

Ohm's Law and the power law are simple, but the real circuit contains handoffs. A battery hands energy to a regulator. The regulator hands a rail to loads. Loads share ground and signal references. Firmware changes the current state. Measurement tools alter or reveal the circuit. A failure at any handoff can make a correct-looking schematic behave badly.

Use formulas as checks, not as decoration. For a resistor, V = I x R links voltage drop, current, and resistance. For a load, P = V x I links electrical behavior to heat and energy use. When voltages differ, compare power or energy instead of adding currents from different rails.

Debug those handoffs in order. Start at the source and measure the rail at the load while the load is active. Then check the return path, the signal reference, the limiting resistor or driver, and the power dissipated in each stressed part. If a reset, noisy reading, or hot package appears only in one firmware state, that state is part of the circuit evidence.

Handoff Points To Debug

Source to rail

Battery, USB, regulator, cable, switch, fuse, and connector behavior decide whether the rail stays in range under load.

Rail to load

Sensors, radios, relays, LEDs, and processors draw different current in startup, active, transmit, idle, and sleep states.

Signal to reference

Logic levels need a compatible voltage range and a shared reference. Missing ground can make readings random.

Model to measurement

Datasheets and calculations guide the design, but the accepted claim needs measured voltage, current, and temperature evidence.

Debugging Questions

  • Is the voltage measured at the load while the load is active?
  • Is current measured in the path being reviewed, not across a powered component?
  • Does every signal have a valid reference and compatible logic level?
  • Can the source and regulator handle peak current, not just average current?
  • Does any component dissipate more power than its package and environment can handle?
  • Did the measurement cover startup, radio transmit, actuator movement, sleep, and fault conditions?

Under-the-Hood Knowledge Check

2.2 Summary

  • Electricity fundamentals connect voltage, current, resistance, power, ground, and closed current paths to IoT hardware behavior.
  • A working circuit claim needs measured evidence, not only a schematic or a powered-on board.
  • Ohm’s Law helps review resistive current paths, but components such as LEDs, motors, capacitors, radios, and regulators need additional checks.
  • Power calculations reveal heat, battery drain, regulator load, and component rating problems.
  • Most prototype failures can be traced through source-to-rail, rail-to-load, signal-to-reference, or model-to-measurement handoffs.
Key Takeaway

Treat every IoT circuit as an evidence path: name the rail, trace the current, check the limits, measure the load, and retest after changes.

2.3 See Also

Electricity Introduction

Build the beginner model for voltage, current, resistance, ground, and circuit flow.

Ohm's Law

Use voltage, current, resistance, and power equations for practical component decisions.

Electricity Common Pitfalls

Review unit mistakes, GPIO overcurrent, voltage drops, heat, grounding, and unsafe assumptions.

Electronics Fundamentals

Connect basic electricity to components, semiconductors, switching, and circuit validation.