Temporarily switching power sources

Hi,

I am new to Arduino and this may be a simple question. I am using an Arduino Nano and I want to run Arduino code solely off of the USB. However, this USB would not be connected to my PC. Is it possible to temporarily use the Vin pin to power the Arduino as I make the transfer to an alternative 5V power source that isn't my computer? I'm not sure if this is possible.

If the voltage applied to VIN pin is between 7 and 10 volts.

So when I have a USB and Vin pin connection at the same time, is there a specific way to disconnect the Vin pin so that when it is disconnected, the Arduino will continue to run via USB?

Where do you connect the alternate 5V source?

Just a wall adapter. Outputs 5V at 2.4A

Where do you connect it on the Nano?

The 5V would power the Nano via USB

Connect a 7 to 10 volt source + (positive) wire to the VIN pin, connect the 7 to 10 volt - (negative) wire to Arduino GND pin. Turn the 7 to 10V source ON.
Disconnect the 5V source from USB socket, Arduino should stay ON, connect other 5V source to USB socket, then disconnect the 7 to 10V source from VIN and GND, Arduino should remain running.
What do you plan to use for your 7 to 10V source?

9V battery

A 9V battery cannot supply much current. What all is connected to the Nano?

I am looking to power just a 16x2 LCD display module. What do you recommend I use for a 7-10V source?

In that case you may be OK, just do the 5V swap over quickly so the Nano's voltage regulator doesn't have time to overheat.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.