Two 5V supplies on my PCB

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?

Simple approach no 1. A blocking diode on the USB side. You get a small voltage drop when powered from USB, but it's neglectable.

Simple approach no 2. A 3-pin header plus jumper, middle pin power to the ESP32, outer pins from the power sources, respectively. Fool proof.

1 Like

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.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.