I have an esp8266-201 hooked up to an LM3671 buck converter breakout that is in turn connected to a 3x AAA battery pack.

The capacity of the battery pack should be at least 1200 mAh at 4.5 volts.

The apparatus draws about 100 mA while awake and about 0.175 mA while sleeping (taken with a multimeter), and it is programmed on a 60 s sleep, 3 s wake cycle. This corresponds to an average current draw should be 100*(3/63) + 0.175*(60/63) = ~5 mA.

The device only runs for approximately 2 days or about 48 hours meaning that it is registering an average current draw of 25 mA.

What is going on here?

EDIT:

I powered the device using batteries from the same pack as the ones that failed earlier. I made sure all the batteries had voltages of ~1.6 V before placing them in the pack. I loosely monitored the voltage of the battery pack over time.

N.B. I realized a flaw in my firmware was causing the ESP8266 to draw more power than needed for my application. I changed the settings and managed to about half the wake current to ~55 mA. The average current is now about 2.5 mA

Although I halved the wake current the device did not last twice as long. It ran exceptionally until about the 50 hour mark where it began to drop off quickly. Does this signify bad batteries or something else?

It seem like the batteries discharged in the manner that they should, they just exhibited a much lower mAh then they should. I am particularly perplexed that halving the current did not double the run time. What is happening here?

• What is the capacity of each battery? What is the output of the buck converter? Have you actually measured the currents in two of the modes? Nov 23, 2015 at 19:21
• What is the battery voltage after 2 days? Drawing 100 ma from an AAA battery will drop its voltage significantly after a few hours. It may still have energy left but not at enough voltage to power your circuit. Nov 23, 2015 at 19:28
• @Eugene Sh. The capacity of each battery should be about 1200 mAh. The output of the buck converter is 3.3 V. I have actually measured the currents in the two modes.
– Alex
Nov 23, 2015 at 19:36
• @Barry The voltage for the entire pack after 2 days is about 2.8 V.
– Alex
Nov 23, 2015 at 19:37
• Have you actually measured what your buck converter drains from the batteries? Or are you measuring your ESP and blue-sky-ing about the static losses in the buck converter? Nov 23, 2015 at 22:54

What makes you think you're actually draining the batteries?

The batteries are not going to provide you with 4.5V all through the 1200 mAh of charge. The voltage is going to drop. According to your measurement(s) the battery pack drops to below (I assume) ~3.3V after two days of discharge. At which point your buck doesn't have anything to buck and the rest of your system browns out.

Try using a buck/boost to get more out of your battery pack.

• This is true. The pack drops to about 2.8 V (at this point the ESP-201 can't run anymore) after 2 days. I just expected the device to be able to run longer than that. The batteries are duracell coppertops. This graph says the capacity at a 100 mA load should be about 970 mAh. I'm getting about 240 mAh out of them.
– Alex
Nov 23, 2015 at 19:41
• @Alex How many times has this under capacity occurred? Nov 23, 2015 at 19:46
• This is the first run I have made with the device. I recently bought the batteries from a local hardware store. Could the batteries be bad?
– Alex
Nov 23, 2015 at 19:49
• @Alex It's certainly appears that way. Assuming all your measurements were accurate, there isn't abnormally high temperature, or some other confounding variable, it seems the most likely reason for the poor performance. Nov 23, 2015 at 19:51
• Have you measured each AAA battery individually for voltage? Very likely that you have one bad battery of the three, but best to replace all three as never good to put used with new batteries. Of note, alkaline batteries do drop voltage very quickly with currents higher than 100 mA or so, so make sure you current measurents are accurate. Rechargeable NiMh AAA can supply much higher currents and hold their voltage (although the they will start at a voltage closer to 1.3 volts each). Let us know what you find Nov 23, 2015 at 22:35

Samuel was right, it seems as if the batteries I had used originally were bad. The device has been running for about 100h now, and the battery voltage is 4.14 V under sleep load and 4.02 under wake load.