Power path schematic check (ESP32 + Li-ion + USB)

Hello,

I would like to confirm if my power schematic is correct before ordering the PCB.

Goal:

Power an ESP32 from either:

a 3.7V Li-ion battery

or USB 5V

while allowing the battery to charge when USB is connected.

Design summary:

TP4056 Li-ion charger module

Schottky diode from V_USB to V_SYS

P-MOSFET (source = V_BAT, drain = V_SYS, gate = V_USB) for automatic battery switching

100k gate-to-GND and 100k gate-to-source resistors

V_SYS goes through a switch, then into a boost converter (3.7V β†’ 5V)

Boost output powers the ESP32

When USB is present β†’ system powered by USB

When USB is absent β†’ system powered by battery

Does this power path look correct and safe for an ESP32?

The labels called " MESBATT" is connected to a GPIOB on the esp32 for get the % of the battery on my tft screen

  • Please make it easy on us old folks, redraw the schematic without nets.
    Use physical lines, and use symbols that are the right way around.

  • Inputs on the left, outputs on the right.

:old_man:

I think this is what you want

Complete thread is at
https://forum.arduino.cc/t/at-last-18650-charge-boost-module-with-load-sharing/1164462/5

Hint: Schematics follow normal reading patterns, top to bottom, left to right, in on the left out on the right. Positive top, negative bottom. This puts the signal flow basically left to right.

Your schematic is ok but a little more difficult to follow. @LarryD describes the best way to draw the schematic, much less prone to errors. @sonofcy gives you a good solution.

As a volunteer, I am not going to spend time putting your diagram together. Also, this is what you want, but is it what you actually did?

yeah ur schematic is more easy and better that mine, i will take it ,

ty

  • Do you see that @sonofcy schematic is easy to understand ? :wink:

yep :disappointed_face:

Why don't you use an ESP32 with battery connector and buil-in charger.
The XIAO ESP32-C3 is such an example.
Solder the battery wires on and plug in USB, that's it.
Leo..