I am building a power supply system which is powered by a solar battery whose voltage is regulated to 5V. It also has an ESP32 chip for power monitoring.
The micro- USB port for the ESP 32 can feed 5V to power it.
I would like to be able to safely switch between these two 5V supplies. The micro- USB port is primarily for powering the ESP 32 when I want to upload my code but the whole system will be powered by the solar battery which is able to supply the 5V.
How do I configure these two 5V supplies on my PCB so that they don't blow it up?
Option 3
Make a USB cable with the +5V wire disconnected so you have ground and data but no power, which you don't need as the ESP32 is already powered.