Powering Arduino nano with a 12V battery.

Hi!

Can I power an Arduino Nano with a 12V battery via vin?

Also, how long would the 12V battery power it?

Thanks in advance.

Can you safely use 12V? Yes, if you know what you are doing. Can you fry the Nano with 12V? Yes, if you don't know what you're doing.

How long will it last? Somewhere between minutes and months. If I asked you how far my car will travel on petol/gasoline, you would want to know how much fuel the tank holds and how many miles/kilometers to the gallon/litre my car consumes.

Far more details required from you.

You could power it with 12V via Vin but it would be a lot better to add a 5V DC-DC converter and power the Nano via the 5V pin. And as an added bonus the battery would last longer because a DC-DC converter is a lot more efficient than the internal linear regulator.

Steve

Yes you can power via the vin that is what it was designed for. Remember an Arduino a power supply it is NOT. How long will the battery last, it depends on which side of the moon the sun comes up. Without data on the battery my answer is valid. To calculate this you need to know your load, and convert it to amp hours and then divide the battery amp hour capacity by this number. Then depending on the battery chemistry you need to adjust the time down as you cannot get 100% out of the battery and have it survive.

A very real danger is that the obsolete tutorials on the Arduino site and others misleadingly imply that the largely ornamental "barrel jack" and "Vin" connections to the on-board regulator allow a usable source of 5 V power. This is absolutely not the case. It is essentially only for demonstration use of the bare board back in the very beginning of the Arduino project when "9V" transformer-rectifier-capacitor power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

If you are asking this question, it is highly likely that you will wish to connect something else. In which case, the answer is regulated 5 V.

This is because the on-board regulator is essentially capable of powering only the microcontroller itself and no more than a couple of indicator LEDs. The on-board regulator might be able to power a few other things if it had a heatsink, but on the (older) Arduinos, it does not.

Powering via the "barrel jack" or "Vin" connections is asking for trouble. The "5V" pin is not by any means an output pin, if anything a "reference" pin but most certainly the preferred pin to which to supply a regulated 5 V.

A practical power supply for the Nano (or UNO, Pro Mini, Leonardo etc.) is a "phone charger" with a USB output connector for 5 V, generally up to a couple of Amps though you can not feed more than 500 mA through the USB connection.

If you want to power it from 12 V or a car system, you need a 5 V switchmode "buck" regulator to supply the 5 V.