logo elektroda
logo elektroda
X
logo elektroda

ESP8266 (ESP-07) Power Management with AA Batteries and BMS Chip Integration

Dawidixxx 3192 20
Best answers

Can an ESP8266 ESP-07 running from AA batteries safely keep operating down to 2.5 V, or should I add a cutoff circuit around 3 V to protect it?

You do not need a 3 V cutoff to protect the ESP8266; the chip is specified for about 2.5 V to 3.6 V, and if the voltage drops lower it may reset and then shut down rather than damage itself [#18355965][#18357571] For a battery-powered design, measure the battery with the ESP’s ADC through a voltage divider and handle the low-battery decision in software, or switch the power off with a GPIO [#18355953] On a bare ESP-07/ESP8266 the ADC input range is only up to 1 V and there is no built-in divider, so the divider must scale the battery voltage accordingly; NodeMCU/Wemos boards already include that divider [#18356134][#18356382][#18356402] If you use `ESP.deepSleep(0)`, the RTC state remains, but the chip will not wake itself and must be reset to resume [#18357641]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18355924
    Dawidixxx
    Level 7  
    Posts: 79
    Rate: 36
    Hello!
    Popular situation, I would like to make an IoT chip based on esp8266 (ESP-07 must be the one)
    I would like to power it from AA batteries of 3, standard configuration with ldo MCP1700.
    There are many projects like this, but I have not found enough information on what to do when the batteries run down.

    The common answer? When the chip measures that there is a min of 3v on the battery, it goes to sleep permanently.
    This is a nice solution, but not enough for me, so I wanted to use a BMS chip from 18650 cells (along with sleep at 3v)
    they cut off the voltage at ~2.5V however this is half less than the minimum spec note states (3V-3.6V)
    I think the internal RTC counter itself can handle this 2.5V, until cut off by the BMS, however the point is that this is supposed to be part of an engineering job,
    so you know, everything has to be proven to work :/ Is there any cheap circuit from Ali that will cut my voltage at 3V?
    Or is there information somewhere that the circuit won't fail at 2.5V?

    I'm really asking for your help, as I really liked these microcontrollers, and would like to build my circuits with the confidence that they will all work ;) .

    (Eventually I could use a module from esp8266ex, but for some reasons I don't want to use them yet)

    Best regards David!
  • ADVERTISEMENT
  • Helpful post
    #2 18355953
    tos18
    Level 42  
    Posts: 7014
    Help: 1089
    Rate: 1810
    You have an ADC in the module - you can use it to measure the battery voltage (you will need a divider)- the rest in the software. You can even cut the power with one of the outputs.
  • #3 18355961
    Dawidixxx
    Level 7  
    Posts: 79
    Rate: 36
    That's right, but if I'm not mistaken, by enabling the deep sleep function permanently (for manual reset), the RTC clock module continues to work
    which means that the board still needs a 3V power supply after all, and as I mentioned it may not work :/
  • Helpful post
    #4 18355965
    Anonymous
    Level 1  
  • Helpful post
    #5 18355975
    tos18
    Level 42  
    Posts: 7014
    Help: 1089
    Rate: 1810
    khoam wrote:
    Provided this ADC is calibrated. The characteristics of this ADC in the ESP8266 are strongly non-linear.


    Fortunately, we don't need a super accurate measurement. It's just a matter of finding out that the battery voltage has reached the value at which you need to go to sleep (light the [LOW BATTERY] lamp, etc).
  • ADVERTISEMENT
  • #6 18355994
    Dawidixxx
    Level 7  
    Posts: 79
    Rate: 36
    Hello there
    General khoam
    Thank you for writing back, as always you are very helpful :) .
    Please forgive me, but I had to.

    Thank you also tos18 for your pertinent comments :) .

    Very important information, I would love to read the recommended book on the ESP8266 module, supplementing the information on resetting, disabling.

    Well I read the catalogue note (probably the latest one) and found out about the newer versions with the note EX (from 2.5V) however I thought that the older versions e.g. ESP-07 -01 do not have it
    I purchased a couple of ESP-07's from Ali because of the antenna, which I also want to do some research on as to range and power taken.
    The thing is, I don't see this note on the boards I bought, unless it's another thing I don't understand and the EX add-on doesn't introduce a lower power option, just the esp8266 version itself.
    Well I wanted to use the ESP-05 module with the ex annotation as a design enhancement later.

    Yes, I have read that I need to calibrate the measurement obtained from the voltage divider (I need to read up on the built-in resistor)

    I apologise for not being very accurate, however I have over a year to write my thesis and I am doing research,
    I am very pleased with the interest about this module on the forum (strangely the professors at my university have only heard a little about it 0.o
    for that we have stm32f429 boards that people can't grasp, and the detail that we won't even use a quarter of their power :/)
  • Helpful post
    #7 18356014
    Anonymous
    Level 1  
  • Helpful post
    #8 18356134
    Anonymous
    Level 1  
  • Helpful post
    #9 18356382
    Anonymous
    Level 1  
  • Helpful post
    #10 18356402
    tos18
    Level 42  
    Posts: 7014
    Help: 1089
    Rate: 1810
    There is no divider in the esp07 so you have to be careful as with the bare 8266.
  • Helpful post
    #11 18356445
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #12 18356969
    Dawidixxx
    Level 7  
    Posts: 79
    Rate: 36
    Jarzabek666 Are you proposing that the maximum voltage should be 0.8V?
    well i tested the values 200Kohm/45Kohm (for low current, maybe i will give even more)
    Is this for safety reasons or did I misunderstand? :) (since I could set 4.5V as 1V, the excess will be treated as 100% if the pin tolerates 3.3V)
  • #13 18357069
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #14 18357282
    Anonymous
    Level 1  
  • Helpful post
    #15 18357327
    Anonymous
    Level 1  
  • #16 18357346
    Anonymous
    Level 1  
  • Helpful post
    #17 18357429
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    Dawidixxx wrote:
    There are many such projects, but I have not found enough information on what to do when the batteries run down.
    .
    Usually the batteries are replaced with new ones. For what reason do you want to cut the power ?
  • #18 18357507
    Dawidixxx
    Level 7  
    Posts: 79
    Rate: 36
    TvWidget I didn't know what could happen if the batteries discharge to a very low level, that the esp8266 gets below 2.5V
    As I mentioned this is an issue for an engineering paper and everything has to be right, I thought the chip could break down.
    I found out here that the chip has protection, i.e. it will first reset, then shut down.

    Initially I wanted to add a BMS with 18650 (cut off at 2.5V), given the LDO dropout, maybe before the chip itself?
    However, this is where two issues remain, either I add this BMS, just need to see how much current it draws during deep sleep operation,
    and if I don't use protection, I need to find information from the manufacturer or in some book that the circuit will react e.g. to 2V 1V ~0 and won't damage itself
    I need to read the datasheet note again carefully.
    Ps. I remember about full sleep, i.e. on maximum sleep, the chip will wake up after ~3.5h - the internal RTC clock is running
    With ESP.deepSleep(0) does it still work? it shouldn't in my opinion


    Jarzabek666 You have provided
    Jarzabek666 wrote:
    So if it powers the LDO with 3V then the esp gets 1.8V ...
    .
    That's quite a drop, in the catalogue note I saw ~ 178mV
    I checked it myself a while ago and at 3V input I got 2.5V at 70mA (motor)
    (I didn't have such a large capacitor, I used a smaller one, the kit is already coming to me)
    Did I miss a pattern?

    Thank you all again very much for your interest :) .
  • #19 18357563
    Anonymous
    Level 1  
  • #20 18357571
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    Too low a voltage will not damage the circuit. You do not need to worry about this. You should, however, consider whether frequent resets will cause any problems due to the functionality of the device.
  • #21 18357641
    Anonymous
    Level 1  

Topic summary

✨ The discussion revolves around powering an ESP8266 (ESP-07) module using AA batteries and integrating a Battery Management System (BMS) chip. The user seeks to manage battery voltage effectively, particularly when the batteries deplete. Common advice suggests using the module's ADC to measure battery voltage, but concerns arise regarding the minimum operating voltage of the ESP8266, which is typically 3V. The integration of a BMS that cuts off at 2.5V is debated, as it may not align with the ESP8266's specifications. Suggestions include using a voltage divider for ADC readings, ensuring the LDO dropout is considered, and exploring the use of deep sleep modes to conserve power. The importance of measuring voltage directly at the battery source is emphasized, along with the potential risks of frequent resets due to low voltage.
Generated by the language model.

FAQ

TL;DR: ESP8266EX runs at 2.5–3.6 V; "It will not damage itself" if AA voltage dips. Measure battery via ADC with calibration, then use deep sleep; RTC continues running. [Elektroda, khoam, post #18355965]

Why it matters: For makers powering ESP-07 from AA cells, this FAQ shows how to set safe low-battery behavior without extra BMS chips.

Quick Facts

Will the ESP-07 get damaged if voltage falls below 2.5 V?

No. The ESP8266 will typically reboot, and if voltage drops further it shuts down. “It will not damage itself.” Design your firmware to handle brownouts cleanly. Add logic to enter deep sleep when the measured pack voltage hits your threshold. [Elektroda, khoam, post #18355965]

What cutoff voltage should I aim for with three AA cells?

A common practice is to enter permanent deep sleep around 3.0 V pack voltage. That preserves the batteries and prevents brownout loops. Implement the threshold in software using the ADC and a divider, as hardware BMS isn’t strictly required for chip safety. [Elektroda, Dawidixxx, post #18355924]

How do I measure AA battery voltage on ESP-07 safely?

Use the on‑chip ADC with a resistor divider sized so the ADC pin never exceeds 1.0 V at the highest expected battery voltage. ESP-07 lacks an internal divider, so wire an external divider to TOUT and calibrate in software. [Elektroda, khoam, post #18356382]

Is the ESP8266 ADC linear and should I calibrate readings?

Calibrate it. The ESP8266 ADC is notably non‑linear, so map readings against known voltages before using thresholds. A simple calibration table or fit is enough for low‑battery detection. “The characteristics of this ADC in the ESP8266 are highly non‑linear.” [Elektroda, khoam, post #18355965]

Can the ESP8266 cut its own power when the battery is low?

Yes. Measure the pack with the ADC, then use a GPIO to drive a P‑MOSFET or load switch that disconnects the supply. You can also just enter deep sleep and rely on minimal current draw, depending on your design goals. [Elektroda, tos18, post #18355953]

Is ESP.getVcc enough to monitor batteries behind an LDO?

No. ESP.getVcc measures VCC after your regulator, so it doesn’t show true battery voltage. If you want accurate pack readings and thresholds, measure at the battery with a divider into TOUT. [Elektroda, khoam, post #18357282]

Does the ESP-07 include an internal ADC divider like NodeMCU/Wemos?

No. ESP-07 has no internal divider, so treat it like a bare ESP8266EX. Keep the ADC pin at or below 1.0 V using an external resistor divider. [Elektroda, tos18, post #18356402]

How should I size the divider for fresh AA cells?

Design for fresh cells up to about 1.6–1.7 V each (≈5.4 V for three). Choose resistor values so 5.4 V maps to 0.8–1.0 V at TOUT, giving headroom and full-scale resolution. Verify with a DMM and adjust in firmware. [Elektroda, Anonymous, post #18357069]

What happens if the ADC input exceeds 1.0 V on ESP-07?

The ADC reading saturates near its maximum code (≈1024), and you lose measurement accuracy. Ensure your divider always keeps the TOUT voltage within range across operating and fresh-battery conditions. [Elektroda, Anonymous, post #18356445]

How do I implement a low-battery cutoff without a BMS?

Three steps:
  1. Add a resistor divider from the battery to TOUT and read it in firmware.
  2. Compare the calibrated reading to your cutoff threshold.
  3. Drive a GPIO to open a P‑MOSFET/load switch or enter deep sleep. This approach avoids extra BMS hardware. [Elektroda, tos18, post #18355953]

What exactly happens in deep sleep, and how do I wake from “infinite” sleep?

In deep sleep the RTC and its memory keep running. ESP.deepSleep(0) requests an “infinite” sleep; only reset wakes the chip. To wake automatically after a set time, connect GPIO16 to RST and pass a microsecond interval. “Specifying a value of 0 ... ‘infinite’ time.” [Elektroda, khoam, post #18357641]

Do I need a BMS to protect the ESP8266 from undervoltage?

Not for the chip itself. Low voltage won’t damage it, but repeated brownout resets can affect device behavior. Prefer clean sleeps or a controlled cutoff using a GPIO and switch if your application requires stability. [Elektroda, TvWidget, post #18357571]

Why measure battery voltage at the source instead of after the regulator?

Measuring at the battery is safest and more informative. You can observe the voltage drop over time and infer cell quality. Post‑regulator readings hide battery sag and regulator dropout effects. [Elektroda, khoam, post #18357346]

Any recommended references for ESP8266 power and battery measurement?

See Kolban’s ESP8266 book for fundamentals, and the Battery‑Voltage‑Measure project for a practical divider design. Both are linked in the discussion and help you implement robust monitoring. [Elektroda, khoam, post #18356014]
Generated by the language model.
ADVERTISEMENT