The most popular development board, Arduino Uno, supports a variety of power supply, divided into two categories: 5V power directly powered by the higher voltage (Low DropOut Regulator, low-dropout linear regulator) after LDO. Amazingly, when the two power sources are connected, the latter is automatically selected boards, without allowing both conflicts.
Complete schematic can be here to see. Since the entire map is relatively large, I come out of the power section painted himself again.
V1
And VBUS
are USB and external power supply; S1
and a S2
connection state for controlling the power of two; D1
is anti-reverse protection diode; U1
and U2
are 5V and 3.3V LDO; U3
is LMV358 low voltage rail to rail op amps, comparators functions effect; R1
and R2
constitute a voltage divider circuit, the external input voltage minus the diode voltage drop as a half-inverting input of op amp; Q1
is a P-channel MOS transistor; VCC
a 5V supply output. (Above terms do not understand your own Baidu.)
Simple analysis: if S1
closed, U1
to the VCC
5V output power amplifier has an inverting input to U2
3.3V output voltage is higher than the positive-phase inverter, the output of operational amplifier 5V, Q1
the gate and the source voltage are equal, non-conductive, regardless of S2
whether the closure, VBUS
will not output current.
If S1
turned off, and the circuit has passed through the VBUS
working power supply is normal, then a similar analysis can be obtained op amp output 0V, Q1
the gate voltage lower than the source voltage of 5V, the MOS tube is turned on, VBUS
through Q1
to VCC
continue to operate normally 5V output circuit.
But only in the case of USB-powered, what will happen when the electrical circuit? Some Internet users also raised this question .
I half understand the Arduino Uno power select circuit that uses as p-FET to disconnect the USBVCC when an external Vin is supplied, but one bit baffles me. If no external supply is connected then at startup what state is the p-FET in? If the p-FET is ON (Vgs -ve) then USBVCC powers the LMV358 op-amp which compares 3v3 to 0V and drags the p-FET gate voltage down and it all works (although the initial p-FET source voltage is floating). But if the p-FET is OFF then the LMV358 has no power, so the p-FET gate voltage is indeterminate, so what happens to the p-FET? It all seems a bit chicken and egg to me.
I do not really understand the Arduino Uno's power supply selection circuit. When the external power is connected, a P-channel MOS tube which disconnect the USB power supply. However, I do not understand. If there is no external power supply, the MOS start what state? If it is turned on, USB power supply to LMV358 compared 3.3V and 0V, the gate of the MOS pulled down, the normal operation circuit (MOS although the initial source voltage is floating). However, if the MOS is off, no power LMV358, the gate voltage of the MOS is undetermined, the MOS happen? It's like the chicken and egg relationship of the same.
The answer is a circuit would still work properly, because the MOS transistor has a parasitic diode . Note that only discrete MOS transistors have parasitic diodes. Direction is a parasitic diode: N pole to the D-channel in the pole S, P channel pole to the S pole of the tube D. Such can be referred to: a substrate electrode connected to the same two directions of arrow S.
Because of this there is a parasitic diode, the MOS power regardless of what is in the state, VCC
the total voltage of 4.3V, allowing U2
output 3.3V, but also allows op amp, then the output of the op amp will be 0V, MOS is turned on, VCC
the output of 5V . This process is completed in a flash.
In general, high (high side) P-channel MOS transistor are connected to the power source, and a drain output. To take advantage of this circuit and the two parasitic diodes reversed, still work very clever.