I'm building a custom PCB, which mounts an ESP32 development board, by AZ Delivery.
The PCB should be powered through a LiPo battery.
As reported here, the 5V pin can be used also to power the board itself, when the input is between 5V and 12V.
Having said that I'm not an engineer but only an electronic beginner, I designed the PCB in attachment: here the LiPo battery (3.7V) is connected to a Pololu Step-Up switcher, which increases the voltage from 3.7 to 5V; then, the 5V OUTPUT pin of the switcher is connected to the ESP32 5V pin, to power it.
Now, the possible problem I see in this circuit, is when I connect the ESP32 to the USB cable, to upload some sketch: in this case I would expect that the 5V pin on ESP32 will have 2 powers: one in input (from the switcher OUTPUT pin) the other in output (feeded by the USB cable).
In my previous works with ARDUINO I solved the problem putting a Skotchy diode between the ESP32 5V pin and the switcher OUT pin, to prevent the reverse current to reach (and possibly damage) the switcher and the Lipo.
This solution worked for me (and ARDUINO boards), but I do not know if I was simply lucky.
Please, can you confirm this simple schema works properly? Do you have some advice about this?
Note that the LiPo must be connected to the circuit, as several components (not in the schema) are powered by this, and I need the USB cable connected for debug reasons.
Thanks a lot,