Loading content...
Consider a temperature sensor deployed in a remote agricultural field. It runs on two AA batteries, transmits data every 15 minutes, and needs to operate for 10 years without maintenance. This isn't a hypothetical—it's a real deployment requirement that millions of IoT devices must meet.
The math is unforgiving: two AA batteries contain roughly 2,500 mAh of energy. Over 10 years, that's about 28.5 microamps average current draw. A standard Wi-Fi module consumes 100-300 milliamps when transmitting—10,000 times more than the entire power budget.
This energy constraint shapes everything about low-power IoT protocols. Every bit transmitted, every millisecond of radio activity, every CPU cycle matters. The protocols we'll explore in this page represent decades of research into squeezing maximum functionality from minimal energy budgets.
This page covers the core mechanisms enabling ultra-low-power IoT communication. You'll understand duty cycling and sleep scheduling, energy-efficient MAC protocols, lightweight application protocols (CoAP, MQTT-SN), and the engineering tradeoffs between responsiveness and battery life. These concepts apply across specific technologies like LoRaWAN, Zigbee, and BLE covered in subsequent pages.
Before diving into protocols, we must understand where energy goes in a typical IoT device. This knowledge is essential for evaluating protocol efficiency.
Power consumption by component:
A typical IoT device contains:
The critical insight: Radio communication dominates power consumption in most IoT devices. A single transmission can consume more energy than hours of microcontroller operation in sleep mode.
| State | Current Draw | Duration Example | Energy per Day |
|---|---|---|---|
| Deep sleep | 1 μA | 23 hours 59 min | 24 μAh |
| MCU active (sensing) | 5 mA | 10 ms per hour | 1.4 μAh |
| Radio receive | 15 mA | 10 ms per hour | 4.2 μAh |
| Radio transmit | 50 mA | 5 ms per hour | 7 μAh |
| Total daily | ~37 μAh |
Energy budget calculation:
With a 2,500 mAh battery and 37 μAh daily consumption:
Of course, self-discharge, temperature effects, and real-world inefficiencies reduce this, but the point stands: with proper duty cycling, decade-long battery life is achievable.
The duty cycle concept:
Duty cycle = (Active time) / (Total time) × 100%
Most low-power IoT devices operate with duty cycles below 0.1%. The radio might be active for 10 milliseconds per minute—a 0.017% duty cycle. Protocols must enable meaningful communication within these brief windows.
Many developers focus on transmission power but overlook receive power. Waiting for a response with the radio in receive mode consumes substantial energy. Some protocols (like LoRaWAN Class A) minimize this by defining narrow receive windows immediately after transmission, allowing devices to return to sleep quickly.
The MAC (Medium Access Control) layer is critical for low-power operation because it determines when devices transmit, receive, and sleep. Several strategies have evolved:
1. Duty-Cycled MAC Protocols
Devices synchronize to wake up simultaneously for brief periods, then return to sleep. Examples:
S-MAC (Sensor MAC): Introduces coordinated sleeping schedules. Neighboring nodes synchronize schedules. Active periods are fixed, sleep periods adaptable.
T-MAC (Timeout MAC): Improves on S-MAC by dynamically ending active periods when no traffic, reducing idle listening.
B-MAC (Berkeley MAC): Uses low-power listening (LPL). Transmitters send a long preamble; receivers wake briefly to detect preambles, then sleep if none detected.
2. Contention-Based vs. Scheduled Access
Contention-based (CSMA/CA):
Scheduled (TDMA-like):
3. IEEE 802.15.4 MAC Modes
The foundation protocol for many IoT stacks offers two modes:
Non-beacon mode (unslotted):
Beacon-enabled mode (slotted):
| Protocol | Mechanism | Sync Required | Best For |
|---|---|---|---|
| S-MAC | Coordinated sleep schedules | Neighbor sync | Dense sensor networks |
| T-MAC | Adaptive active periods | Neighbor sync | Variable traffic loads |
| B-MAC/LPL | Long preamble + sampling | No | Sparse, infrequent traffic |
| ContikiMAC | Phase-lock + strobed preambles | Implicit | General IoT (Contiki OS) |
| TSCH | Time-slotted channel hopping | Network-wide | Industrial IoT (reliability) |
| LoRaWAN Class A | Transmit-then-listen windows | No | Ultra-low-power LPWAN |
Time-Slotted Channel Hopping (TSCH) combines scheduled access with frequency hopping. By changing channels each timeslot, TSCH achieves both low power (scheduled access) and reliability (frequency diversity). It's the MAC layer for 6TiSCH and many industrial wireless standards.
Running IP on constrained devices requires significant adaptation. The IETF developed 6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) and RPL (Routing Protocol for Low-Power and Lossy Networks) to enable IP connectivity while respecting energy constraints.
6LoWPAN Header Compression
IPv6 headers are 40 bytes minimum—larger than the entire payload of an 802.15.4 frame (127 bytes maximum). 6LoWPAN uses stateful header compression:
Compression techniques:
Results:
12345678910111213141516171819202122232425262728293031
# IPv6 + UDP Header (Traditional)+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Version| Traffic Class | Flow Label | 4 bytes+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Payload Length | Next Header | Hop Limit | 4 bytes+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| |+ Source Address +| (128 bits) | 16 bytes+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| |+ Destination Address +| (128 bits) | 16 bytes+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Source Port | Destination Port | 4 bytes +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Length | Checksum | 4 bytes+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+# Total: 48 bytes overhead # 6LoWPAN Compressed (Link-Local, Common Ports)+-+-+-+-+-+-+-+-+| IPHC Dispatch | 1 byte (indicates compression)+-+-+-+-+-+-+-+-+| IPHC Header | 1 byte (compression flags)+-+-+-+-+-+-+-+-+| NHC (UDP) | 1 byte (compressed next header)+-+-+-+-+-+-+-+-+| Port Nibbles | 1 byte (4-bit src + 4-bit dst)+-+-+-+-+-+-+-+-+# Total: 4 bytes overhead (92% reduction!)RPL: Routing for Low-Power and Lossy Networks
Traditional routing protocols (OSPF, RIP) assume reliable links and always-on routers. RPL is designed for networks where:
DODAG (Destination-Oriented Directed Acyclic Graph):
RPL builds tree-like topologies called DODAGs rooted at border routers (gateways). Each node maintains:
Objective Functions:
RPL selects routes based on configurable metrics:
Trickle Algorithm:
RPL uses Trickle for control message suppression:
RPL is optimized for upward traffic (devices → gateway), which dominates IoT workloads. Downward traffic (gateway → devices) requires additional mechanisms like DAO (Destination Advertisement Object) messages. P2P traffic between devices is inefficient and often routed through the root.
HTTP is the backbone of web communication but is too heavy for constrained devices. CoAP (Constrained Application Protocol, RFC 7252) provides REST-like semantics optimized for IoT:
Design principles:
CoAP Message Format:
123456789101112131415161718
# CoAP Fixed Header (4 bytes) 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Ver| T | TKL | Code | Message ID |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Token (if any, TKL bytes) ...+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Options (if any) ...+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|1 1 1 1 1 1 1 1| Payload (if any) ...+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Ver: Version (1 = CoAP)T: Type (CON, NON, ACK, RST)TKL: Token Length (0-8)Code: Request/Response code (like HTTP status)Message ID: For duplicate detection, 16 bitsMessage Types:
Request Methods (analogous to HTTP):
Response Codes (analogous to HTTP status):
The Observe Option: Push Notifications for IoT
Polling wastes energy—devices must repeatedly query for updates. CoAP's Observe option enables server-push semantics:
This model is perfect for sensor monitoring—a temperature sensor can notify only when values change, rather than responding to constant polling.
Block-wise Transfer:
UDP has no built-in fragmentation for application data. CoAP's Block option enables large payload transfer:
| Feature | HTTP/1.1 | CoAP |
|---|---|---|
| Transport | TCP | UDP (or TCP optional) |
| Header size | Hundreds of bytes (text) | 4 bytes minimum (binary) |
| Reliability | TCP provides | Optional (CON/NON) |
| Multicast | Not supported | Supported natively |
| Push notifications | Requires WebSocket | Observe option built-in |
| Proxy support | HTTP proxies | Cross-protocol CoAP-HTTP proxies |
| Resource discovery | Out of band | /.well-known/core (RFC 6690) |
CoAP security is provided by DTLS (Datagram TLS) for transport security or OSCORE (Object Security for Constrained RESTful Environments) for end-to-end security through proxies. OSCORE is lighter and protects payloads even through protocol translation gateways.
While CoAP follows the request-response paradigm familiar from HTTP, many IoT applications are better served by publish-subscribe messaging. MQTT (Message Queuing Telemetry Transport) has become the dominant protocol for this use case.
MQTT Architecture:
MQTT uses a broker-based publish-subscribe model:
building/floor1/room101/temperature)This decoupling offers significant advantages:
MQTT QoS Levels:
MQTT defines three quality-of-service levels for message delivery:
QoS 0: At most once (Fire and forget)
QoS 1: At least once (Acknowledged delivery)
QoS 2: Exactly once (Assured delivery)
Keep-Alive and Last Will:
MQTT provides connection health mechanisms:
MQTT-SN: MQTT for Sensor Networks
Standard MQTT runs over TCP, which is too heavy for the most constrained devices. MQTT-SN adapts MQTT for UDP-based sensor networks:
Key differences from MQTT:
| Feature | MQTT | MQTT-SN | CoAP |
|---|---|---|---|
| Transport | TCP | UDP | UDP |
| Pattern | Pub/Sub | Pub/Sub | Request/Response |
| Broker/Server | Required (broker) | Optional (gateway) | Optional (observed) |
| Topic naming | UTF-8 string | Pre-registered IDs | URI path |
| Message size | 256 MB max | 64 KB typical | ~1 KB optimal |
| Connection | Persistent TCP | Connectionless UDP | Connectionless UDP |
| Best for | Always-on devices | Constrained devices | RESTful resources |
CoAP is ideal for device management (read/write properties) and RESTful interactions. MQTT excels at event-driven data streaming and fan-out scenarios (one sensor, many consumers). Many deployments use both: CoAP for device configuration, MQTT for telemetry.
Managing millions of constrained devices requires standardized protocols for configuration, firmware updates, and monitoring. LwM2M (Lightweight Machine-to-Machine), developed by OMA SpecWorks, provides this infrastructure.
LwM2M Architecture:
LwM2M runs on top of CoAP and defines:
Object and Resource Model:
LwM2M organizes device capabilities into a hierarchical structure:
/{Object ID}/{Object Instance}/{Resource ID}
The OMA maintains a registry of standard objects:
Vendors define custom objects for device-specific capabilities.
1234567891011121314151617181920
# Read device manufacturer (Object 3, Instance 0, Resource 0)GET /3/0/0Response: "Acme Sensors Inc." # Read current temperature from custom sensor object (Object 3303)GET /3303/0/5700Response: 23.5 (°C) # Execute factory reset (Object 3, Resource 5)POST /3/0/5# Device performs factory reset # Observe temperature changesGET /3303/0/5700 (with Observe option)# Server receives notifications on value change # Write firmware update URI (Object 5, Resource 1)PUT /5/0/1Payload: "coap://firmware.example.com/v2.1.bin"# Device downloads and stages firmwareLwM2M Operations:
Queue Mode for Low-Power Devices:
LwM2M 1.1 introduced Queue Mode for duty-cycled devices:
Security:
LwM2M security modes:
LwM2M is mandated or recommended by cellular IoT specifications (LTE-M, NB-IoT) for device management. Major cloud platforms (AWS IoT, Azure IoT, Google Cloud IoT) support LwM2M either directly or through protocol bridges. It's becoming the de facto standard for managed IoT deployments.
For truly perpetual operation, some IoT devices harvest energy from the environment rather than relying solely on batteries. This introduces new protocol considerations.
Energy Harvesting Sources:
The challenge: harvested energy is intermittent and unpredictable. A cloud passing over a solar cell can drop power 90% instantly.
Energy-Aware Protocol Adaptations:
Dynamic duty cycling:
Energy-neutral operation:
Adaptive quality degradation:
Energy-harvesting devices face a cold start problem: they need energy to boot their MCU and radio, but may wake with empty storage. Solutions include ultra-low-power wake circuits that accumulate enough energy for a single transmission, then boot the main system once sufficient charge is stored.
We've explored the protocols and mechanisms enabling decade-long battery life in IoT devices. Let's consolidate the key takeaways:
What's next:
Now that we understand low-power protocol foundations, we'll examine one of the most important LPWAN technologies in detail: LoRaWAN. The next page explores how LoRa's chirp spread spectrum modulation and LoRaWAN's MAC layer enable kilometer-range communication from battery-powered sensors.
You now understand the low-power protocol stack for IoT—from duty-cycled MAC layers through compressed IP networking to lightweight application protocols. This knowledge applies across all IoT deployments, regardless of the specific radio technology employed.