cancel
Showing results for 
Search instead for 
Did you mean: 

How do I connect the STM32blue pill to two independent power sources?

KSaye.1
Associate

The setup currently is a connection to a lithium cell and the other is to a solar charger output.

4 REPLIES 4
gbm
Lead III

Use two Schottky diodes to pass the higher of 2 voltages.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

Thank you, any idea where to connect the two different sources on the actual STM32 board ?

0693W00000WLDTQQA5.jpg

For run-and-charge something more sophisticated might be a better option

https://www.adafruit.com/product/390

https://www.adafruit.com/product/4755

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..