Abstract: This HTML page reviews the voltage supplies available to the Arduino UNO.
Possible Audience: Any enthusiasts who are considering using the Barrel Plug or Vin of the Arduino as the DC power source, or power from external shields
Keywords; Arduino Vin, Voltage Regulator, MOSFET Switch, Arduino Shields
The internal 5 volts required by the Arduino components can come from:
1. The 5 volts supplied by the USB cable used for program development etc,
A mobile phone back up battery may also be used to power the micro-controller via the USB port.
2. An on-board 5 volt regulator that has as its input either (i) the Arduino Vin pin or, (ii) the barrel plug but not both. In the example of DC power from Model Railway Tracks the power to an Arduino NANO is via the Vin pin.
As shown in the circuit below the internal 5 volts required by the Arduino components can come from either the 5 volts supplied by the USB or an on-board 5 volt regulator. The input to the 5 volt regulator can come from the Arduino Vin pin or the barrel plug but not both.
Normally connecting two voltage sources as shown is an absolute NO NO. Any slight difference in the two voltages will cause current to flow from the higher into the lower which could potentially destroy one or both devices. However in this instance both devices are protected against reverse currents. The ouput will be the higher of the two nominal 5 volts.
In practice Vin will be specified such that the source is one or the other.
1. Without any power to the barrel plug or the Arduino Vin pin the 5 volts will come from the USB.
2. With the voltage divider, with equal resistors when Vin is larger than 6.6 volts the comparator switches the MOSFET off and Vin powers the regulator which in turn is the 5 volts for the Arduino. With the protection diode the input to the barrel plug should be greater than 6.6+0.6 = 7.2 volts.
Typical examples show a 9V input to the barrel plug. In the HTML page DC power from Model Railway Tracks the power to the Arduino NANO Vin pin was regulated 8Volts.
The Arduino UNO (and NANO) both have 6 power pins as shown. (on the header there are two further pins to the left not relevant to this discussion.)
Many shields will plug directly into these pins. They may use the 5 or 3.3 volts as the voltage supply for their logic circuits. One example is the ESP32 WiFi shield shown below. (The power pins are the 6 most right pins on the centre 8 pin header)
The more interesting pin is Vin. If there is a voltage on the barrel plug Vin becomes an output from the Arduino and an input to the shield. Alternatively if there is a power source on the shield, Vin is an input to the Arduino and an output from the shield. It cannot be both.
If the shield supplies voltage to Vin this will in turn be the power source for the Arduino. Further this will be the source of the 5 and 3.3 volts at the power pins shown above. With the shield supplying power the barrel plug cannot be used.
Shields often add some flexibility (choice). Consider the Arduino Motor Shield.
The motor shield also plugs into the 6 power pins above. The motor shields also contains a screw terminal for applying power externally. There are two pins for jumping from the external voltage to Vin on the Arduino. This is illustrated below.
If the power jumper pins are left open the motors will be powered from the external voltage source Vcc2. The on board 5V shield components will be powered from the Arduino. (either from the USB or barrel pin)
With the jumper in place, Vcc2 will not only power the motors but it will be the power source for the Arduino (via Vin). On the Arduino the barrel plug should not be used.
With the jumper in place, but with the Vcc2 terminal left open the motors will be powered from the Vin pin. That is they will be powered from the barrel plug.
The Arduino UNO may be powered from either the USB or a 5V internal regulator. Internal circuitry will switch between from the USB to the regulator when the regulator input is nominally greater than 7.2 volts ( 9 volts is often used).
The input to the regulator can come from either the barrel plug OR the Vin pin but not both.
External shields use the Arduino for their power although some shields will also have provision for external power which might be used with some restrictions by the Arduino.