IoT Power Consumption Concern




Introduction: IoT Power Consumption Concern

About: Make it yourself if you cannot buy one!

This instructables show how to measure the power consumption in an IoT project.

And also show some well known methods how to reduce the power consumption.

Step 1: Why?

Most IoT is not wired but connecting the Internet, so power consumption is a big concern.

Subsequent to my previous instructables - ATtinyPowerMeter, its time to use it measure the power consumption.

Step 2: Components Used


ESP Board

I have NodeMCU, WeMos D1 Mini and ESP-12 in hand

Sample Project

I used my previous instructables - ESP8266 WiFi Analyzer as a testing sample project

3V3 Regulator

I followed ItKindaWorks's YouTube made one:

Step 3: Test Plan

  1. Measure the power consumption of the original ESP8266 WiFi Analyzer as a baseline
  2. Test deep sleep mode
  3. Cut LCD power while deep sleep
  4. test other ESP board

Step 4: Baseline - USB Power

First of all, I need a baseline of power consumption before any tuning.

Here is the connection setting:

USB Power +ve -> ATtinyPowerMeter Vin+
USB Power -ve -> ATtinyPowerMeter GND  -> NodeMCU USB -ve
                 ATtinyPowerMeter Vin- -> ModeMCU USB +ve

It consume around 125 mA all the time.

Step 5: Deep Sleep Mode

Consume 125 mA is not very much but it can only run few hours using a 1000 mAh battery pack.

Most IoT no need always connect to the Internet, it only require send data at a certain interval. ESP8266 SDK provide deep sleep function for saving the power usage between this interval.

Here is the code change added at the tail of loop() function:

if (++scan_count >= SCAN_COUNT_SLEEP) {

Wait after the trigger condition, the power usage dropped to around 54 mA.

P.S. ESP WiFi Analyzer no need connect to the internet at certain interval. It just need press reset button to turn it on again.

Step 6: Cutting LCD Power

Deep sleep drops over 70 mA power usage but still consume 54 mA, because the LCD still turned on.

I cannot found any power saving command in ili9341 data sheet. So I have redirect the LCD Vcc and LED to ESP board GPIO to control the power on and off. (WARNING: this is a dirty method, you should add MosFET or transistor in the middle for long term solution)

Here is the connection change:

LCD Vcc -> D2(GPIO4)
LCD LED -> D4(GPIO2)(it is coincident but not typo :P)

And you can find latest code change for controlling GPIO on and off at GitHub:

After the connection and code change the normal power usage drops to around 109 mA (it should caused by GPIO cannot provide enough power to LCD's LED); and deep sleep power usage drops to around 18 mA.

Step 7: Test Other ESP Board: WeMos D1 Mini

18 mA is much better than 125 mA, but it very far from ESP8266 data sheet claimed 20 uA. The power should be consumed by other board component. Let's test other boards is it better.

WeMos D1 Mini consume 89 mA at normal mode and 6 mA at deep sleep mode.

Step 8: ESP-12 + LiPo With Regulator

WeMos board just consume 6 mA is much better, but how about direct use ESP-12 board to reduce other components?

At the same time power source changed from USB to LiPo battery with a 3V3 regulator. (it actually reduced the DC step up circuit inside the power pack, i.e. reduce power usage)

Here is the connection summary:

LiPo +ve -> ATtinyPowerMeter Vin+
LiPo -ve -> ATtinyPowerMeter GND  -> ESP-12 Vcc
            ATtinyPowerMeter Vin- -> ESP-12 Vcc

This setting consume 94 mA at normal mode and 0.2 mA at deep sleep mode.

Step 9: NodeMCU LiPo to 3V3 Pin

As a control, also test LiPo battery in other board.

This setting consume 95 mA at normal mode and 26 mA at deep sleep mode.

Step 10: NodeMCU LiPo to Vin Pin

This setting consume 145 mA at normal mode and 3.4 mA at deep sleep mode.

Step 11: ESP-12 LiPo Without Regulator

This setting consume 120 mA at normal mode and 25 mA at deep sleep mode. Seems deep sleep doesn't work if input voltage too high.

Step 12: Conclusion

Reduce component can much reduce power consumption, but a good 3V3 regulator also very important.

Invention Challenge 2017

Participated in the
Invention Challenge 2017

Be the First to Share


    • For the Home Contest

      For the Home Contest
    • Big and Small Contest

      Big and Small Contest
    • Make It Bridge

      Make It Bridge



    4 years ago

    Why use the ATtinyPowerMeter instead of measuring the current with a DMM?


    Reply 4 years ago

    Hi AdamU9, ATtinyPowerMeter can measure voltage and current at the same time and then help you calculate accumulated power consumption. IoT usually not drawing constant current, it draw much more while WiFi operation but it usually only last few ten milliseconds. Accumulated power consumption can help you estimate how much actual battery capacity your project required.


    5 years ago

    As always, an unusual, interesting and innovative instructable... excellent project, love it!