ESP8266 on batteries for years – part 5

Actual power consumption measurements

 

The power beast – ESP8266

One of the very first and most important measurements is how much the ESP consumes when its waken up. I used my voltage/current logger to measure this. This is the result:

It shows that the ESP is awake for about 0.7 seconds and on average it uses 78mA. The raw data can be downloaded here.

 

AtTiny85 and the sensors

Next is measuring the cycle of the AtTiny when it does it’s measurements. The chip uses so little power that I had to change shunt resistor of my INA219 from 0.1R to 10R, giving it 100 times more sensitivity.

It shows that a measurement takes about 180 ms and uses about 1.35 mA on average. The raw data can be downloaded here. I have deliberately reduced the clock frequency on the AtTiny from 8 MHz to 1 MHz. This makes it go from 10+ mA down to about 1 mA.

My modification to my datalogger:

 

Sleeping power consumption

With a multi-meter I was able to measure 23.5uA for the entire device when both the AtTiny and the ESP are sleeping. This is without any power regulator or DC-DC converter. I still havn’t decided which way I will go here. But it should be possible to find a solution under 10uA quiescent current.

 

Final calculation

With the above measurements I can now do the real world calculation of the battery consumption. And it was quite close to my first calculation.

This should be fine for running some years on AA batteries 🙂

 

Next

I will add more info about power regulators / DC-DC converters when they arrive from china. This can take 1-2 month. I hope you enjoyed reading about my little project.

Comments are welcome 🙂

4 thoughts to “ESP8266 on batteries for years – part 5”

  1. Hi Alex,

    I’m currently working on a Wifi project with a ESP8266. The hardware is based on a PIC and a ESP8266 module, some sensors and AA batteries. The interface between the micro and the module is UART with AT commands.

    Both the micro and ESP are in deep-sleep most of the time, waking every hour to connect to wifi and deliver data.
    My problem is that from reset it takes the ESP8266 ~3s to connect to Wifi and ~4s to get a DHCP lease.
    Several places i see connection times below 1s, but also others that have 3s (7s with DHCP).

    So how do you get below 1s in connection time?

    1. DHCP is a no-go. Besides that I don’t do much. I use an ubiquiti AP lite – really good quality AP.
      If you deep sleep the ESP and start it up with the radio disabled, that will add 3 sec when you need the radio because of calibration.

  2. Hi Alex,

    Thanks for the reply.
    If you deep sleep the ESP and start up with the radio enabled, wouldn’t it take 3 sec to calibrate still? So by disabling the radio on startup you are postphoning the 3sec calibration?
    If so, this could explain the ~3s connect time i experience.

    1. In my device my radio is on every time I go to sleep and when I wake up. I can keep the wifi connection time under 1s most of the time. As soon as I play with disabling the radio, I get a 3 second penalty (where the ESP does calibration).

Leave a Reply

Your email address will not be published. Required fields are marked *