Understanding the Uno's USB Isolation Circuit

UNTEngineer:

dhenry:
It detects the presence of Vin and switches power supplies: U1A is a comparator. It takes Vin, divides it by 2 and compares it to 3.3v. If Vin / 2 is greater than 3.3v (aka Vin > 6.6v), U1A outputs 1 and turns off T1, which isolates USBVcc from U2. So U2 is powered by +5v (which hopefully is powered by Vin at this point).

If Vin / 2 is less than 3.3v (aka Vin < 6.6v), U1A outputs 0 and turns on T1, which switches in USBVcc.

So 6.6v is the cut off point for Vin to power the device.

They could have done a better job around U1A.

But what if my Vin is a regulated +5V? And why are they comparing the Vin with 3.3V?

Vin is an 'official' shield pin name for the 7-12vdc input for external DC power that which then only feeds the on-board +5vdc voltage regulator and the resistor divider feeding the comparator opamp. Vin is the same as the voltage coming from the external DC power connector except for a series polarity protection diode added between the connector and the Vin pin. A regulated +5vdc should not be wired to the Vin pin because that would be too low a voltage to feed to the on-board +5vdc output voltage regulator. If you have an external regulated +5vdc power supply you would wire it to the board via the shield 5V pin and ground pins (but you then have the non-isloation situation with USB power we already talked about). The 3.3vdc is used as a reference switching voltage for the comparator just because it's available and allows them to use equal size resistors for the voltage divider.

Lefty