2  Energy-Aware Design Basics

2.1 Chapter Series Overview

This is Chapter 1 in the Energy-Aware Design series. The complete series covers:

Chapter Title Focus
1 Introduction Fundamentals, tradeoffs, why energy matters
2 Energy Sources Batteries, chemistries, harvesting
3 Low-Power Strategies Sleep modes, duty cycling, optimization
4 Operation Costs Component power consumption profiles
5 Power Analysis Measurement and profiling techniques
6 Measurement Tools Practical measurement equipment
7 Design Considerations System-level power budgeting
8 Energy Harvesting Solar, thermal, kinetic sources
9 Interactive Tools Calculators and simulators
10 Case Studies Real-world applications
11 Hands-On Lab Wokwi ESP32 power lab

2.2 Learning Objectives

By the end of this chapter, you will be able to:

  • Explain why energy is the fundamental limiting resource in IoT design
  • Define power and energy in the context of IoT devices
  • Identify the key tradeoffs in energy-aware IoT system design
  • Explain the gap between battery technology improvement and computing demands
  • Apply basic power and energy concepts to estimate device lifetime
In 60 Seconds

Energy is the most constrained resource in IoT design because batteries improve only 5–8% per year while computing demands grow 40% per year — making energy-aware design the critical engineering skill that separates IoT products lasting weeks from those lasting years.

Key Concepts

  • Energy Budget: Total energy available to an IoT device over its operational lifetime, typically measured in mAh (battery capacity × voltage); must cover all sensing, processing, and communication operations.
  • Power Consumption: Rate of energy use measured in watts or milliwatts; varies dramatically between active (10-100 mA) and sleep (1-10 µA) states in IoT devices.
  • Sleep Mode: Low-power device state used between sensing events; reducing sleep current from 100 µA to 1 µA can extend battery life 100x at low duty cycles.
  • Duty Cycle: Fraction of time a device spends in active (power-consuming) mode; reducing duty cycle from 10% to 1% approximately 10x extends battery life.
  • Battery Chemistry: Electrochemical characteristics of batteries affecting energy density, discharge profile, temperature performance, and self-discharge rate; must match deployment requirements.
  • Energy Harvesting: Collecting ambient energy (solar, vibration, RF) to supplement or replace batteries; requires careful power management to match harvested power to consumption.
  • Coulomb Counting: Battery state-of-charge estimation technique measuring charge in and out of battery; used for accurate battery life prediction in IoT applications.

2.3 For Beginners: Why Energy Matters in IoT

Imagine you have a tiny sensor that monitors the temperature in your garden. It needs to:

  • Wake up every hour
  • Read the temperature
  • Send the data to your phone
  • Go back to sleep

Each of these steps uses energy from a small battery. If the battery dies, your sensor stops working. That’s why every IoT designer obsesses over every microamp of current - it’s the difference between a device that lasts weeks versus years!

Key concepts:

  • Power = how fast you use energy (like water flow from a tap)
  • Energy = total amount used over time (like total water in a bucket)
  • Battery Life = Energy stored / Average power consumption

Sammy the Sensor says: “I’m like a night owl - I only wake up when something interesting happens! The rest of the time, I’m snoozing in deep sleep mode, using almost no battery. That’s how I can stay awake for YEARS on a tiny coin battery!”

Lila the LED explains: “I use 20 milliamps when I’m on - that’s like drinking through a straw. But if I stay on all day, I’ll drain the battery super fast! That’s why smart devices only light me up for a second.”

Max the Microcontroller shares: “I have different ‘sleep modes’ like you have different levels of napping! Light sleep is like dozing on the couch. Deep sleep is like being in bed with the covers over my head - I use almost zero energy but take longer to wake up!”

Think about it like this: Imagine your phone’s battery is a juice box. If you play games ALL day, the juice runs out fast. But if you only check your phone sometimes and let it sleep the rest of the time, the juice lasts much longer! That’s exactly how IoT devices work - they sleep most of the time to save their battery “juice”!

2.4 Prerequisites

This chapter builds on:

If you’re new to IoT energy concepts, follow this recommended learning path:

  1. Start here: Read through the beginner sections (marked with “For Beginners” or “For Kids”)
  2. Understand the basics: Focus on the Introduction and Energy Sources sections first
  3. Try the calculators: Use the interactive Power Budget Calculator to experiment
  4. Study real examples: The Smart Agriculture case study shows real-world optimization
  5. Practice: Work through the Hands-On Lab with Wokwi simulation

Don’t worry if you don’t understand every formula on the first pass - the conceptual understanding is more important than memorizing equations!

2.5 Video Resources

Key Learning Points:

  • How current flows through microcontrollers in different states
  • The relationship between clock speed and power consumption
  • Why active mode consumes 1000x more power than deep sleep
  • Practical demonstration of measuring device current

Estimated Watch Time: 12 minutes

This foundational video explains the physics behind power consumption, essential for understanding why energy management is critical in IoT design.

Key Learning Points:

  • Understanding ESP32 sleep modes and current consumption
  • Configuring wake-up sources (timer, external interrupt, touch, ULP)
  • Measuring actual power consumption
  • Achieving multi-year battery life

Estimated Watch Time: 15 minutes

This tutorial demonstrates practical deep sleep implementation on ESP32, showing how to achieve under 10 microamps sleep current for extended battery operation.

Coverage:

  • Battery selection criteria for IoT applications
  • Duty cycling fundamentals and calculation
  • Low-power communication protocols comparison
  • Energy harvesting integration basics

Estimated Watch Time: 20 minutes

2.6 Introduction

Energy is the fundamental limiting resource in IoT design. While processing power, memory, and communication bandwidth have improved exponentially following Moore’s Law, battery technology has progressed at a much slower pace—approximately 5-8% per year. This disparity creates the central challenge of IoT system design: how to maximize device functionality while operating within strict energy constraints.

The consequences of poor energy management are significant. A device that requires frequent battery replacement creates maintenance costs that may exceed the device’s value. For deployments in remote locations—agricultural fields, wildlife habitats, industrial facilities—battery replacement may be impractical or impossible. The dream of “deploy and forget” IoT sensors lasting 5-10 years requires exceptional energy discipline.

2.7 Definition

Energy-aware IoT design encompasses the systematic consideration of energy consumption at every level of the system—from component selection through circuit design, firmware implementation, and communication protocols. The goal is to maximize useful work performed per unit of energy consumed, extending battery life while meeting application requirements.

Power represents the instantaneous rate of energy consumption, measured in watts (W):

\[P = V \times I\]

Where V is voltage and I is current.

Energy represents total consumption over time, measured in joules (J) or watt-hours (Wh):

\[E = P \times t = V \times I \times t\]

For battery-powered devices, we typically work with milliamp-hours (mAh), where battery life is:

\[\text{Battery Life (hours)} = \frac{\text{Battery Capacity (mAh)}}{\text{Average Current (mA)}}\]

2.8 Tradeoff: Primary Battery vs Rechargeable + Harvesting

Factor Primary Battery Rechargeable + Harvesting
Initial Cost Lower Higher (harvester + charger + battery)
Maintenance Periodic replacement None (if sized correctly)
Reliability Predictable lifetime Weather/environment dependent
Complexity Simple Complex (MPPT, BMS, sizing)
Best For Indoor, accessible locations Outdoor, remote, permanent installations

2.9 Tradeoff: Edge Processing vs Cloud Offloading

Factor Edge Processing Cloud Offloading
Radio Energy Minimal (send results only) High (send raw data)
Processing Energy Higher (local compute) Minimal
Latency Low (local decision) High (network round-trip)
Break-even 100-1000 operations = 1 byte TX Simple filter/aggregate locally
Best For Complex analytics, privacy-sensitive Simple sensors, cloud-dependent apps

2.10 Tradeoff: Aggressive Sleep vs Always-On Responsiveness

Factor Aggressive Sleep (99%+) Always-On
Battery Life Years Days to weeks
Response Latency 100ms - seconds Immediate
Wake-up Energy Overhead per wake None
Complexity State management, context restore Simple
Best For Periodic monitoring, thresholds Real-time control, continuous stream
Energy Harvesting is Not a Free Lunch

Energy harvesting (solar, thermal, RF, kinetic) sounds appealing—“free” energy from the environment! But there are critical pitfalls:

  1. Indoor solar is usually NOT viable: Office lighting provides only 5-10 µW/cm². A typical IoT device needs 10-100× more just for sleep current. Indoor solar only works in very bright environments (greenhouses, near windows).

  2. Outdoor solar requires careful sizing: You need enough panel area AND battery capacity to handle:

    • Cloudy days (3-7 days in many climates)
    • Winter reduced sunlight (50% of summer in temperate zones)
    • Panel degradation over time
  3. Energy storage is still required: Even with energy harvesting, you need a battery or supercapacitor to buffer between harvesting peaks and consumption needs.

  4. Thermal/kinetic/RF harvesting is niche: These sources produce microwatts. They work for specific applications (body heat, vibration) but rarely as primary power sources.

Rule of Thumb: Design your IoT device to work on battery alone first. Add energy harvesting as a battery life extender, not a replacement for good power management.

Energy flow diagram showing power sources (battery, solar, grid), management components (voltage regulator, charge controller), and power consumers (MCU, sensors, radio) with bidirectional energy flow paths
Figure 2.1: Energy flow in a typical IoT device showing power sources, management, and consumers

2.11 The Fundamental IoT Constraint: Battery Gap is Widening, Not Closing

Line chart comparing exponential growth of computing power (10,000× improvement from 1990-2025) versus linear battery capacity improvement (10× improvement over same period), illustrating widening battery gap
Figure 2.2: The growing gap between computing advancement and battery technology improvement

The chart above illustrates the fundamental challenge: while processors have become 10,000× more powerful since 1990, batteries have only improved by approximately 10×. This means:

  1. Software cannot assume abundant energy - Even as devices get more capable, energy efficiency must remain paramount
  2. Sleep modes are essential - Devices must spend most of their time in ultra-low-power states
  3. Communication is the dominant cost - Wireless transmission consumes 100-1000× more energy than local processing
  4. Every milliamp matters - Design decisions that save 100 uA can extend battery life by months

Pitfall 1: Ignoring Sleep Current

Many designers focus only on active mode current. But if your device sleeps 99% of the time, even 100uA sleep current dominates the power budget!

  • ESP32 light sleep: 800uA (bad for battery life)
  • ESP32 deep sleep: 10uA (acceptable)
  • ESP32 hibernation: 5uA (best for long deployments)

Pitfall 2: Forgetting Peripheral Leakage

Sensors, LEDs, and pull-up resistors consume power even when “off”:

  • LED with 10k resistor at 3.3V: 330uA constantly
  • I2C pull-ups (2x 4.7k): 1.4mA during communication
  • Powered-off sensor with leakage: 1-50uA

Pitfall 3: Underestimating Radio Energy

Wi-Fi transmission bursts may be short, but they dominate energy consumption:

  • Wi-Fi TX: 160-280mA for 100ms = 16-28 mAs per transmission
  • At 1 transmission/minute: adds 0.27-0.47 mA average current
  • This alone limits battery life to ~3-4 months on a 2000mAh battery

Pitfall 4: Not Testing at Temperature Extremes

Battery capacity drops dramatically in cold:

  • -20C: 65% of rated capacity
  • -40C: 30-40% of rated capacity
  • Always design for worst-case deployment temperature

2.12 Why Energy Efficiency Matters: Lessons from Biology

Nature has optimized for energy efficiency over billions of years. IoT designers can learn from biological systems:

Comparison diagram showing biological energy strategies (hibernation, torpor, cold-blooded metabolism, event-driven response, collective intelligence) mapped to IoT implementations (deep sleep, light sleep, dynamic voltage scaling, interrupt-based wake, edge processing with cloud aggregation)
Figure 2.3: Biological energy efficiency strategies and their IoT equivalents

Key biological principles applied to IoT:

Biological Strategy IoT Implementation Energy Savings
Hibernation Deep sleep modes 1,000-10,000×
Torpor (short-term dormancy) Light sleep between tasks 10-100×
Cold-blooded metabolism Dynamic voltage/frequency scaling 2-8×
Event-driven response Interrupt-based wake-up Eliminates polling
Collective intelligence Edge processing + cloud aggregation Reduces communication

Scenario: GPS asset tracker with LoRaWAN reporting every 15 minutes.

Given:

  • Battery: 2,400 mAh @ 3.7V (Li-SOCl₂)
  • GPS fix: 40 mA for 30 seconds
  • LoRa TX (SF7): 100 mA for 1.5 seconds
  • MCU active: 10 mA for 2 seconds
  • Deep sleep: 5 µA

Energy per cycle (15 minutes = 900 seconds):

GPS: 40 mA × 30s = 1,200 mAs
LoRa: 100 mA × 1.5s = 150 mAs
MCU: 10 mA × 2s = 20 mAs
Sleep: 0.005 mA × 866.5s = 4.33 mAs
Total: 1,374.33 mAs per cycle

Cycles per day: 96
Daily energy: 96 × 1,374.33 = 131,935.68 mAs = 36.65 mAh

Battery life: 2,400 mAh ÷ 36.65 mAh = 65.5 days

With 70% efficiency (temp/self-discharge): 46 days

Optimization: Reduce GPS time using A-GPS (assisted GPS):

A-GPS: 10 seconds instead of 30 seconds
GPS energy: 40 × 10 = 400 mAs (saves 800 mAs per cycle)
New daily: 131,935.68 - (800 × 96) = 55,135.68 mAs = 15.32 mAh
New life: 2,400 ÷ 15.32 = 156.7 days → 110 days after derating

Result: 2.4× battery life improvement from A-GPS!

The battery gap quantifies why energy is IoT’s fundamental constraint:

Computing improvement (1990-2025): \(10^4 \times\) faster (Moore’s Law doubling every 18 months)

Battery improvement (1990-2025): \(10 \times\) energy density (7% annual improvement)

\[\text{Gap ratio} = \frac{10^4}{10} = 1000\times\]

What this means: A 2025 IoT device has 1,000× more computing power per unit of battery capacity than a 1990 device. Energy efficiency MUST improve exponentially just to maintain the same battery life. This is why “sleep 99% of the time” is not optional—it’s the only way to bridge the gap.

Application Primary Battery Rechargeable Solar Harvesting Grid Power
10-year remote sensor ✓ Best (Li-SOCl₂) ✗ Self-discharge △ If outdoor ✗ No access
Wearable (daily charge) ✗ Not rechargeable ✓ Best (LiPo) ✗ Too small △ Charging dock
Outdoor gateway △ Expensive long-term △ Needs large battery ✓ Best with buffer ✓ Best if available
Indoor sensor (<1 year) ✓ Best (Alkaline) △ Overengineered ✗ Insufficient light ✓ If nearby outlet

Decision rule: Long-term remote → Primary; Rechargeable product → LiPo; Outdoor permanent → Solar+battery; Indoor accessible → Grid

Common Mistake: Assuming “Sleep Mode” Means Zero Power

The Mistake: Designer calculates battery life assuming sleep consumes 0 mA.

Reality: Even “deep sleep” consumes 1-10 µA for most MCUs, and peripheral leakage (voltage regulators, pull-ups, sensors) often adds 50-500 µA. For a 1% duty cycle device sleeping 99% of time, sleep current dominates total power consumption!

Fix: Measure actual sleep current with µA-capable meter. Target <10 µA total for multi-year battery life.

2.13 Knowledge Check

## Interactive Power Budget Calculator

Before diving deeper into energy concepts, try this interactive calculator to see how different design choices affect battery life:

Try These Scenarios
  1. Ultra-low power sensor: Set duty cycle to 0.1%, sleep current to 5uA, active current to 20mA
  2. Wi-Fi gateway: Set duty cycle to 50%, active current to 150mA (Wi-Fi)
  3. LoRa sensor: Set duty cycle to 0.5%, active current to 40mA (LoRa TX)

Compare how dramatically battery life changes between these configurations!

2.14 Interactive Battery Life Calculator

Try adjusting the parameters below to see how different design choices affect battery life:

Experiment with Different Scenarios
  1. Ultra-low power sensor: Set active current to 20mA, active time to 2s, sleep current to 5µA, cycle interval to 60 minutes
  2. Wi-Fi camera: Set active current to 200mA, active time to 5s, sleep current to 100µA, cycle interval to 30 minutes
  3. LoRa tracker: Set active current to 40mA, active time to 3s, sleep current to 10µA, cycle interval to 15 minutes

Notice how sleep current becomes dominant as you increase the cycle interval!

2.15 How It Works

Energy-aware IoT design operates on a fundamental principle: minimize active time, maximize sleep depth. Here’s the step-by-step process:

  1. Energy Budget Calculation: Determine target battery life → Calculate maximum average current allowed → Work backwards to allocate energy per operation
  2. State Machine Design: Define device states (deep sleep, sensor read, process, transmit) → Measure current draw for each → Calculate time in each state
  3. Duty Cycle Optimization: Reduce wake frequency where possible → Batch operations to amortize overhead → Use event-driven wake (interrupts) instead of polling
  4. Sleep Mode Selection: Match sleep depth to wake latency requirements → Use deepest sleep mode that still allows required wake sources (timer, GPIO, touch)

Real-world workflow: A temperature sensor reading every 10 minutes sleeps 99.9% of the time at 10µA, wakes for 2 seconds to read sensor (20mA) and transmit via LoRa (40mA), then returns to sleep. Average current: (40mA × 2s + 0.01mA × 598s) / 600s = 0.143mA, giving 5+ years on a CR123A battery.

2.16 Concept Relationships

Energy-aware design connects to multiple IoT domains:

Common dependency: Energy-aware design must be considered before finalizing hardware selection—choosing a 10µA vs 100µA sleep MCU has 10x battery life impact that software cannot fix.

2.17 See Also

Within Energy Series:

Related Design Topics:

Protocols & Architecture:

2.18 Try It Yourself

2.18.1 Exercise 1: Battery Life Calculator

Goal: Calculate battery life for different sleep configurations.

Given: ESP32 sensor, 2000mAh battery, reads sensor every 5 minutes - Active (sensor + WiFi TX): 150mA for 3 seconds - Light sleep: 800µA - Deep sleep: 10µA

Tasks:

  1. Calculate average current with light sleep
  2. Calculate average current with deep sleep
  3. How much longer does deep sleep last?

What to observe: Deep sleep average ≈ 0.165mA (20+ years theoretical), light sleep ≈ 1.0mA (3 years). The 80× sleep current difference becomes only 6× battery life difference because TX dominates.

2.18.2 Exercise 2: Optimize a Real Design

Scenario: Wildlife camera, 6000mAh battery, 6-month target - Current: Active 200mA for 5s every 30min → 14 days battery life

Your task: Reduce average current from 0.93mA to 0.14mA (6 months)

Hints:

  • Can you reduce active time? (Better image compression, lower resolution)
  • Can you extend sleep interval? (Motion trigger instead of periodic)
  • Can you switch protocols? (BLE instead of WiFi for alerts)

What to observe: Changing interval 30min→2hr cuts daily cycles 48→12, saving 75% TX energy. Switching WiFi (160mA) to BLE (15mA) for alerts saves 90% TX power.

2.19 Summary

Energy-aware design is not optional in IoT—it’s fundamental. The key principles covered in this introduction:

  1. Power vs Energy: Power is instantaneous consumption (W = V x I); energy is total consumption over time (Wh = P x t)
  2. The Battery Gap: Battery technology improves slowly (5-8%/year) while computing advances rapidly, making energy efficiency increasingly critical
  3. Design Tradeoffs: Every IoT design involves balancing edge vs. cloud processing, sleep depth vs. responsiveness, and complexity vs. power savings
  4. Biological Inspiration: Nature’s energy-efficient strategies (hibernation, event-driven response, collective processing) directly inform IoT design patterns

Energy Design Series:

Context-Aware Energy:

Architecture:

Protocols:

Interactive Tools:

2.20 What’s Next

If you want to… Read this
Learn about battery chemistries and energy sources Energy Sources
Apply low-power design strategies immediately Low-Power Design Strategies
Understand energy costs of different operations Energy Cost of Common Operations
Analyze device power consumption profiles Power Consumption Analysis
Jump to the hands-on lab Hands-On Lab: Power Monitoring

Learning path flowchart showing progression from Energy Basics through Energy Sources, Low-Power Strategies, Operation Costs, Power Analysis, Measurement Tools, Design Considerations, Energy Harvesting, Interactive Tools, Case Studies, to Hands-On Lab

Energy-aware design learning path progression