Apply energy optimization techniques to real-world scenarios
Analyze before/after optimization results
Implement best practices for energy-aware design
Avoid common pitfalls in low-power system design
Create a systematic design process for battery-powered IoT
In 60 Seconds
Real-world case studies reveal that dramatic battery life improvements — from days to years — come from a systematic four-step process: profile current draw in every operating state, identify the dominant consumer, apply targeted optimization (duty cycling, sleep modes, or hardware power gating), then re-measure to confirm the saving.
For Beginners: Case Studies and Best Practices
This hands-on chapter lets you practice energy and power management for IoT devices. Think of it as learning to pack efficiently for a camping trip where every gram matters. Working through these exercises teaches you to measure power consumption, calculate battery life, and optimize your designs for maximum efficiency.
Sensor Squad: Real Stories of Energy Savings!
“Let me tell you about a farm sensor that only lasted two weeks on one battery,” said Bella the Battery. “The problem? It was sending data every 30 seconds over cellular, and the radio was the biggest energy hog. After optimization – sending every 15 minutes over LoRa instead – the same battery lasted over two YEARS!”
Sammy the Sensor explained the key changes: “They used three tricks. First, they switched from cellular to LoRa, which uses 100 times less energy per transmission. Second, they increased the sleep interval from 30 seconds to 15 minutes. Third, they added a solar panel for trickle charging. Each change multiplied the battery life!”
Max the Microcontroller shared the common pitfalls: “The biggest mistake is forgetting about the radio. People optimize the sensor and the processor but forget that transmitting one packet over Wi-Fi uses more energy than a THOUSAND temperature measurements. Always optimize the most expensive operation first!” Lila the LED added, “These case studies show that small changes can have HUGE impacts. A few smart decisions can turn a two-week device into a two-year device!”
Interactive: Energy Harvesting Analysis and Scenarios
19.2 Case Study: Optimizing Smart Agriculture Sensor
19.2.1 Initial Design (Battery Life: 2 weeks)
Hardware:
ESP8266 (high power Wi-Fi)
DHT22 sensor (slow, higher power)
2× AA alkaline batteries (3,000 mAh)
Status LED (always on)
Firmware:
Measure and transmit every 15 minutes
Wi-Fi connection time: ~5 seconds
No sleep mode (idle loop)
Measured Current:
Active (Wi-Fi TX): 120 mA for 5 s
Idle: 80 mA for 895 s
I_avg = (120×5 + 80×895) / 900 = 80.2 mA
Battery life = 3,000 mAh / 80.2 mA = 37 hours = 1.5 days
Actual measured: ~2 weeks (ESP8266 enters some sleep automatically)
19.2.2 Optimized Design (Battery Life: 2 years)
Hardware Changes:
Switched to ESP32 (better sleep modes)
SHT31 sensor (lower power, faster)
2× AA lithium primary (3,500 mAh, better discharge curve)
Try adjusting the sleep current from 15 µA (deep sleep) to 100 µA (light sleep) to 2000 µA (idle mode) and observe the dramatic impact on battery life!
Putting Numbers to It
Let’s break down the optimized design calculation step-by-step:
Total average current: \[I_{\text{avg}} = 0.01498 + 0.1 = 0.115 \text{ mA}\]
Battery life with 3500 mAh lithium primary: \[\text{Life} = \frac{3500 \text{ mAh}}{0.115 \text{ mA}} = 30,435 \text{ hours} = 1268 \text{ days} = 3.5 \text{ years}\]
Comparing to initial design (80.2 mA average): \[\text{Improvement} = \frac{80.2}{0.115} = 697\times \text{ better battery life}\]
This ~700× improvement came from: (1) deep sleep mode (5000× current reduction during 99.9% idle time), (2) faster sensor (50% less active time), and (3) transmission-on-change (50% fewer TX events).
19.2.3 Lessons Learned
Optimization
Impact
Deep sleep (vs idle)
5,000× reduction
Faster sensor
50% less active time
Removing LED
10 mA saved
Transmit on change
~50% fewer transmissions
Overall improvement
60× (2 weeks to 2 years)
19.3 Case Study: Livestock GPS Tracker – Digitanimal (Spain)
Digitanimal, a Spanish agtech company, produces GPS-enabled ear tags for cattle tracking across open rangeland. Their product evolution illustrates how iterative energy optimization transforms a failed prototype into a commercially viable product.
Radio: 2G cellular (GPRS), transmitting every 5 minutes
Battery: 700 mAh LiPo
Power draw: 85 mA average (GPS 40 mA + cellular 30 mA + MCU 15 mA)
Result: Completely impractical. Farmers cannot replace ear tag batteries every 3 days across 500 cattle.
Generation 2 (2019) – Battery Life: 6 months
Optimization
Before
After
Impact
GPS duty cycle
Always-on
1 fix every 30 min, cold start
40 mA continuous -> 40 mA for 45s every 30 min = 1.0 mA avg
GPS hot start
Cold start (45s)
Store ephemeris, hot start (5s)
45s -> 5s active time = 0.11 mA avg GPS
Cellular protocol
GPRS (always connected)
NB-IoT (PSM mode)
30 mA continuous -> 120 mA for 2s every 30 min = 0.13 mA avg
MCU sleep
Light sleep (2 mA)
Deep sleep (8 uA)
15 mA -> 0.008 mA
Battery
700 mAh LiPo
1200 mAh LiPo + 80 mA solar cell
700 mAh -> effectively unlimited in summer
Average current dropped from 85 mA to 0.25 mA – a 340x improvement. Battery life without solar: 1200 mAh / 0.25 mA = 4,800 hours = 200 days. With solar supplement in summer months, devices run year-round.
Putting Numbers to It
Let’s quantify the GPS hot start optimization for Digitanimal’s livestock tracker:
Energy savings: \[\text{Reduction} = 1.0 - 0.11 = 0.89 \text{ mA saved}\]
Impact on battery life (1200 mAh battery): - Before hot start: dominated by 1.0 mA GPS → ~50 days - After hot start: GPS contributes only 0.11 mA → enables 200+ day life
Implementation cost: Just 4 KB of flash memory to store ephemeris data (satellite orbital parameters), refreshed every 2 hours. This simple firmware change delivered 89% energy reduction in the most power-hungry component, extending battery life from 3 days to 3 weeks before any other optimizations. Combined with NB-IoT PSM and deep sleep MCU, final life reached 200 days.
19.4 Case Study: Industrial Vibration Sensor – SKF Enlight AI
SKF, the Swedish bearing manufacturer, deploys wireless vibration sensors on factory equipment for predictive maintenance. Their sensors must operate for 3-5 years on a single battery while sampling vibration at 25.6 kHz – an extreme challenge because high-frequency sampling is inherently power-hungry.
The Power Budget Challenge:
Vibration measurement: 25,600 samples/sec x 16 bits x 100ms burst = 40 mA for 0.1s
FFT computation on-device: 15 mA for 50ms (512-point FFT)
BLE transmission of spectrum: 12 mA for 200ms (2 KB compressed)
Deep sleep between measurements: 3 uA
Per-measurement energy: (40 x 0.1 + 15 x 0.05 + 12 x 0.2) = 7.15 mAs
Measurement interval selection – the critical tradeoff:
Interval
Avg Current
Battery Life (3600 mAh)
Failure Detection Lag
Every 1 min
119 uA
3.5 years
Catches fast-onset faults (minutes)
Every 10 min
12 uA
34 years (battery self-discharge limited to ~10 yr)
Misses rapid bearing failures
Every 1 hour
2.0 uA
Exceeds battery shelf life
Only catches gradual degradation
SKF chose every 10 minutes as the default, with adaptive scheduling: when baseline vibration levels increase by 20%, the sensor automatically switches to 1-minute intervals. This “slow-adapting with alert escalation” strategy borrows from biomimetic sensing principles – monitoring coarsely until something changes, then zooming in.
Select components with sleep modes compatible with your budget. A 100 µA sleep current component consumes your entire budget in the above example.
3. Plan for Measurement:
Include test points, current measurement breakout, and profiling GPIOs in PCB design.
4. Oversize Battery:
Add 50-100% margin for:
Degradation over time
Temperature effects
Underestimated consumption
19.5.2 Implementation Phase
1. Measure Early and Often:
Don’t wait until final prototype. Measure breadboard consumption to validate assumptions.
2. Profile All States:
Measure deep sleep, light sleep, idle, and active states separately. One misconfigured peripheral can ruin battery life.
3. Test Wake-Up Time:
Ensure wake-up time + operation time fits budget. Fast wake is critical for short duty cycles.
4. Verify Actual Sleep:
Check that device actually enters deep sleep. Misconfiguration can leave peripherals powered (1,000× consumption difference).
19.5.3 Testing and Validation
1. Long-Term Current Monitoring:
Capture current profile over hours/days to find:
Unexpected wake-ups
Slow leaks
Periodic background tasks
2. Temperature Testing:
Battery capacity and device current vary with temperature. Test at operational extremes (0°C, 50°C).
3. End-of-Life Testing:
Test behavior at low battery voltage. Some devices malfunction or increase current when battery depletes.
4. Production Validation:
Measure sample of production units. Manufacturing variations (solder bridges, wrong components) can increase current.
19.5.4 Common Pitfalls to Avoid
Critical Pitfalls That Destroy Battery Life
1. Forgetting Pull-ups/Pull-downs:
10 kΩ pull-up on unused GPIO at 3.3V = 330 µA continuous (destroys battery life).
2. Leaving Debug Interfaces Active:
UART, JTAG, USB-serial chips can consume mA when not disabled.
3. Floating Inputs:
Unconnected MCU pins can oscillate, consuming excessive current. Configure as outputs or enable pull-ups/downs.
4. Incorrect Sleep API Usage:
Using wrong sleep function or forgetting to configure wake source prevents deep sleep.
5. Ignoring LDO Quiescent Current:
High quiescent current regulator (100 µA) wastes power even in sleep.
6. Over-Optimistic Battery Ratings:
Battery capacity ratings often assume ideal conditions (20°C, low discharge rate). Real capacity may be 60-80% of rating.
19.6 Comprehensive Review Quiz
Test your understanding of energy-aware design principles:
## Conclusion
Energy awareness is not optional in IoT design—it’s fundamental. The difference between a device lasting weeks versus years depends entirely on careful attention to energy consumption at every level:
Component selection
Circuit design
Firmware implementation
Communication strategies
Modern IoT platforms provide powerful tools for ultra-low-power operation: microcontrollers with sub-microamp sleep modes, energy-efficient wireless protocols, and sophisticated power management ICs. However, these capabilities only deliver results when systematically applied.
Energy harvesting extends these principles further, enabling battery-free operation for applications with access to solar, thermal, kinetic, or RF energy sources. Properly designed energy harvesting systems can operate perpetually, eliminating maintenance costs and environmental impact of battery disposal.
The investment in energy-aware design pays immediate dividends: longer battery life reduces maintenance costs, enables new deployment scenarios, improves user experience, and demonstrates engineering excellence. As IoT scales to billions of devices, energy efficiency becomes not just a technical requirement but an environmental and economic imperative.
For 1% duty cycle: - Light sleep (100 µA): I_avg = (30 mA × 0.01) + (0.1 mA × 0.99) = 0.399 mA - Deep sleep (10 µA): I_avg = (30 mA × 0.01) + (0.01 mA × 0.99) = 0.310 mA - Savings: 22% (deep sleep wins unless wake latency is critical)
When light sleep wins: If waking >10 times/second, deep sleep overhead (100-300 µs each wake) can cost more energy than light sleep’s higher idle current.
Interactive: Sleep Mode Comparison Calculator
Compare deep sleep vs light sleep for your application:
Show code
viewof app_active_time = Inputs.range([10,10000], {value:2000,step:10,label:"Active time per cycle (ms)"})viewof app_sleep_time = Inputs.range([100,300000], {value:898000,step:1000,label:"Sleep time per cycle (ms)"})viewof app_active_current = Inputs.range([10,500], {value:80,step:5,label:"Active current (mA)"})
Adjust the duty cycle to see when deep sleep vs light sleep makes the most difference. For very low duty cycles (<1%), deep sleep dominates battery life.
Common Mistake: Trusting Datasheet “Typical” Current Instead of Measuring Actual
What they do wrong: Engineers calculate battery life using datasheet “typical” values (e.g., “Deep sleep: 10 µA typ”) without measuring their actual hardware.
Why it fails: Real sleep current includes: - Voltage regulator quiescent current (often 50-100 µA) - Pull-up/pull-down resistors (10 kΩ at 3.3V = 330 µA!) - LEDs with high-value resistors (1 kΩ = 3.3 mA) - Peripheral chips not in shutdown mode - PCB leakage current
Example: ESP32 datasheet shows 10 µA deep sleep. Actual measured board current: 180 µA (18× higher!)
I2C pull-ups (2× 10kΩ on 3.3V): 2 × 330 µA = 660 µA (oops - should be 47kΩ!)
Actual ESP32 sleep: 10 µA
Redesign with proper components: - Replace LM1117 with MCP1700 (2 µA quiescent): saves 58 µA - Add MOSFET to cut power to CH340: saves 70 µA - Change pull-ups to 47 kΩ: saves 590 µA - New total: 12 µA (matches datasheet!)
Battery life impact:
Original (180 µA): 2,000 mAh / 0.18 mA = 11,111 hours = 463 days
Optimized (12 µA): 2,000 mAh / 0.012 mA = 166,667 hours = 19 years!
Correct approach: ALWAYS measure actual board current with ammeter/power analyzer before finalizing battery life calculations. Use worst-case datasheet values (max, not typical) for conservative estimates.
Real example: A company shipped 5,000 LoRa sensors expecting 5-year battery life based on ESP32 datasheet 10 µA sleep current. Actual field life: 8 months. Root cause: 150 µA regulator quiescent + 100 µA from UART bridge they forgot to disable. Recall cost: $275,000. Lesson: Measure don’t assume.
19.9 Concept Relationships
These case studies demonstrate the interplay of multiple energy management concepts:
Design Methodology:
Requirements Engineering: Battery life targets drive component selection and architecture decisions
Pareto Optimization: Trading off features (transmission frequency) against battery life