logo elektroda
logo elektroda
X
logo elektroda

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

Dawidixxx 2175 20
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18355924
    Dawidixxx
    Level 7  
    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  
    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.
  • ADVERTISEMENT
  • #3 18355961
    Dawidixxx
    Level 7  
    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
    khoam
    Level 42  
    Dawidixxx wrote:
    And maybe there is information somewhere that the chip will not damage at 2.5V?
    .
    It will not damage itself. It can reboot and if the voltage goes lower it will shut down.

    Dawidixxx wrote:
    they cut the voltage at ~2.5V however, this is half as low as the minimum datasheet note states (3V-3.6V)
    .
    The datasheet note for the ESP8266 states: 2.5V ~ 3.6V.

    Dawidixxx wrote:
    I could use the module with esp8266ex

    You already have :) .

    tos18 wrote:
    In the module you have an ADC - you can use it to measure the battery voltage
    .
    Provided that this ADC is calibrated. The characteristics of this ADC in the ESP8266 are highly non-linear.

    Dawidixxx wrote:
    if I am not mistaken by enabling the deep sleep function permanently (for manual reset),the RTC clock module continues to operate
    .
    Yes.
  • Helpful post
    #5 18355975
    tos18
    Level 42  
    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).
  • #6 18355994
    Dawidixxx
    Level 7  
    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
    khoam
    Level 42  
    Dawidixxx wrote:
    Very important information, I would be happy to read the recommended book on the ESP8266 module, supplementing the information on resetting, disabling.
    .
    There is a link in my footer to a post with Kolban's book for ESP8266 attached. Well worth a browse.

    As for the battery voltage measurement circuit itself, there is an interesting project at the link below. It is better to measure this voltage via the ADC in the ESP at half the battery voltage.
    https://github.com/hallard/Battery-Voltage-Measure

    Added after 28 [minutes]: .

    Dawidixxx wrote:
    The point is that I don't see this note on the boards I bought, unless this is another thing I don't understand and the EX add-on doesn't introduce the lower power option, just the esp8266 version itself.

    Here you have an explanation :)
    http://esp8266.net/
  • ADVERTISEMENT
  • Helpful post
    #8 18356134
    Anonymous
    Level 1  
  • Helpful post
    #9 18356382
    khoam
    Level 42  
    Jarzabek666 wrote:
    Just don't forget that the ADC range is up to 1V. So the divider would have to be quite a bit bigger...
    .
    Actually in the "bare" ESP8266EX this will be the case and you have to be careful not to exceed the 1V value. In modules like Wemos or NodeMCU there is already an "internal" divider and then the range is up to 3V3.
  • Helpful post
    #10 18356402
    tos18
    Level 42  
    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  
  • #12 18356969
    Dawidixxx
    Level 7  
    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  
  • #14 18357282
    khoam
    Level 42  
    Jarzabek666 wrote:
    But on the other hand, I don't know why you bother with this if esp8266 has a VCC reading. bother with it since the esp8266 has a VCC voltage readout. see command ESP.getVcc()...
    .
    What if it doesn't manage to read the voltage with this method? ;) This is already behind the LDO.
  • Helpful post
    #15 18357327
    Anonymous
    Level 1  
  • #16 18357346
    khoam
    Level 42  
    Whatever the combination, measuring the voltage directly at its source, i.e. the battery, is the safest way. In this way, you may also be tempted to measure the drop in this voltage as a function of time, i.e. to roughly determine the quality of the battery.
  • ADVERTISEMENT
  • Helpful post
    #17 18357429
    TvWidget
    Level 38  
    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  
    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  
    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
    khoam
    Level 42  
    Dawidixxx wrote:
    Ps. I remember about full sleep, i.e. on maximum sleep, the circuit 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
    .
    The RTC and some of the memory associated with it works, but if you use ESP.deepSleep(0) then the RTC itself will not wake up the chip. According to the documentation:

    To put the ESP8266 in deep sleep mode, use ESP.deepSleep(uS) and pass as argument sleep time in microseconds. GPIO 16 must be connected to reset (RST) pin so the ESP8266 is able to wake up. .

    Specifying a value of 0 in ESP.deepSleep() will result in this being treated as 'infinite' time and the chip can only be woken up by reset. This is explained in detail at the following link:
    https://diyprojects.io/esp8266-deep-sleep-mode-test-wake-pir-motion-detector/

    The attached manufacturer's document describes the sleep modes in detail. The examples given are based on ESP-IDF commands, but you can also use them with Arduino HAL.

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.
Summary generated by the language model.
ADVERTISEMENT