Can someone help me with a good / robust / safe design for powering VUSB on a board that could be populated by a Boron, Argon, or Photon2?
I want to be able to supply power to VUSB while simultaneously connecting the USB serial port of the device. This requires avoiding contention between VUSB power and VBUS usb power. I have read through some of the prior posts (see links below), but assuming I didn't miss anything they do not fully resolve my concerns:
First, some nomenclature (because it’s easy to get confused!):
VBUS is used consistently to denote the USB 5V supply (fused on Photon2 and Argon)
VIN is used consistently to denote the voltage downstream of a diode which finally powers the device
VUSB is used consistently to denote the pin on which 5V external power can be applied, but its placement upstream / downstream of the diode is inconsistent:
A) On the Photon and Boron, VUSB is connected downstream of the diode. This means VUSB = VIN and VUSB != VBUS.
Photon:
Boron:
This configuration ensures that any overvoltage on external power applied to VUSB cannot damage our VBUS usb supply. (Furthermore, if we also choose to supply power on VUSB through another diode, we can ensure that the VBUS usb supply cannot fight/damage our VUSB power source). The two can be powered simultaneously without contention.
B) On the Photon2 and Argon, VUSB is connected upstream of the diode. This means that VUSB != VIN and VUSB = VBUS.
Argon:
Photon2:
In this configuration it seems that there is always an unavoidable risk of contention if we supply power to VUSB and to VBUS simultaneously (for example if we wanted to log serial messages while providing external power). The two are hardwired together. Furthermore, it is no longer clear why the diode exists: It doesn’t look like the downstream circuit VIN could rise above VUSB/VBUS, in which case it serves no protective purpose.
The differences between configurations A) and B) make it hard to design a board that is compatible with all Particle feather devices. For example, if we chose to supply power on VUSB through another diode anticipating a Photon or Boron as in A), then if we actually get an Argon or Photon2, VIN is now two diode voltage drops below the supply.
I was hoping configuration B) was a typo, but I checked the detailed schematics and they appear accurate. So my questions are:
Is my analysis above correct, or am I missing something?
What is the purpose of the diode in configuration B)?
In configuration B), I see no way to protect VBUS from overvoltages on VUSB, so I guess I need to ensure this cannot occur(?) One possibility is a fuse + zener, but I worry the fuse might not be fast enough and the zener may still blow especially since I have the risk of a 12V accidental input in my application. Thoughts?
Assuming I successfully clamp VUSB to below say 5.6V, do I still need to worry about small voltage difference contentions between VUSB and VBUS supplies, (eg. 5.6V vs 4.9V)?
You're interested in the Feather form-factor devices, including the Boron, Argon, and Photon 2. Part of the confusion is that the Feather pin VUSB can be either be a 5V output (when powered by Micro USB) or power input with varying maximum input voltage (depending on the device).
The Feather spec requires that VUSB be 5V, but if you aren't using other FeatherWings that require it, it can be 5.5V on most devices, except the Boron, which can go up to 17V.
In order to implement VUSB in this way, there's always a Schottky diode between the 5V power pin on the Micro USB connector and VUSB that only allows power to flow from Micro USB to VUSB. This is to prevent power from flowing into your computer when externally powering the Particle device. It still allows around 4.9V on VUSB when used as a power output when powering by Micro USB. [Edit: see below]
Additionally, on nRF52840 devices (Argon, Boron), there is a direct connection between the Micro USB 5V line and the MCU that is only used to determine when the USB interface should be powered up in the MCU. This is not used to power the MCU.
When powering by the Feather VUSB pin, the diode prevents power from flowing into the USB connector, and the device is powered properly.
When powered by both Micro USB and Feather VUSB, that's when things get trickier. Because 4.9V will be coming out of VUSB because of Micro USB power, you will have two competing power supplies. The solution is either to install another diode on your base board facing the other way, or have a power supply that is not affected by power coming into the output. A number of regulators are designed to handle this without being adversely affected.
The diode is in the wrong place on the Argon block diagram, and this error was replicated on the Photon 2 datasheet. The Boron block diagram is what all three should be.
Thank you so much @rickkas7 for your comments on the intended design (which I agree with entirely) and for your help trying to get the documentation corrected. Unfortunately, I think the ‘corrected’ block diagrams are still erroneous – probably due to confusion between the terms VBUS and VUSB. To reiterate:
VBUS is used consistently to denote the USB 5V supply (fused on Photon2 and Argon)
VIN is used consistently to denote the voltage downstream of a diode which finally powers the device
VUSB is used consistently to denote the pin on which 5V external power can be applied, but its placement upstream / downstream of the diode is inconsistent:
Here is the correct Boron block diagram showing VBUS (the 5V USB power supply) protected from overvoltage on the VUSB pin by the diode:
But here is the (in my view still incorrect) ‘corrected’ Argon/Photon2 block diagram. In this case, the VBUS (the 5V USB power supply) is not protected from overvoltage on the VUSB pin:
I was encouraged that you believe the original Argon/Photon2 block diagrams were incorrect, but if so, then the original/current Argon/Photon2 posted schematics are also incorrect. Here is an extract of the schematic for the Photon2 (below). It is clear that VBUS (the 5V USB power supply) is directly connected to VUSB (via a fuse). The diode D2 is placed downstream and does not appear to serve any purpose.
The same problem is visible in the Argon Schematic. Again VBUS (the 5V USB power supply) is connected directly to VUSB (via a fuse). The diode D4 is placed downstream of this connection and does not appear to serve any purpose.
It seems less likely (but hopefully possible?) that these schematics are erroneous. If they are not, then the original Argon/Photon2 block diagrams did at least reflect the reality of the schematic even if the design does not perform as intended.
Please accept my apologies if I'm missing something obvious, but any help getting this definitively resolved would be much appreciated!
Many thanks!
I believe you are correct in that the block diagrams for Argon and Photon 2 are still wrong. I'll take another look tomorrow and figure out what they should actually be.
The diode was previously in the correct place on the Argon and Photon 2 and I put it back.
The Argon and Photon 2 do not have a blocking diode on VBUS (USB port 5V) so you should not use both Micro USB and VUSB at the same time. VBUS and VUSB are connected together only with a fuse, not with a diode.
The reason for the diode downstream from VBUS/VUSB is to prevent voltage on VBUS/VUSB when powered by LiPo battery (LI+).
Thank you again, @rickkas7. It is good to have a definitive answer even if it means there is a subtle hardware difference in the power supply design between Photon/Boron and Argon/Photon2. I still prefer the Photon/Boron design because it protects VBUS (the 5V USB power supply) from overvoltages from all other sources (VUSB, Li+), not Li+ only as with the Argon/Photon2 design.