Chapters

24 Low-Power Sensors: Energy Budgets

sensing
power-management
low-power
networks
reliability

24.1 Start With the Decision

A battery sensor can meet its average current target and still die during radio bursts. Its energy budget must include every state and transition.

24.2 Route Overview

This is part 1 of 3. Continue with Low-Power Sensors: Duty Cycles and Fusion.

24.3 Part Objectives

  • Compute sensor lifetime from active, sleep, and radio energy.
  • Identify peak-current and battery limits hidden by an average budget.
Start With the Measurement Story

Budget the Worst Useful Day

Picture a wildlife sensor that lasts for weeks in a quiet office test but dies during one cold night full of detections and weak-link retries. The average day hid the event pattern and the battery conditions that mattered most.

A duty cycle is the share of time a device spends in an active state. List every state: sleep, wake, measure, process, send, wait, retry, and recover. For each one, record current, time, frequency, and the condition that changes it. Include startup and fault work rather than treating them as free.

Measure a normal day and a demanding useful day. Lower the supply, add retries, shorten the event gap, and restart the device. Check peak current as well as total use. The design must still complete the important action and report low power honestly.

A bench estimate cannot promise field life. Cell age, cold, leakage, self-discharge, and user behavior vary. The deeper sections show how to build an energy record, choose sleep and wake rules, and state a replacement or recharge limit with evidence.

A battery sensor node spends most of its life deciding when not to measure. Start with the energy story: wake, sample, process, transmit, sleep, and prove that the duty cycle still meets the application deadline.

24.4 In 60 Seconds

Battery-powered IoT sensor nodes must balance data collection with power conservation. Deep sleep reduces current from milliamps to microamps (10uA on ESP32). The biggest power drain is wireless transmission — buffering 8 readings and sending them together instead of individually can extend battery life by 3x or more. Always configure a wake source before entering deep sleep, or the device sleeps forever.

Key Concepts

Start with Sleep Mode: a low-power MCU state where most clocks and peripherals are disabled; the device wakes on interrupt or timer to take a measurement then returns to sleep. Then Duty Cycle: the fraction of time a sensor or device is active versus sleeping; lower duty cycle means lower average power consumption. Next Energy Harvesting: the process of capturing ambient energy (solar, thermal, kinetic, RF) to supplement or replace battery power in IoT nodes. After that LDO Regulator: Low-Dropout Regulator — a linear voltage regulator that operates with very small difference between input and output voltage, improving efficiency at low current loads. Continue by Sleep Current: the quiescent current drawn by a device in its lowest-power sleep state, critical for estimating battery life between sampling events. Continue by Power Gating: switching off power to entire circuit blocks (sensors, radios, peripherals) when not needed using a transistor switch, eliminating leakage current. Finally Battery Capacity (mAh): the total charge a battery can deliver at a given discharge rate; used with average current to calculate expected battery lifetime in IoT devices.

24.5 Learning Objectives

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

  • Design multi-sensor data aggregation systems with structured JSON payloads
  • Calculate power budgets for battery-powered sensor nodes using energy-per-cycle analysis
  • Implement deep sleep modes that reduce current consumption to microamp levels
  • Justify transmission buffering as the dominant power optimization by quantifying its 3x+ battery life improvement over alternative strategies
  • Select the appropriate sensor fusion algorithm for a given constraint profile by applying complementary vs Kalman filter tradeoff criteria
For Beginners: Sensor Power Management

Battery-powered IoT sensors face the same challenge as your phone — they need to do useful work while making the battery last as long as possible. The trick is “deep sleep,” where the device wakes up briefly to take a reading, then goes back to sleep, using almost no power. It is like setting an alarm to check the temperature every 10 minutes instead of staring at the thermometer all day.

24.6 Introduction

A battery sensor budget combines the energy needed for measurements, communication, and the time between useful tasks. Buffered transmission reduces repeated radio work while preserving readings for the next upload. Sleep still contributes to the total even when its current is much lower than the active current. A useful lifetime claim therefore follows the complete operating schedule rather than quoting a low-current mode by itself.

Battery-powered IoT sensor nodes face a fundamental challenge: they must collect and transmit data reliably while consuming minimal power. A well-designed power management strategy can extend battery life from weeks to years. This chapter covers the techniques that make long-term remote sensing practical — from structuring multi-sensor data payloads, through deep sleep and duty cycling, to transmission buffering strategies that yield the largest real-world battery life gains.

The mathematical gist. Charge used in one state is current times time, ΔQmAh=ImAΔts/3600\Delta Q_{mAh}=I_{mA}\Delta t_s/3600. This chapter’s 96 daily sensor reads cost 2.40 mAh, 12 buffered Wi-Fi bursts cost 1.13 mAh, and sleep costs about 0.239 mAh, giving 3.77 mAh/day and about 530 days from 2,000 mAh—roughly 3.1 times the unbuffered lifetime before real-cell derating.

Math Bridge · guided foundationsWhere do 530 days of battery life come from?Let Phoebe turn current and seconds into the weather node's daily charge ledger.

Chapter Roadmap
  • Start With the Measurement Story
  • In 60 Seconds
  • Key Concepts
  • For Beginners: Sensor Power Management
  • Introduction
  • Multi-Sensor Data Aggregation
  • Low-Power Payload Flow
  • Optional ESP32 Implementation
  • Try It: JSON Payload Size Estimator
  • Production Tip: Use ArduinoJson
  • Checkpoint: Payloads Set the Energy Baseline
  • Low-Power Sensor Reading
  • Deep-Sleep Pattern
  • Interactive Duty Cycle Calculator

24.7 Multi-Sensor Data Aggregation

A node with several sensors needs a payload that preserves the meaning of their combined readings. JSON provides a readable structure for those values, but each transmitted byte still costs work on the radio path. The design question includes how many values are sent and how often the node communicates. One combined transmission can replace separate transfers while keeping the sensor readings organized for the receiver.

15 min | Intermediate | P06.C09.U03a

Combining multiple sensors into a single IoT node requires structured data handling. JSON payloads provide a flexible, human-readable format for transmitting aggregated sensor data.

Focus first on the payload design question: how many sensor values must be transmitted, how often, and how expensive is each byte over the chosen radio link? Use the estimator below before writing firmware.

Low-Power Payload Flow

A low-power reading cycle starts by waking the node and collecting the required sensor values. Validation checks the readings before they are packed into one structured payload for transmission. The node then sends the combined result and returns to sleep instead of leaving the radio active. This sequence connects data handling to the energy budget because measurement and communication occupy different operating states.

Wake up -> read all sensors -> validate readings -> pack one payload -> transmit once -> return to sleep.

Optional ESP32 Implementation
#include <DHT.h>
#include <Wire.h>
#include <BH1750.h>
#include <Adafruit_BMP280.h>

DHT dht(4, DHT22);
BH1750 lightMeter;
Adafruit_BMP280 bmp;

struct SensorData {
  float temperature;
  float humidity;
  float pressure;
  float altitude;
  float light;
  unsigned long timestamp;
};

void setup() {
  Serial.begin(115200);
  Wire.begin();

  dht.begin();
  lightMeter.begin();
  bmp.begin(0x76);
}

SensorData readAllSensors() {
  SensorData data;

  data.temperature = dht.readTemperature();
  data.humidity = dht.readHumidity();
  data.pressure = bmp.readPressure() / 100.0;
  data.altitude = bmp.readAltitude(1013.25);
  data.light = lightMeter.readLightLevel();
  data.timestamp = millis();

  return data;
}

void loop() {
  SensorData data = readAllSensors();

  // Create JSON payload
  String json = createJSON(data);
  Serial.println(json);

  // Publish to MQTT or send via HTTP
  // publishData(json);  // Implement based on your platform (MQTT, HTTP, etc.)

  delay(10000);
}

String createJSON(SensorData data) {
  // Note: Check isnan() before production use -- DHT22 can return NaN on read failure
  String json = "{";
  json += "\"temperature\":" + String(data.temperature) + ",";
  json += "\"humidity\":" + String(data.humidity) + ",";
  json += "\"pressure\":" + String(data.pressure) + ",";
  json += "\"altitude\":" + String(data.altitude) + ",";
  json += "\"light\":" + String(data.light) + ",";
  json += "\"timestamp\":" + String(data.timestamp);
  json += "}";

  return json;
}
Try It: JSON Payload Size Estimator
Single reading
Buffered payloadArray of objects
Daily TX data for 96 readings/day:

Estimate assumes JSON text encoding. Actual size varies with value precision and key names. LoRaWAN max payload: 242 bytes; MQTT typical max: 256 KB.

Production Tip: Use ArduinoJson

The manual String concatenation above works for learning, but production code should use the ArduinoJson library. It handles memory allocation, escaping, NaN values, and nested objects safely:

#include <ArduinoJson.h>

JsonDocument doc;
doc["temperature"] = data.temperature;
doc["humidity"] = data.humidity;
doc["pressure"] = data.pressure;
String json;
serializeJson(doc, json);

Physics PhoebeCheckpoint: Payloads Set the Energy Baseline

You now know:

  • Wake once, read all sensors, pack one payload, transmit once, and return to sleep.
  • Payload size depends on field count, key length, value length, timestamp use, and buffering.
  • The same 96 readings per day become cheaper when grouped, especially under LoRaWAN’s 242 bytes ceiling.

The payload plan answers what must be sent; next, minimize awake time.

24.8 Low-Power Sensor Reading

20 min | Advanced | P06.C09.U03b

Deep sleep modes reduce current consumption from milliamps to microamps, dramatically extending battery life.

Deep-Sleep Pattern

A deep-sleep design must account for the active work that happens between its long quiet intervals. Sensor reads and radio transmission consume current for their own durations within the cycle. The average current weights those contributions rather than assigning equal energy to each drawn block. A shorter expensive radio burst can therefore matter more than a small reduction in an already low sleep current.

Open this after using the duty-cycle calculator. The important habit is: read quickly, transmit only when needed, configure the wake source, then sleep.

#include <esp_sleep.h>

#define SLEEP_DURATION 60  // seconds

void setup() {
  Serial.begin(115200);

  // Read sensors
  float temperature = readTemperature();

  // Send data
  sendDataToCloud(temperature);

  // Enter deep sleep
  Serial.println("Entering deep sleep...");
  esp_sleep_enable_timer_wakeup(SLEEP_DURATION * 1000000ULL);  // microseconds
  esp_deep_sleep_start();
}

void loop() {
  // Not used - device resets after deep sleep
}

The code gives the control sequence; Figure 24.1 shows its timing consequence. Read one complete cycle from wake-up through sensor work and transmission to the long sleep interval, comparing widths as elapsed time rather than assuming the blocks consume equal energy.

A duty-cycling current profile marks wakeup, CPU, analogue/MCU, RF/MCU, DMA and RTC sleep. Energy savings favor longer sleep, shorter active periods and DMA transfers.
Figure 24.1: Duty cycling for low-power sensor operation

In Figure 24.1, the active window contains the useful measurement and communication work, while sleep occupies most of the schedule. Average current depends on both current level and duration, so shortening an expensive radio burst can matter more than shaving a small amount from sleep current. This timing view is the bridge from firmware states to the duty-cycle calculator’s weighted average.

Interactive Duty Cycle Calculator
Duty cycle
Average current
Current reduction

The duty-cycle diagram is qualitative. Use Figure 24.2 to inspect the current shape of a concrete five-minute sensor cycle: follow the baseline sleep current, the sensing and processing steps, the radio peak, and the return to sleep in time order.

Five-minute sensor-cycle current profile showing deep sleep, sensor read, processing, Wi-Fi transmit, and return to sleep; the Wi-Fi transmit burst is the highest-current phase.
Figure 24.2: Wireless transmission power profile

In Figure 24.2, deep sleep is long and low, the sensor and processor occupy shorter intermediate regions, and Wi-Fi transmission produces the highest peak. The area under each region—not peak height by itself—contributes charge per cycle. That observation reconnects the physical current trace to the chapter’s batching result: fewer transmissions reduce how often the costliest state appears.

24.9 Continue to the Next Part

Carry this evidence into Low-Power Sensors: Duty Cycles and Fusion, which begins with Checkpoint: Duty Cycle Is Average Current.