2022-12-16 07:55 AM
The setup currently is a connection to a lithium cell and the other is to a solar charger output.
2022-12-16 10:03 AM
Use two Schottky diodes to pass the higher of 2 voltages.
2022-12-16 10:28 AM
Thank you, any idea where to connect the two different sources on the actual STM32 board ?
2022-12-16 10:31 AM
For run-and-charge something more sophisticated might be a better option
https://www.adafruit.com/product/390
https://www.adafruit.com/product/4755
2022-12-16 12:26 PM
https://stm32-base.org/assets/pdf/boards/original-schematic-STM32F103C8T6-Blue_Pill.pdf
The circuit doesn't really lend itself to power injection, especially across broad voltage ranges.
The 5V would be the obvious place for things of sufficient voltage to be above the regulator drop-out (0.22V) and the diode drop. Problem here is that it's not isolated from the power on the USB connector, and I'm expecting you still want to keep programming the board.
You could cut the trace on the USB power line, or be sure to disconnect the other supplies before use.
For lower voltages you could use the 3.3V input, the regulator should disengage absent a 5V supply. In the 3.7 to 4.2V range I'd probably just take the diode drop to be in the usable region for the STM32F1