Lite / Textbooks / Electrical and Embedded Systems / Chapter 4
4. Power, energy and batteries
Introduction
Power is volts times amps; energy is power times time. Those two lines decide whether a resistor gets warm, what an appliance costs to run and how long a battery lasts. For battery devices the trick is to stop thinking about peak current and think about the average: a sensor node that wakes for a moment, measures, transmits and sleeps can live for months on a small cell.
Figure 4.1. Average current sets the run time (described in words)
A current-against-time bar: 80 mA for 10% of the time while awake and 2 mA for the other 90% asleep. The average is 9.8 mA, so a 2000 mAh battery lasts about 204 h, about 8.5 days.
Explanation
Built from 3 School lessons. Each part is the lesson's own explanation.
4.1 Electrical power: how fast energy flows
A tiny resistor and a car headlight can both be 'just a resistor'. Why does one stay cool and the other burn too hot to touch?
Watts are joules per second
Power is the rate of energy transfer. P = V × I: a 5 V USB port supplying 2 A delivers 10 W, ten joules every second. A watt is small: a phone charger is a few watts, a robot drive motor tens of watts.
Pick the formula that fits your numbers
Know V and I? Use P = V·I. Know the current and resistance? P = I²·R. Know the voltage and resistance? P = V²/R. All three give the same answer for the same resistor.
Power ratings
Resistors turn all their electrical power into heat. Common small resistors are rated at 0.25 W. 470 Ω on 5 V: P = 25 ÷ 470 ≈ 0.053 W, fine. 100 Ω on 9 V: 0.81 W, too hot. Fix it with a higher-rated resistor (e.g. 1 W) or a larger resistance.
Derivation: Three formulas from one idea
Power is energy per second: P = E ÷ t, in watts (W), where 1 W = 1 J/s.
Voltage is energy per coulomb, E = V × Q, so P = V × Q ÷ t.
Charge per second is current, Q ÷ t = I, so P = V × I.
Substitute V = I × R: P = I × R × I = I² × R.
Substitute I = V ÷ R: P = V × V ÷ R = V² ÷ R. Halving V quarters the power in a fixed resistor.
Common mix-ups
A higher-power device uses more voltage.
✓ Power is voltage × current. Two devices at the same voltage can have very different power because they draw different currents.Power and energy are the same thing.
✓ Power is how fast energy is used (watts). Energy is power × time (joules or watt-hours).
Open the Lite lesson: Electrical power: how fast energy flows
4.2 Energy over time: watt-hours and what they cost
Which uses more energy in a day: a 10 W phone charger used for two hours, or a 0.25 W gadget that is never switched off?
Energy is power × time
E = P × t. With P in watts and t in seconds, E is in joules. Engineers usually use watt-hours (Wh): 1 Wh = 1 W for 1 hour = 3600 J. Electricity is sold in kilowatt-hours: 1 kWh = 1000 Wh = 3.6 million joules.
Working out a cost
Cost = energy in kWh × price per kWh. A 60 W laptop for 6 hours a day uses 360 Wh = 0.36 kWh a day, 131.4 kWh a year. At an illustrative 25 p per kWh that is about £32.85 a year. Prices vary by place and time, so always state the price you assumed.
Power is not the whole story
A big power for a short time can use less energy than a small power for a long time. Comparing devices by power alone can mislead: always multiply by how long they run.
Common mix-ups
A kilowatt-hour is a kilowatt per hour.
✓ It is a kilowatt FOR an hour: power multiplied by time, a unit of energy.Low-power devices cost nothing to run.
✓ Left on all year, small powers add up to measurable energy and cost.
Open the Lite lesson: Energy over time: watt-hours and what they cost
4.3 Battery budgets: peak, average and run time
A robot's motors draw 1.5 A, but only for a tenth of the time. Do you size the battery for 1.5 A, or for something much smaller?
Capacity: mAh and Wh
Battery capacity is often quoted in milliamp-hours (mAh): 2000 mAh can supply 2000 mA for 1 hour, or 200 mA for 10 hours, ideally. Energy capacity in Wh = mAh × voltage ÷ 1000. A 2000 mAh, 3.7 V cell holds 7.4 Wh.
Average from a duty cycle
If a load draws a large current only part of the time, the average is current × fraction of time on. A 1.5 A motor running 10% of the time averages 150 mA. Add the constant loads: a 50 mA controller plus that motor averages 200 mA.
Peak still matters
Run time depends on the average, but the battery, wiring and regulator must survive the peak: here 50 + 1500 = 1550 mA. A battery that cannot deliver the peak will sag in voltage and may reset the controller just as the motor starts.
Common mix-ups
A battery rated 2000 mAh will always give exactly 2000 mA for an hour.
✓ That is an ideal figure. Real capacity is lower at high currents, low temperatures and as batteries age.Only the average current matters.
✓ The peak decides whether the battery, wiring and regulator can supply bursts without the voltage collapsing.
Open the Lite lesson: Battery budgets: peak, average and run time
Worked examples
Electrical power: how fast energy flows: example 1
A 12 V robot motor draws 1.5 A. What power does it take?
Solution
P = V × I = 12 × 1.5 = 18 W.
Electrical power: how fast energy flows: example 2
20 mA flows through a 470 Ω resistor. Is a 0.25 W resistor enough?
Solution
P = I²R = 0.02² × 470 = 0.0004 × 470 = 0.188 W. Under 0.25 W, but without much margin: many designers would want more headroom.
Energy over time: watt-hours and what they cost: example 1
A 100 W device runs 10 hours a day for 30 days. At 25 p per kWh, what does it cost?
Solution
E = 100 × 10 × 30 = 30,000 Wh = 30 kWh. Cost = 30 × 25 p = 750 p = £7.50.
Battery budgets: peak, average and run time: example 1
A sensor node draws 20 mA for 1 second, then sleeps at 0.1 mA for 59 seconds, repeating. What is its average current?
Solution
Per minute: 20 mA × 1 s + 0.1 mA × 59 s = 20 + 5.9 = 25.9 mA·s. Divide by 60 s: ≈ 0.43 mA. A 1000 mAh battery would last about 1000 ÷ 0.43 ≈ 2300 hours, roughly three months.
Interactive figures, in words
Figure 4.2 from Energy over time: watt-hours and what they cost
Step through each device and note its power and its energy per day. Which has the biggest power? Which uses the most energy in a year? Change the hours per day for the laptop and watch the yearly cost. Finally pick a battery pack and find a device it can run for more than a day.
The power and energy meter lists five low-voltage devices: an indicator LED (5 V, 15 mA), a microcontroller board (5 V, 50 mA), a phone charging (5 V, 2 A), a robot drive motor (12 V, 1.5 A) and a laptop (20 V, 3 A). For each it shows power, energy per day, energy per year and cost per year at an adjustable illustrative price, plus run time from a chosen battery pack. For example, the phone at 10 W for 2 hours uses 20 Wh a day.
Laboratory
These run in a browser on the full site (they need a faster connection). Simulations are simplified educational models.
- Simulation OS: Battery sensor node (Simulation OS experiment)
Change how often the node wakes and transmits until it lasts a whole season, and report the average current.
Open on the full site - BUILD: Smart greenhouse, level 3 (BUILD level)
Estimate the energy the greenhouse heater uses overnight and what it would cost.
Open on the full site
Practice
Each question links to its Lite lesson, where your answer is checked on our server and a wrong answer gets a hint. Answers are never sent to your device.
- A USB port supplies 5 V at 0.5 A. What power is that, in watts?
Answer it in “Electrical power: how fast energy flows” - Which resistor would exceed a 0.25 W rating?
Answer it in “Electrical power: how fast energy flows” - The current through a resistor doubles. Its heating power becomes…
Answer it in “Electrical power: how fast energy flows” - A 20 W device runs for 3 hours. How much energy does it use, in watt-hours?
Answer it in “Energy over time: watt-hours and what they cost” - How many joules are in 2 Wh?
Answer it in “Energy over time: watt-hours and what they cost” - A controller draws a constant 50 mA and a motor draws 1500 mA for 10% of the time. What is the average total current, in mA?
Answer it in “Battery budgets: peak, average and run time” - A 2000 mAh battery has a voltage of 3.7 V. How much energy does it store, in Wh?
Answer it in “Battery budgets: peak, average and run time” - Which number decides whether the battery and wires can cope when the motor starts?
Answer it in “Battery budgets: peak, average and run time”
Engineering applications
Wildlife trackers
Trackers on birds can weigh only a few grams, battery included. They sleep almost all the time and wake briefly to take a fix, so the sleep current, not the radio, often decides how long they work.
Standby costs
A device drawing a few watts on standby all year uses tens of kilowatt-hours. Multiplying power by hours by price turns that small number into a bill people notice.
Watch (optional)
Streaming video uses a lot of data. Everything you need is in the text.
Summary
- P = V × I = I² × R = V² / R; check every component against its power rating.
- Energy = power × time; a watt-hour is 3600 joules.
- Battery life ≈ capacity / average current, so duty cycling matters more than peak current.
- Size supplies for the peak, but budget batteries for the average.
Glossary
- Electrical power
- The power transferred in a component is the voltage across it multiplied by the current through it. For a resistor this can also be written I²R or V²/R. Field Guide
- Battery capacity and runtime
- A battery's capacity in ampere-hours says how long it can supply a current; multiplied by its voltage it gives stored energy in watt-hours. Field Guide
- Efficiency
- Efficiency is the fraction of input energy or power that comes out as useful output. The rest becomes heat, sound or other losses. Field Guide
Project: A year on two batteries
A weather station must run for a year on two AA cells. Choose how often it measures and transmits, estimate the current in each state from datasheet-style numbers you state, compute the average current and battery life, and say which state dominates the budget.
Deliverables
- A state table with current and time in each state
- The average current and predicted life
- The dominant state and one way to improve it
Write it up on paper or in your own notes. Lite never stores what you write.
References
- Elecia White (2011). Making Embedded Systems: Design Patterns for Great Software. O'Reilly Media.
- Paul Scherz and Simon Monk (2016). Practical Electronics for Inventors, 4th edition. McGraw-Hill Education.