close-circle
Close

nodemcu firmware

A project log for ESP8266 Native

Exploring running native applications on the ESP8266 modules

Matt Callow 12/10/2014 at 12:301 Comment

I did some testing with the nodemcu lua firmware.

https://github.com/nodemcu/nodemcu-firmware

This is a handy scripting language for quick tests. Not sure I'd like to write a lot of code using it though. For one thing, I don't know lua, and also the upload process is a bit painful (I used this tool https://github.com/4refr0nt/luatool)

Anyway, I hacked a script to run at startup and do the following:

Now I can measure the time required to re-connect to wifi and send an http message after a boot.

Results are here https://thingspeak.com/channels/17374

(it's about 5 or 6 seconds)

So, I can re-do my earlier calculations:

Each hour, the device would be awake 12 times for 6 seconds at a time, (72 seconds or 0.02 hours) and asleep for the remainder of the time (0.998 hours). So average current consumption in any given hour is (100*0.02) + (0.05*0.998) = 2.05mA

So the 890mAh battery would last about 434 hours, or 18 days. That's not great, but better than my original estimates.

One issue still to resolve is the inconsistent sleep current. This varies from about 50uA to over 1mA!

Discussions

Code Cardinal wrote 04/01/2015 at 08:54 point

Thanks for the estimations, I didn't know that deep sleep could save that much energy.

  Are you sure? yes | no