ESp32 Devboard DC Pump

Hello!

Im currently working on a self irrigation system. Using an ESP32 DevBoard, TP4056, 3.7v LiPo battery, and a DC pump.

This works fine, but after using the pump 3 times I get a reset of the code and the ESP reboots. I have attached a 470uf capacitor across the OUT+ / OUT- across the TP4056.

The pump is regulated via a IRLZ34N mosfet.

Can anybody please give me some futher guidance / advice on how to wire it up so that it doesn't get any power dips.

I have a MAX17048 to monitor battery % and its returning the battery is 100% full, so im confident its not a low battery issue.

I have attached the Serial output from when the crash happens:
13:16:28.989 -> Voltage: 4.17
13:16:28.989 -> Charge Percentage: 100.35 %
13:16:39.664 -> Watering Started.
13:16:49.130 -> Watering Started.
13:17:08.194 -> Watering Started.
13:17:08.273 -> ets Jul 29 2019 12:21:46
13:17:08.273 ->
13:17:08.273 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
13:17:08.317 -> configsip: 0, SPIWP:0xee
13:17:08.317 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
13:17:08.317 -> mode:DIO, clock div:1
13:17:08.317 -> load:0x3fff0030,len:4888
13:17:08.317 -> load:0x40078000,len:16516
13:17:08.317 -> load:0x40080400,len:4
13:17:08.317 -> load:0x40080404,len:3476
13:17:08.317 -> entry 0x400805b4

Thank You!

Again the same recurring problem.
It seems that your project lacks the use of snubber.
I can only confirm this if you post a schematic of your project, even if it is done freehand.
Oh, and it would also be good if you posted your code.
To post the code:

You can supply that board with 5V via the 5V input pin or with 3.3V via the 3.3V pin.

Neither input will accept 3.7V

You need to boost your 3.7V to 5V

You will also need a proper driver for the pump.
What are the current and voltage requirements for the pump?

That sounds painful !

Add a Schottky diode (e.g., SS14 or 1N5819) between battery and ESP32 Vcc input to reduce backflow or voltage droop caused by the pump.