I am developing a circuit which enables me to charge a lithium battery and boost the output voltage up to 5V for a microcontroller. My boost converter is the MT3608, and the charging circuit is the TP4056 board.
Everything is working well, but I would like to disconnect the battery when the USB is connected, in such a way as the boost module doesn’t receive any power supply, and so, the microcontroller would work thanks to the USB port, but not through the boost, in order to reduce the global consumption.
I’m following this schematic, which allow me to select between the USB or battery, but I would like to disconnect the battery when the USB port is connected, and therefore the boost module won’t work.
“USB o Fuente”: It is the USB connector.
“Circuito cargador”: It is a charging circuit like the TP4056 board.
“Circuito aplicacion”: It’s my load, a microcontroller in my case.
“Canal P”: It means a common P-channel MOSFET.
I would really appreciate it if someone could show me a schematic that solves my problem.