ESP32 on Batteries - your setup

meneldor
Posts: 75
Joined: Mon Dec 25, 2017 7:28 am

ESP32 on Batteries - your setup

Postby meneldor » Thu Mar 15, 2018 12:51 pm

Hello guys,

I am reading what i've found regarding ESP32 on battery and more i read more confused i get :) I would like to read a comprehensive topic about some successful scenarios of how you did it. May be some pinned topic. ESP32 is the first chip/dev board im using which needs 3.3V and its very hard for me to found a power solution, especially on batteries.

I have this board and today tried to power it with 2xAA batteries using step-up 0.8-3.3V to 3.3V booster. The power led is working but not the board. Tonight ill try to debug why but i gues its brownout detector error :) I connected the booster to the Vin pin of the board without any caps but i'm not sure if this is the problem here. Also i cannot understand from the schematic if the EN pin has to be connected to Vin as i'm bypassing the LDO.
My other option is a 3.7V Lion battery but if use it i must drop 0.4V from it which requires and additional LDO or hacking it with some diod instead.
Please give me some directions, especially if you are using the same board. Or just share your battery setup. ESP32 is widely used iot device and in the same time i cannot find a good blog/tutorial on this topic.

Kazuya91
Posts: 27
Joined: Wed Aug 23, 2017 11:33 am

Re: ESP32 on Batteries - your setup

Postby Kazuya91 » Thu Mar 15, 2018 8:40 pm

You can use LiFePo4 Batterys which are the most comfortable to Power the ESP32. Its just like Plug and Play. No regulators needed. Watch the video "#64 What is the Ideal Battery Technology to Power 3.3V Devices like the ESP8266?" from Andreas Spiess on youtube.

I have to say that your ESP32 Board is not the ideal Board for low power applications with a battery. Your battery wont last long compared to other ESP32 boards. The reason is that you use a board which has a AMS1117 regulator on it. It is known to drain much current. But for the start its ok.

If you want to have a board which doesnt consume that much, you can search a Wemos Lolin32 (not the Lite version). It consumes much less than other similar Development Boards.

meneldor
Posts: 75
Joined: Mon Dec 25, 2017 7:28 am

Re: ESP32 on Batteries - your setup

Postby meneldor » Thu Mar 15, 2018 8:59 pm

Does the 3.3v vin pass through this regulator? Do i need some specific board to charge a LiFePo4 battery?

Kazuya91
Posts: 27
Joined: Wed Aug 23, 2017 11:33 am

Re: ESP32 on Batteries - your setup

Postby Kazuya91 » Thu Mar 15, 2018 9:48 pm

I dont know if it passes the regulator if you use the 3,3V pin for powering the ESP32 because I dont have a board with that regulator. I just know it from other people posting it.

To make it as uncomplicated as possible, just buy a charger which can also charge LiFePo4 Batteries. You cant charge LifePo4 batteries with a charger for NiMH Batteries.

meneldor
Posts: 75
Joined: Mon Dec 25, 2017 7:28 am

Re: ESP32 on Batteries - your setup

Postby meneldor » Sat Mar 17, 2018 6:36 am

Well, i connected an external uart chip and the board is constantly resetting with SW_CPU_RESET. I tried 10uF and 100uF on the converter's output without any luck. There is no Brownout detector message.

Edit:
I tried 470uF cap - the same result. BDO is set to the lowest level. Here is the log:

Code: Select all

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5648
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:13912
entry 0x40078fd8
I (30) boot: ESP-IDF v3.1-dev-439-g37765d00 2nd stage bootloader
I (30) boot: compile time 08:34:59
I (30) boot: Enabling RNG early entropy source...
I (37) boot: SPI Speed      : 40MHz
I (41) boot: SPI Mode       : DIO
I (45) boot: SPI Flash Size : 4MB
I (49) boot: Partition Table:
I (52) boot: ## Label            Usage          Type ST Offset   Length
I (60) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (67) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (75) boot:  2 factory          factory app      00 00 00010000 00100000
I (82) boot:  3 storage          Unknown data     01 82 00180000 00100000
I (90) boot: End of partition table
I (94) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2eab0 (191152) map
I (169) esp_image: segment 1: paddr=0x0003ead8 vaddr=0x3ffb0000 size=0x01538 (  5432) load
I (171) esp_image: segment 2: paddr=0x00040018 vaddr=0x400d0018 size=0xb0b74 (723828) map
0x400d0018: _flash_cache_start at ??:?

I (427) esp_image: segment 3: paddr=0x000f0b94 vaddr=0x3ffb1538 size=0x01db4 (  7604) load
I (430) esp_image: segment 4: paddr=0x000f2950 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at /home/user/esp/esp-idf/components/freertos/./xtensa_vectors.S:1685

I (434) esp_image: segment 5: paddr=0x000f2d58 vaddr=0x40080400 size=0x0fa54 ( 64084) load
I (469) esp_image: segment 6: paddr=0x001027b4 vaddr=0x400c0000 size=0x00064 (   100) load
I (469) esp_image: segment 7: paddr=0x00102820 vaddr=0x50000000 size=0x00008 (     8) load
I (485) boot: Loaded app from partition at offset 0x10000
I (485) boot: Disabling RNG early entropy source...
I (487) cpu_start: Pro cpu up.
I (491) cpu_start: Starting app cpu, entry point is 0x400810c4
0x400810c4: call_start_cpu1 at /home/user/esp/esp-idf/components/esp32/./cpu_start.c:225

I (482) cpu_start: App cpu up.
I (502) heap_init: Initializing. RAM available for dynamic allocation:
I (508) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (514) heap_init: At 3FFBA810 len 000257F0 (149 KiB): DRAM
I (521) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (527) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (533) heap_init: At 4008FE54 len 000101AC (64 KiB): IRAM
I (540) cpu_start: Pro cpu start user code
ets Jun  8 2016 00:22:57


meneldor
Posts: 75
Joined: Mon Dec 25, 2017 7:28 am

Re: ESP32 on Batteries - your setup

Postby meneldor » Sun Mar 18, 2018 12:20 pm

Please guys, i really need help. I tried external power supply - the same SW_CPU_RESET again and again. No BOD message at all. Tried on a second board - the same. Does anyone with Doit esp32 2x18 pin version have any success powering it using the Vin pin? I cant find schematic for this board at all. Im starting to think that there is a pin which should be pulled up.

Archibald
Posts: 110
Joined: Mon Mar 05, 2018 12:44 am

Re: ESP32 on Batteries - your setup

Postby Archibald » Sun Mar 18, 2018 1:16 pm

The Vin pin goes to the input of the low drop-out (LDO) regulator. The drop-out voltage (input to output differential) for that regulator is in the range 1.0V to 1.3V. So the regulator needs a supply to the Vin pin of at least 4.3V, possibly 4.6V. You need to use the 3V3 pin to avoid the regulator, but be careful to check the voltage because that directly powers the ESP-WROOM-32 which has an absolute maximum rating of 3.6V.

EDIT:
There is some information on that circuit board here:
https://github.com/playelek/pinout-doit-32devkitv1
including a link to the board's circuit diagram.

Note it I generally inadvisable to power the board by more than one power source
Last edited by Archibald on Tue Mar 20, 2018 11:40 am, edited 1 time in total.

meneldor
Posts: 75
Joined: Mon Dec 25, 2017 7:28 am

Re: ESP32 on Batteries - your setup

Postby meneldor » Sun Mar 18, 2018 1:54 pm

Thank you sir :) i will test it right now!

meneldor
Posts: 75
Joined: Mon Dec 25, 2017 7:28 am

Re: ESP32 on Batteries - your setup

Postby meneldor » Sun Mar 18, 2018 4:33 pm

Thank you again, Archibald. Everything is working now. Two alkaline AA batteries and booster. I disabled the Brownout detection btw. Gonna test how long the batts will last on 1min deep sleep. The wake actions are BME280, NTP and MQTT.

EDIT:
...aand 45 minutes later test finished LOL. The booster is hot. Alkaline batteries are not the solution i guess :) Im waiting for some LiFePo4 batts for test2 and ultra ldo for test3 with a 3.7v lion battery.

Archibald
Posts: 110
Joined: Mon Mar 05, 2018 12:44 am

Re: ESP32 on Batteries - your setup

Postby Archibald » Sun Mar 18, 2018 6:14 pm

Kazuya91 makes a good point about the AMS1117 regulator wasting current. The datasheet says the quiescent current is typically 5mA, possibly 11mA (when the voltage drop is 1.5V). As you are now using the 3V3 pin, hopefully there will be no wasted current through the regulator, but it's possible there is some back-powering of the regulator. Of course your "booster", the UART bridge and red LED will be wasting some current.

EDIT: I've now seen the edit to your post. Are you able to measure battery current? I understand in deep sleep mode the current should be no more than 150μA. Are you sure it's going into deep sleep mode? I would investigate what is drawing the current before considering alternative powering.
Last edited by Archibald on Tue Mar 20, 2018 11:42 am, edited 1 time in total.

Who is online

Users browsing this forum: No registered users and 373 guests