User Tools

Site Tools


arduino:external-power-supply

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
arduino:external-power-supply [2019/04/06 19:09]
Ilias Iliopoulos [Schematic]
arduino:external-power-supply [2024/02/02 21:47] (current)
Ilias Iliopoulos
Line 1: Line 1:
 ====== Power Arduino Nano with an external power supply ====== ====== Power Arduino Nano with an external power supply ======
 +
 +{{htmlmetatags>​metatag-keywords=(arduino,​ nano, power, external power supply) ​
 +metatag-description=(Power Arduino Nano with an external power supply)
 +}}
  
 ===== Introduction ===== ===== Introduction =====
Line 26: Line 30:
 The Nano module provides another option to be powered through pin ''​Vin''​. According to the specifications,​ Vin can range from 7 to 12V. This range is imposed by the LM1117-5.0 regulator which receives as an input a voltage at least 1.2V higher than its output and delivers current up to a maximum of 800mA. The Nano module provides another option to be powered through pin ''​Vin''​. According to the specifications,​ Vin can range from 7 to 12V. This range is imposed by the LM1117-5.0 regulator which receives as an input a voltage at least 1.2V higher than its output and delivers current up to a maximum of 800mA.
  
-The output of the LM1117-5.0 and the output of the schottky diode are connected together and they power the internal circuitry. Either of them can by itself power the Nano, or even both of them at the same time. The circuit voltage will be the higher of the two sources. The LM1117 and the schottky ​make sure that current from one power source will not enter the otherbecause of the uni-directional nature of both circuits+The output of the LM1117-5.0 and the output of the schottky diode are connected together and they can both power the internal circuitry. Either of them can by itself power the Nano, or even both of them at the same time. The circuit voltage will be the higher of the two sources. The schottky ​diode makes sure that current from the power source ​connected to Vin will not flow through ​the USB port. Unfortunately, the LM1117-5.0 does not present such unidirectional characteristics. Just try powering an Arduino Nano via the USB port and measure with a voltmeter the voltage at Vin. **You will be surprised to find a voltage around 4.2V!** This means that our PC is trying to source current into the external power supply! ​
  
-The pin of Arduino Nano marked as ''​5V''​ is designed to be an **OUTPUT**, powering peripheral circuits such as a real time clock, an SD card reader etc. and not as an Input. The total consumption of the Arduino plus the peripherals should not exceed 800mA.+Well, in "​normal"​ circumstances,​ the power supply connected to Vin should be higher than 7V, so this voltage will block the schottky diode and will power the circuit. Unfortunately,​ there is nothing __normal__ in electronics. We need to anticipate every possible situation and design our circuit accordingly. It is like software design where 90% of the code is written to cope with situations that may never occur. In the electronics design, the bug is identified by its burning smell!!! 
 + 
 +**WARNING:​** 
 +It is typical in new designs and repairs of old circuits to power the Arduino from a power supply that is also used for other purposes. Consider the case where you want to update your Arduino code, in-circuit. You turn off the power supply and connect a USB cable from your PC to the Arduino USB port. Although your intention would be that only the Arduino will power-up, you will find yourselves in a situation where your PC is providing power to all external circuitry that happens to be connected to Vin! A solution to this problem is easy and can be implemented using the method that I describe below. ​   
 +   
 + 
 +Now, let's go to the ''​5V''​ pin. The pin of Arduino Nano marked as ''​5V''​ is designed to be an **OUTPUT**, powering peripheral circuits such as a real time clock, an SD card reader etc. and not as an Input. The total consumption of the Arduino plus the peripherals should not exceed 800mA.
  
 An opposing argument would come from the Documentation section of the [[https://​store.arduino.cc/​arduino-nano|official Arduino web site]]: ​ An opposing argument would come from the Documentation section of the [[https://​store.arduino.cc/​arduino-nano|official Arduino web site]]: ​
Line 34: Line 44:
 <​file>​ <​file>​
   Power   Power
-  The Arduino Nano can be powered via the Mini-B USB connection, 6-20V unregulated external power supply (pin 30), or 5V regulated external power supply (pin 27). The power source is automatically selected to the highest voltage source. ​+  The Arduino Nano can be powered via the Mini-B USB connection, ​ 
 +  ​6-20V unregulated external power supply (pin 30), or 5V regulated ​ 
 +  ​external power supply (pin 27).  
 +  ​The power source is automatically selected to the highest voltage source. ​
 </​file>​ </​file>​
  
Line 52: Line 65:
  
 In my projects with an Arduino Nano, I always include a 1N5817 diode and use it exclusively for powering the Nano module. All other devices are powered directly by the external power supply, as shown in the schematic. This provides the capability to separate the power feeds and use bypass capacitors at each point of the circuit where they are required. In my projects with an Arduino Nano, I always include a 1N5817 diode and use it exclusively for powering the Nano module. All other devices are powered directly by the external power supply, as shown in the schematic. This provides the capability to separate the power feeds and use bypass capacitors at each point of the circuit where they are required.
 +
 +Remembering also the problem in back-powering circuits from USB to Vin that was discussed above, if we wish to power our circuit through Vin, we can also use a diode at the point of entry to Vin. This will ensure that current will never flow from our Arduino to other circuits. Any diode of the 1N400x series will do, provided that you have 0.7V to spare, otherwise a 1N5817 will do the job. 
  
 ===== Can I use it for Arduino UNO? ===== ===== Can I use it for Arduino UNO? =====
Line 62: Line 77:
  
 My personal view on the subject is that I would never waste an UNO to operate as a controller somewhere inside a closet. The UNO board is suited mostly for development activities. If you want a pure controller board having the exact same functionality as the UNO, with the same ATmega328p chip but in smaller size and with smaller price, go with a Nano. My personal view on the subject is that I would never waste an UNO to operate as a controller somewhere inside a closet. The UNO board is suited mostly for development activities. If you want a pure controller board having the exact same functionality as the UNO, with the same ATmega328p chip but in smaller size and with smaller price, go with a Nano.
 +
 +~~DISQUS~~
arduino/external-power-supply.1554566959.txt.gz · Last modified: 2019/04/06 19:09 by Ilias Iliopoulos