-->
Page 1 of 2

Light Sleep, Low Power ( < 2.4mA) IoT Proof of concept

PostPosted: Wed May 10, 2017 11:39 pm
by LeonV
Hi all.

I had been trying to find source code that would enable me to run an ESP8266 from an NCR18650 for a respectable amount of time and still handle requests.
I had read many forums with topics that end before they got to any solution, with was the theme of anything i researched for this project.

However, i have sitting next to me, an ESP8266 running from an NCR18650 and only using 2.4mA RMS over 100 seconds.
It will respond to an HTTP request within 5 or so seconds.

My Git repository has the working proof of concept source code:
https://github.com/leon-v/ESP8266-NONOS ... -WiFi-Node

NOTE: This is very unpolished and a copy of my development envioment. I use Windows, Compile in the bas console for windows, and since the NONOS 2.0 makefiles require the product to be in the root of the SDK, the whole SDK i use is thre too.
The latest source is in src_dev.

Re: Light Sleep, Low Power ( < 2.4mA) IoT Proof of concept

PostPosted: Fri May 12, 2017 12:12 am
by LeonV
Just wanted to show off the money shot..
Trace 1 ans 2 are the voltage (not amperage) at each end of a 1 ohm 1% resistor used as a current shunt.
Trace M1 (Math 1) is 1 - 2, which is the current consumption of the ESP8266 and the 3.3v buck boost.
Trace 3 is the capacitor at GPIO14.

Image

What makes this the money shot is that on the right you can see the current RMS values of the traces, and this shows the DOT only consuming 1.89mA! Keep in mind this can still request and respond to HTTP/TCP requests in real time (with interrupt)

Re: Light Sleep, Low Power ( < 2.4mA) IoT Proof of concept

PostPosted: Tue May 16, 2017 2:41 pm
by LeonV
I noticed that i was getting some DC bias in the math function on my scope so i have re-tested my code with the ESP8266 running from an isolated NCR18650 and used the voltage across a 1 ohm @ 1% resistor to measure current directly.

The code has been updated to use delayed tasks to do what it needs instead of scheduled tasks that would prevent sleep in some cases.

Delay between wake cycles is ~11 seconds (too long but i didn't wan to change testing conditions)
Current shunt is still on the battery, so current consumption data includes switching losses.
Current consumption data was measured over an hour using the measurement statistics on my scope.

All this has given me a more precise current consumption of 1.25mA @ 4.11V = 5.14mW.

So 12000mWh (NCR18650 capacity) / 5.14mWh = 2334h = 97days battery life.

My initial intention was to have a small 1/2 watt solar panel that would re-charge the NCR18650, which was looking like a waste of time before, but this is looking likely, even with the various losses.

NOTE: Only the data in the statistics windows on this screen shot is relevant. I included the rest to show testing conditions.
Image

Re: Light Sleep, Low Power ( < 2.4mA) IoT Proof of concept

PostPosted: Mon Jun 19, 2017 9:35 pm
by scriptguru
That's pretty amazing!
But I don't quite understand how it works.
Do you need to send requests continuously to make it answer, or does it answer after just one HTTP request?
Perhaps the hidden part is that your client device (phone, tablet, etc) sends multiple requests trying to reach the "server"?