Two years on…

I had been re-purposing some of my PCB’s and set one up for testing. Nothing special, just an ESP12S, a ATtiny1614 companion processor, a few passive components and a DS18B20 one-wire temp sensor. I was going away for a week and wanted to leave it running and see how it behaved. I hunted around home for a battery holder and batteries and the only holder I could find was for 2xD-cells so I bought two new Energizer D-cells, hooked it up and hung it from a small nail on my kitchen wall.
Yes, its just as ugly and makeshift as it sounds.

A week later I was back and looking at this thing on the wall next to my fridge, thinking I should do something about this, but I would have to stop the test, have a (gasp!) break in my data, maybe restart the test, and if so, buy another 2xD-cells (expensive), and I did not have a suitable enclosure so…
Anyway, It is still there two years on, and surprisingly, still running.
Although not for much longer. The battery voltage is at the lower limit of the DS18B20.
The ESP is good to (theoretically) 2.5V so it should work for longer than the temperature sensor.
I no longer use the One-wire chips for temperature in battery powered projects for that very reason. Now I have moved over to BME280 units that work down to a much lower voltage so the ESP now stops before the sensor. The BME280 also has the benefit of RH and Atmospheric pressure so extra data if required.
A D-cell is sold as a 1.5V battery so 2 in series gives you 3V.
Actually no. The starting voltage is higher than 1.5V. Two batteries in series gave a starting voltage of ~3.23V on the two I had. It took from the start of August-2023 to May-2025 to get down to 3V.
Some items of note in the data/graph above:
About 3/4 of the way into the test I started to have some intermittent issues with my home WiFi. Extended connection times or timeouts.
I replaced the router wall-wart and it seemed to settle for a time, then it got much worse. My 2.4G WiFi would disappear for short periods, then longer periods, so I replaced the router.
Both of these caused greater than normal power-consumption with a visible dip in the voltage, followed by a partial recovery as shown below.

That was the most problematic issue in the whole test.
There were a few minor power-outages over the 2-year period, and just recently, storm damage caused power loss for a full 24Hrs. That is near the head of the graph and shown below.

The regular up/down cycling of the voltage is due to the ambient temperature changes. What your seeing is the day/night difference because no temperature compensation in the ADC data. One day I will get round to it.
The major dip is because the sensor is set to try and connect for up to 1.5 sec before giving up. This works OK almost all the time, just an occasional timeout.
With the power outage and a connection being attempted every 4-min, that’s 360 timeouts or 540 seconds of power-on time.
If everything is ‘normal’, a 24Hr period equates to about 100-sec of runtime.
It is not quite that straightforward because in the 1.5 seconds timeout period there is quite a bit of WiFi activity while making the attempts. A ‘normal’ connection has less WiFi activity because the connection succeeded so it is not just about the runtime. WiFi is power-hungry
I am just going to let it keep running to see what happens. After 2 years it would be crazy to turn it off now.
I am interested to see how low the battery can go and everything keeps working. I guess the DS18B20 will quit first as the data-sheet says 3->5.5V working. This is for the device to meet spec (-55 to +100 deg-C) so its probably going to work for a while yet but perhaps not meet spec for the whole range.
I suppose I should set up another monitor beside this one to see how the temperatures track as the battery voltage declines (which I have now done).
I’m amazed it lasted this long.