Esp8266 with dht22 running on 2 AA batteries

Tags: #<Tag:0x00007fa35b6247c8>

I’ve just set up an ESP8266 with a dht22 temp/humidity sensor posting to thingspeak on 2 AA batteries.
You can see the results here.
I wanted a base result to compare with power saving.

Next I intend to try it with 2 AA’s and power saving and again with 3 or 4 AA’s with a switching voltage regulator.

Some have got more than 6 months off batteries so it might be a long test on power saving after I’ve drained the current 2 AA’S.


Is there a reason for not using more batteries in parallel? Is there an advantage to putting them in series and using a voltage regulator?.

Voltage regulators burn the excess energy so that wouldn’t be a great idea.

The board takes 3.3v and can run on a bit less. 2 AA give 3v and a little bit more.
So you can use them without the drain of a voltage regulator.

With a switching regulator 3 or 4 AA gives between 4.5 and 6v stepped downt to 3.3v exactly.
There will be exactly 3.3v available hopefully for longer with more batteries.

But which is best just batteries or more batteries and a regulator even though the regulator will use some power.

The switching regulators are more efficient and dont waste the power as heat like the LM series like the LM317.

Ive got some of these AMS1117 based packages.
Small and convenient about the same size as the other voltage regulators.


But using 2 (2xAAs in series) in parallel gives you 3V but with twice the energy reserve, and no need for regulation.

For 3 just put 2xAAs in parallel with one I series? Still 3 V

I think size wise 2 AA’s, if i can get away with it, would be best as even then the batteries are going to be bigger than the device. But yes 2x2AA’s would give a longer life.

I think there are ways to get every last bit of power out of batteries i could look into.

Looking at my graph at the moment i think im already having power problems.
I think i need a capaciitor across the power source based on what ive been reading on the forums.


Ouch it was dead after 20 minutes.
3.05 v to 2.95v after 20 minutes.
At 2.95v i cant get it to start.

Ill have to check the threads on the forum to see exactly how they hooked it all up for deep sleeping between readings and the extra bit of power it needs to wake up properly.

You need a boost converter that will help you to use all the energy in the battery…

As the overall power in the battery drops, so does the voltage, that means you need to boost the lower voltage up by drawing more current… Basically your battery voltage dropped to a point where it can’t run the microcontroller but it still has a bunch of energy left in it.

Need to do a bit of reading up on jewel thieves and buck boosters.

While I can just add extra batteries that narrow band between 3 and a bit volts and 2.90 will be wasful of the power left in the cells. It needs the extra power circuitry to keep the output at 3.3v and use up every last bit of power in the batteries. Even though theres a small drain by the boost circuitry.

The regulator i mentioned earlier needs a minimum of about 4.5 volts to produce 3.3v.
4 AA’s start at a bit above 6v so by the time the batteries get too low at 4.5v each cell is down to 1.1v.
So even with the overhead of the regulator it may be better than 2 parallel banks of 2 batteries as Dermot suggested fed directly to the device. But probably by only a little.
Ill give it a test anyway.

But ill also see if i can find a cheap boost solution to get all the power out of those batteries.

If you don’t use a boost converter then you are wasting 50% or more of the battery.

Not sure that’s correct…more like 99% in the current setup…and Isnt it’s all about the voltage curve of whatever battery type you choose? Your batteries are just doing what they’re supposed to…

I knew alkalines dipped a bit below 1.5v fairly quickly, but usually it’s not an issue. Because your application needs that specific minimum voltage you need to look at what the expected voltage of the batteries might be with the current draw of your circuit over time.

You can probably find an online calculator for this. The curve is usually fairly flat for batteries, with sudden plummet at the end. Obviously it’s the flat bit that matters.

Or just use more batteries and a switching regulator, or the power boost thing Tommel mentioned, which sounds interesting. That’s for using smaller batteries to provide bigger voltages? Seen something like that in tiny amplifier somewhere…I think.

I guess Tommels solution is best use of space.

Ive set it up with 4xAA at 6.18v with the little switching regulator to see how it does.
On the same channel on thingspeak.
Im not monitoring the battery pack just whats coming out of the regulator.
I expect there will be a bit of a dip at some point then it will fail.
But it should be more reliable at dealing with the odd extra drain when it uses wifi that was causing the unreliabilty of the first set of results. I think it browned out a few times when the power requirements rampded up and the 2 AA couldnt keep up without some capacitors to deal with it.

Running 3v into a buck booster to get the 3.3v would probably be the most efficient.
Most of the boards iv seen so far for this have been quite large.
Ill see what else i can find.

Its been running for nearly 12 hours now on 4AA batteries with no power saving.
The voltage supplied by the regulator is still at 3.32v.
I think with the power saving set up, even with the switching regulator rather than a buck booster it should give a fair few months use.

The power saving mode turns everything but the real time clock off.
Depending on the slerp time you give it. The clock then resets the device.
The device boots up, connects to the wifi router, gets and sends the readings then turns off again waiting for the RTC to wake it.
It only needs to be on for seconds to connect and send the data.
So if i have it sleeping for 10 minutes between waking up and its on a few milliamps keeping the RTC ticking over, It should run for a decent time between battery changes.
So thats the next task.

Ive knocked up a design in eagle for a home brew pcb prototype that I hope to etch and solder up in the next few days. Once thats done and tested ill set it going.
If that looks good ill get some proper boards made to have several running.

Still running and heading for 24 hours.
Imagine if someone told you they had an arduino and ethernet shield running for 24 hours on a few AA batteries.

Still has about 5.5v in the 4 AA’s and 3.32v supplied to the device.

The results are a bit sporadic. So i need to look into that.
It could just be the circuit ive used and its all on a breadboard still.
Theres a couple of changes i can make, like keeping the reset pin high, that i havnt got round to on this version.
And once im using the full reset after deep sleep, essentially rebooting the whole device every time i want a reading, it should be better.

How are you measuring voltage? You can’t measure when they are not under load.

That said a boost/buck converter with cut out would still be better because it will use all the battery where as the switching regulator will cause a brown out on the chip eventually.

Everything was measured under load.

Still cant find much in the way of 3.3v buck booster from my usual sources.
Plenty of 5v ones.
Same with plug in power supplies i have to drop the 5v ones down to 3.3v with a regulator.
The ones I do find are very expensive.


Is there much.power left in batteries at the end of their life? I mean at the point in the curve when voltage plummets? Can you get a meaningful amount of power out of them? Presumably the internal resistance of the battery shoots up making it less of a voltage source anyway? It would be useful to drain every drop out of them.