Best choice to power up a ESP8266 with a battery

Hi there!

I'm developing a small project to get some notification from my alarm system.

All the necessary components are ready (circuit, software) except for.. the power source!

The board is a ESP8266 that (I think) work @3.3v.
I would like to get the best choice to power it up with a battery.

The ideas I'm considering at the moment are:

  • 9v battery connected to Vin and GND pin
  • 9v battery connected to a dc-dc converter (LM2596S) that output 5V (right?) than connect it to Vin and GND pin
  • four AA batteries in series connected to Vin and GND pin
  • four AA batteries in series connected to a dc-dc converter (LM2596S) that output 5V (right?) than connect it to Vin and GND pin
  • a huge power bank (like 10000mA) connected via micro usb

I read a lot online but, still, to much confused to take the best decision.
If I understood wht I read, the 9v battery should be the worst one.
I would like to understand which one is the best approach in terms of efficiency. I understand that the total power any approach can give is different, but I'm worried about the percentage of the total power will be really used and not wasted.

Can you please be so kind to give me some.. help?

On a side note, this ESP8266 will deepsleep for 15 seconds, than wake up, check for some digital pins statuses, check whether their status is changed (the previous read will be retrieved from the rtc clock) and, only if something's changed, connect to wifi and send a telegram message, than deepsleep again.
Considering I'm not going to hack the hardware, I hope this is the best I can get to save power focusing only on software.

Thanks in advance for any reply!

MJ

There are many different "ESP8266" related products. In fact, when you say "ESP8266" you could be talking about the IC -- but, since you also used the term "board", that at least alludes to one of the modules utilizing the ESP8266 IC.

So, which module are you talking about?

I've only, so far, worked with the ESP-01. There is no "Vin" on that module, so I'm unfamiliar. I did a bit of Googling, but, because there are so many different versions, I wasn't able to filter out much info on an ESP module Vin's characteristics, other than: I only saw 5V being applied.

But, you want to know about efficiency. The most efficient way to go is to use a DC-DC converter to transform the battery voltage to the required 3.3V (and then apply that to the VCC or "3.3V" pin). That way, even as the battery voltage sags, the final voltage will stay at 3.3[different chemistries have different discharge curves -- some flatter than others -- plus the discharge rate plays a role]. A converter will mitigate voltage changes as the battery discharges AND make the most efficient use of the stored energy.

BUT

Because use will be intermittent, perhaps this level of efficiency isn't as crucial. A cheaper/easier solution may be to use a larger battery. But, you will, likely, still need regulation, so at least use a linear regulator, and if the battery is only a few tenths of a volt away from 3.3V, as would be the case with a lithium chemistry battery, then use a Low Dropout [LDO] regulator. OR, you can probably get away with a lithium type battery with no regulator -- but check the datasheet for the ESP device you will be using, to see what the max VCC is -- and make sure the battery you choose can never have a higher voltage than that. Also, consider the lowest battery voltage, too.

BUT

ESP modules, being WiFi devices, draw a LOT of current. So, even with intermittent use, there still may be a significant power loss in a linear regulator -- so, were back to the DC-DC converter [i.e. "Switch Mode" solution]. AND, because ESP modules draw a lot of current, make sure that the battery you choose can deliver that much current. Another factor in the efficiency equation, is the batteries internal resistance. The batteries internal resistance will consume power, so you want that resistance to be low enough to not have a significant impact -- over the entire discharge curve. In other words, as a battery drains, the internal resistance increases, so take that into account, as well. OR because of the intermittent nature of this application, a super capacitor [SuperCap] might be of value -- you could get away with a battery that has a higher internal resistance by putting a supercap across it. The battery will charge the SuperCap, then when current demand is high, the SuperCap will deliver it with practically no internal resistance! The result is greater efficiency with a smaller battery. BUT, there will be power loss everytime the battery charges the SuperCap, so to make that more efficient, insert a DC-to-DC converter [probaby a boost converter, but depends on the relative voltages]. BUT, you will need, either a SuperCap with a voltage rating greater than the highest voltage in question [and a little higher as a safety margin] or you will need several SuperCaps in series, and that gets into charge balancing and stuff -- i.e. more complexity -- is it worth the extra efficiency and/or cheaper battery? Only a study will tell. But, there are 5V SuperCaps [which, BTW, can be used in a 5V application -- i.e. no need for that "safety margin" I spoke of before -- whew! Time to bust out the pruning shears!], and they aren't that expensive, so worth a try? [there are other caveats and complexities, but the BUTs are getting out of hand! -- WHERE ARE THOSE PRUNING SHEARS?!?]

BUT

You are, currently, holding most of the cards -- so you will either need to provide us more information [such as the type of ESP module you are currently clutching], or you will need to skurry off and design this thing yourself, using the information I've provided so far. ;D

Hey ReverseEMF, thank you so much!!

Please forgive my inaccurancy, I'm quite a newbie on this field.

The board I'm using is a NodeMCU Amica.
What I know so far is that its GPIO works ar 3.3v and the voltage drop between Vin and GND (when using the micro usb power source) is 5V.

I understand your concern about the high power consumption of the wifi chip, but in a realistic scenario the wifi chip will be on&connected for 15-20 seconds per day. I made a lot of work on the software side to keep its usage at minimum. In any other case, the wifi chip will be completely off.

If I understand what you wrote, I should use the dc-dc converter I already own (LM2596S) to handle the power coming from the battery.. but now, what type of battery do you suggest I use? Should I use 4 AA batteries?

I am not able to find the Nodemcu datasheet, so I am not sure what is the correct voltage to apply to Vin.

Thank you again for you help!

MJ

majinjoko:
Please forgive my inaccurancy, I'm quite a newbie on this field.

No problem. And correct me if my language is confusing :wink:

majinjoko:
I understand your concern about the high power consumption of the wifi chip, but in a realistic scenario the wifi chip will be on&connected for 15-20 seconds per day. I made a lot of work on the software side to keep its usage at minimum. In any other case, the wifi chip will be completely off.

It's not a concern so much as a design point. For the reasons I discussed.

majinjoko:
If I understand what you wrote, I should use the dc-dc converter I already own (LM2596S) to handle the power coming from the battery.. but now, what type of battery do you suggest I use? Should I use 4 AA batteries?

Only you can determine if you "should" use your LM2596S. And as for what battery to use -- there are so many variables -- too many for me to make a determination. Plus, probably some calculus. I donno, if you want simple, with ease of replacement, then 4 AA Alkalines might do the trick -- but is there vibration involved -- that could, say, cause them to fly out of the holder? And, how often are you willing to replace them, etc? Then there's power demand... see if you can determine the peak current demand of the NodeMCU Amica [as per your application], then have a look at a datasheet for different batteries, and see if it/they can deliver that peak current. Also power to weight may be a factor, or power to volume, or all three, or ventilation, or ??? Also, if you DO use a DC-to-DC converter, then you'll need to factor in how that changes the current demands from the battery. And what about ambient temperature -- or the effect of a confined space? And primary, or secondary .. and if secondary, then there's the issue of charging the batteries. [But, I'm guessing primary, right?]

In other words, it's a HUGE subject!

majinjoko:
I am not able to find the Nodemcu datasheet, so I am not sure what is the correct voltage to apply to Vin.

Yeah, when I was Googling that, I noticed a lot of confusion on that subject. But, I did some more Googling and it appears that "NodeMCU" is the designation of some form of firmware running on the thing, and the module is an ESP-12e. If that's true, then Google ESP-12e datasheet, and you will, likely, find something pertinent.

Dear all,
I'm aware a long time has passed, but I would like to update this topic with the final approach I chose.

The board is currently being powered with 4 AA batteries (rechargable, even if I have read that not-rechargable would be a better choice).
The dc converter is a "POLOLU-2842 Pololu 3.3V, 500mA Step-Down Voltage Regulator D24V5F3" that has a very low quiescent current (something like nano Ampere).

The board (deep) sleeps for 5 seconds than check the inputs for HIGH levels. The HIGH ref is provided by a pin used as OUTPUT, this way I can use current only for the time required to read the pins.

Last but not least, I have removed/disconnected the onboard dcc converter and usb serial, so that the board, when deepsleep, uses a very low amount of current.

This setup could ensure a good run time on battery. I have made some esteem but I think the best analysis will be done in retrospect: the board and the circuit is up and running now, I will just observe how much time it will take for the batteries to go flat.

Thank you all for you help!
MJ

So how long did it run with 4 AA batteries?

I have a similar project.
Cheers
Bill

h16bill:
So how long did it run with 4 AA batteries?

I have a similar project.
Cheers
Bill

Using the setup described above (with a small difference: the deepsleep last 2 sec, not 5 seconds), I had a very good first run with 4 AA from 29/07/2018 to 03/10/2018.
Then I run into some troubles and I had to change the board. I went for a Lolin which is so much easier to "modify". With that board i got 2 month and half of battery life.

For the record, I ended up with using the main power and a lithium backup battery, with a special circuit to keep the battery charged.