ESP8266: R.I.P. Long Term Data Logger after almost 3 months.

Yesterday evening the ESP8266 the data logger connected for the last time to Thingspeak and posted temperature and humidity. It has reported these values every 10 minutes for 2045 hours or in other words 85 days. This is nearly 3 months!

ESP8266 posting temperature and humidity every 10 minutes
for almost 3 months on 3 AA batteries

In the last few days the DHT11 had started reporting bogus data, probably the voltage was insufficient to do a correct reading. While the reported temperature continued to look reasonable until the end you can’t say the same about humidity. It kept toggling between 95%, 43 and 0%.

Summary

All in all I’m very impressed that the setup could last so long. It was so stable that it would run on its own, without ever restarting it. In the same duration I had misconfigured my access point and had to set it up again and my internet provider had produced a 10 hour “internet blackout”. Now the three cells have each a voltage of about 0.9V.
Maybe with a few additional tricks and without the AP/ internet blackouts the batteries would have lasted longer (fix IP, feeding DHT11 voltage through GPIO pin, etc). But it’s already an impressing duration for a simple setup.
Have a look at the history of this experiment:
Shopping List:

Posted by Daniel Eichhorn

Daniel Eichhorn is a software engineer and an enthusiastic maker. He loves working on projects related to the Internet of Things, electronics, and embedded software. He owns two 3D printers: a Creality Ender 3 V2 and an Elegoo Mars 3. In 2018, he co-founded ThingPulse along with Marcel Stör. Together, they develop IoT hardware and distribute it to various locations around the world.

9 comments

  1. Were you using encryption for the wifi and TCP to send packets? I suspect using no encryption and UDP would make it last longer. Also the power consumption might vary depending on the bitrate of the wifi and association mode (80211b for ex).

  2. This was as a nice experiment. Seems that a tiny solar cell from a lawn light and rechargeable batteries could supply the sensor indefinitely (ignoring the recharge life of the battery).

  3. One question about the code:

    String voltage = String(system_get_free_heap_size());

    That system call is for free memory, not voltage afaik.

    Great stuff though!

  4. Daniel,

    I have tried an alternative power supply.
    In this case an ISY Mobile Powerbank IAP 2303, 5200 mAh, 5V 1,5A output.
    This makes me hopefully, power independant.
    From an old USB cable, i cutted of the unused USB and connected the black nd red wire to the PCB.
    Unfortunately the powerbank shutsdown after a few minutes.When tried it a little wile later, after draining 25% of the powerbank, ints stays alive somewhat longer.
    Now approximately 30 minutes.

    Any thougths on this subject??

    Thanks for reading and reply in advance.

    Regards.
    ArjenW

  5. With a switching regulator instead of the linear one one on the board you should be able to get more life from the batteries. I suspect you died from the low drop out regulator limiting voltage to the ESP unit once the batteries dropped under 1V.

Leave a Reply