1595  Case Studies and Best Practices

1595.1 Learning Objectives

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

  • 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

1595.2 Case Study: Optimizing Smart Agriculture Sensor

1595.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)

1595.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)
  • Removed LED

Firmware Changes:

  • Deep sleep between readings
  • Wi-Fi connection optimized (static IP, channel, etc.)
  • Transmission only on significant change
  • Reduced transmission interval to 30 minutes

Measured Current:

  • Deep sleep: 15 µA
  • Wake + measure + transmit: 90 mA for 2 s
I_avg = (90×2 + 0.015×1,798) / 1,800 = 0.115 mA
Battery life = 3,500 mAh / 0.115 mA = 30,435 hours = 3.5 years

With efficiency factors: ~2.5 years

1595.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)

1595.3 Best Practices

1595.3.1 Design Phase

1. Define Energy Budget Early:

Set battery life requirement and work backwards:

Required I_avg = Battery Capacity / (Lifetime × Hours per day)

For 5 years on 2,400 mAh:

I_avg = 2,400 / (5 × 365 × 24) = 0.055 mA = 55 µA

This target guides all design decisions.

2. Choose Components for Power:

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

1595.3.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).

1595.3.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.

1595.3.4 Common Pitfalls to Avoid

WarningCritical 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.

1595.4 Comprehensive Review Quiz

Test your understanding of energy-aware design principles:

Question 1: A solar-powered sensor averages 5mA @ 3.7V. Your 5V 200mA solar panel provides 1W in full sun. For 7-day cloudy weather backup, what minimum battery capacity is needed (assuming 80% depth of discharge)?

Daily energy = 5mA × 3.7V × 24h = 0.444Wh. Seven days = 0.444 × 7 = 3.1Wh. Converting to mAh at 3.7V: 3.1Wh / 3.7V = 838mAh. Accounting for 80% DoD: 838 / 0.8 = 1,048mAh. Option B (1,054mAh) matches this calculation.

Question 2: Compare power consumption across different operational modes for a typical IoT sensor. Which table correctly matches the power states?

Option C is correct: Active (Wi-Fi TX): 80-300mA during transmission; Light Sleep: 100µA-1mA with fast wake; Deep Sleep: 10-100µA with 100-300µs wake time. The trade-off is deeper sleep = lower power but longer wake latency.

Question 3: Evaluate these statements about energy-aware IoT design. Which combination is correct?

  1. Solar energy harvesting eliminates the need for battery sizing
  2. Pull-up resistors on unused GPIO pins can destroy battery life
  3. Wi-Fi is more energy-efficient than LoRa for battery sensors
  4. Deep sleep reduces ESP32 consumption by ~8,000× vs active Wi-Fi

Statement 1 is FALSE: Energy harvesting still requires battery sizing for cloudy periods. Statement 2 is TRUE: 10kΩ at 3.3V = 330µA, exceeding many power budgets. Statement 3 is FALSE: Wi-Fi uses 80-300mA vs LoRa 20-120mA. Statement 4 is TRUE: ESP32 active Wi-Fi ~80-160mA, deep sleep ~10µA = 8,000× difference.

1595.5 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.

1595.6 Key Concepts Summary

Power States:

  • Active: Full functionality, maximum power
  • Idle: Processing on demand, reduced power
  • Light Sleep: Core active, peripherals off
  • Deep Sleep: Minimal power, fast wake
  • Hibernation: Almost no power, slow wake

Power Reduction Techniques:

  • Voltage scaling: Reduce operating voltage
  • Frequency scaling: Lower clock frequency
  • Peripheral shutdown: Disable unused modules
  • Sleep modes: Minimize always-on components
  • Duty cycling: Intermittent operation

Communication Efficiency:

  • Minimize transmission frequency and power
  • Use low-power protocols: BLE, Zigbee, LoRa
  • Batch messages: Amortize overhead
  • Compression: Reduce data size
  • Local processing: Reduce cloud transmission

Energy Harvesting:

  • Solar: Photovoltaic panels
  • Thermal: Seebeck effect, temperature gradient
  • Kinetic: Piezoelectric, electromagnetic
  • RF: Wireless power, ambient RF energy

Design Methodology:

  • Profile actual power consumption
  • Identify high-consumption components
  • Optimize for longest sleep periods
  • Measure battery life in practice
  • Plan for battery degradation

1595.7 See Also

Related Topics:

Further Reading:

1595.8 What’s Next

Return to the Energy-Aware Design Overview for links to all chapters in this series, or continue to Context-Aware Energy Management for advanced adaptive power management techniques.