Powering from both VUSB and microUSB

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
kbrenner
Posts: 46
Joined: Mon Jan 20, 2020 8:05 pm

Powering from both VUSB and microUSB

Post by kbrenner » Fri Jan 24, 2020 9:57 pm

What will happen if you have a 5V power supply connected to the VUSB port while the microUSB port is plugged into a computer? Will the Pyboard simply choose a power supply to use or will there be complications?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Powering from both VUSB and microUSB

Post by Roberthh » Sat Jan 25, 2020 8:17 am

The VUSB pin is directly connected to the USB connector. Powering there with 5V is uncritical for the PyBoard, if you stay within the limits, but may affect the computer it's connected to. For powering the Pyboard D, see: https://pybd.io/hw/pybd_sfxw.html

User avatar
MostlyHarmless
Posts: 166
Joined: Thu Nov 21, 2019 6:25 pm
Location: Pennsylvania, USA

Re: Powering from both VUSB and microUSB

Post by MostlyHarmless » Sat Jan 25, 2020 8:39 am

kbrenner wrote:
Fri Jan 24, 2020 9:57 pm
What will happen if you have a 5V power supply connected to the VUSB port while the microUSB port is plugged into a computer? Will the Pyboard simply choose a power supply to use or will there be complications?
I would advise against it.

The +5V is typically produced by a voltage regulator (7805 or similar). These things really don't like reverse bias. In a good design they will have a reverse current protection diode, but who knows what the design quality of your power supply or PC are?

The end result can be catastrophic. I have killed a Garmin GPSmap 60 CSX with a cheap 12V cigarette lighter adapter. The USB input on the GPS apparently had a bit too much capacitance for the "unprotected" voltage regulator in the 12V adapter. So when powering off the engine (and thus the 12V outlet), the voltage regulator in the adapter got fried. The bad part is that when that happens, there is a chance that on next power up they just float the full 12V on the output ... which fried the GPS. That is no fun when it happens half way between Philadelphia and Toronto on a motorcycle. Find the next store, that has a selection of waterproof GPS units, without a GPS ...

Moral of the story: Never connect expensive equipment to cheap power supplies.


Regards, Jan

chrismas9
Posts: 152
Joined: Wed Jun 25, 2014 10:07 am

Re: Powering from both VUSB and microUSB

Post by chrismas9 » Sat Jan 25, 2020 1:24 pm

VUSB feeds VIN through a diode and fuse. The safest thing to do is connect your 5V supply through another diode to VIN. That way the two diodes block any cross feed of power between your power supply and your PC's USB port, but VIN will always get power.

Post Reply