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

All about boards manufactured by ST
Post Reply
hitachii
Posts: 22
Joined: Sat Jan 29, 2022 8:59 pm

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

Post 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 3505 times
hobbya
Posts: 49
Joined: Thu Dec 19, 2019 3:27 pm
Answers: 1

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

Post 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.
hitachii
Posts: 22
Joined: Sat Jan 29, 2022 8:59 pm

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

Post by hitachii »

thank you very much!
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

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

Post by ag123 »

technically it shouldn't be done, but that it still works having both of them connected as both of them are 5v
hitachii
Posts: 22
Joined: Sat Jan 29, 2022 8:59 pm

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

Post 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?
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

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

Post 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.
hitachii
Posts: 22
Joined: Sat Jan 29, 2022 8:59 pm

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

Post 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!
sophiadevon189
Posts: 1
Joined: Wed Jun 22, 2022 9:39 pm

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

Post 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.
Post Reply

Return to “STM boards (Discovery, Eval, Nucleo, ...)”