Page 1 of 1

can power be supplied into 5v pin while USB is also attached?

Posted: Sun May 22, 2022 8:23 pm
by hitachii
Hello again,

I have here the schematic for the board here that I've been using, the f401"green pill". based off of this, I am unsure whether I can have the board safely plugged in via USB, while power is being supplied to the 5v pin.

the reason i ask is because the testing that I want to do requires the power to be supplied elsewhere on the PCB. My alternative would be using jumper wires between the MCU on a breadboard, to the pin headers on the PCB.

the 5V power is coming from a 5v voltage regulator, supplied by a 12v power source, if that helps to know.

thank you in advance. I will refrain from plugging anything in until I know :lol:
1-598b44dd4b.jpg
1-598b44dd4b.jpg (65.71 KiB) Viewed 3740 times

Re: can power be supplied into 5v pin while USB is also attached?

Posted: Mon May 23, 2022 1:56 am
by hobbya
Vbus (USB) and 5V are connected together on the board. So you should either power the board via external 5V or via Vbus of the USB. Do not connect both at the same time.

Re: can power be supplied into 5v pin while USB is also attached?

Posted: Mon May 23, 2022 5:12 am
by hitachii
thank you very much!

Re: can power be supplied into 5v pin while USB is also attached?

Posted: Mon May 23, 2022 5:18 am
by ag123
technically it shouldn't be done, but that it still works having both of them connected as both of them are 5v

Re: can power be supplied into 5v pin while USB is also attached?

Posted: Mon May 23, 2022 9:55 am
by hitachii
ag123 wrote: Mon May 23, 2022 5:18 am technically it shouldn't be done, but that it still works having both of them connected as both of them are 5v
my understanding of electrical engineering is still pretty poor. what happens to the voltages in this case? does it stay at 5v where the two power sources intersect?

Re: can power be supplied into 5v pin while USB is also attached?

Posted: Mon May 23, 2022 10:30 am
by ag123
in a normal PC, the 5v USB supply is normally from the SMPS (switch mode power supply), in some cases it comes from batteries e.g. notebooks.
most other power sources are SMPS as well, some don't provide 5v outputs, and they use a linear regulator to remove part of that excess voltage to give you 5v.

Technically, you can consider the different 5v power sources the same as batteries/power sources in parallel.
it would still stay at 5v.

the thing is with SMPS (simplest being a buck converter https://en.wikipedia.org/wiki/Buck_converter), there is a regulation loop. When there are 2 buck converters, maybe it could cause oscillations as both are trying to achieve 5v regulation, but I've not seen this happening in practice.

there is also a catch in that one of the SMPS may be providing much more power than the other, even if both of them outputs 5v.
e.g. if one of them has a tight regulation loop and detects 5v, hence is pretty much not supplying power. Then the other converter is literally powering the whole setup.

Re: can power be supplied into 5v pin while USB is also attached?

Posted: Tue May 24, 2022 3:09 am
by hitachii
Thank you. I've got a few of these same boards on hand in case I ever feel like giving it a try. It's the simple act of soldering the pin headers on a new one that's keeping me from doing it :lol: It would greatly simplify my setup as I currently have a hydra of jumper cables from a breadboard to the PCB!

Re: can power be supplied into 5v pin while USB is also attached?

Posted: Wed Jun 22, 2022 9:41 pm
by sophiadevon189
I have here the schematic for the board here that I've been using, the f401"green pill". based off of this.
I am unsure whether I can have the board safely plugged in via USB, while power is being supplied to the 5v pin.

the reason i ask is because the testing that I want to do requires the power to be supplied elsewhere on the PCB.
My alternative would be using jumper wires between the MCU on a breadboard, to the pin headers on the PCB.

the 5V power is coming from a 5v voltage regulator, supplied by a 12v power source, if that helps to know.