The safest and most efficient way to power an Arduino Nano depends entirely on your environment. For bench testing, use the Mini-B USB port (5V, up to 500mA). For permanent embedded projects powered by wall adapters or battery packs, supply 7V–12V to the VIN pin, or bypass the inefficient onboard linear regulator entirely by feeding a clean, regulated 5V directly into the 5V pin (max 500mA). Never exceed 12V on the VIN pin, and never feed voltage into the 3.3V pin, or you will permanently destroy the microcontroller.
The Three Ways to Power an Arduino Nano
The official Arduino Nano documentation outlines multiple power paths, but they are not created equal. The onboard voltage regulator (typically an LM1117 or AMS1117-5.0 in a SOT-223 package) is a linear regulator, meaning it burns excess voltage as heat. Understanding these thermal limits is the difference between a node that runs for years and one that resets randomly in an enclosure.
| Input Method | Acceptable Voltage | Max Continuous Current | Regulator Dissipation | Best Use Case |
|---|---|---|---|---|
| USB Mini-B | 5.0V (4.75V - 5.25V) | 500mA (USB 2.0 spec) | Bypassed (Diode protected) | Bench testing, serial debugging |
| VIN Pin | 7V - 12V (9V nominal) | ~150mA (at 9V in) | High (Drops to 5V as heat) | Wall adapters, 9V batteries (low draw) |
| 5V Pin | 5.0V (4.8V - 5.2V) | 500mA (Trace limited) | None (Direct to ATmega VCC) | Battery projects, buck converters |
| 3.3V Pin | 3.3V (Output only!) | ~50mA (LDO limited) | N/A (Do not use as input) | Powering low-draw I2C sensors |
Parts List & Pin Mapping for a Low-Power Sensor Node
To build a robust, battery-powered Nano node that avoids the thermal waste of the VIN pin, we will use a single 18650 lithium-ion cell stepped up to exactly 5.0V, feeding directly into the 5V pin. This setup achieves >85% efficiency compared to the ~55% efficiency of running a 9V battery into VIN.
Bill of Materials
- Microcontroller: Arduino Nano v3 (ATmega328P variant, CH340G USB-UART clone or FT232RL official)
- Battery: 18650 Li-ion cell (Samsung 30Q 3000mAh or Molicel P26A)
- Charger: TP4056 USB-C charging module (with DW01A over-discharge protection)
- Boost Converter: MT3608 adjustable step-up module (manually tuned to 5.0V output)
- Sensor (Optional): BME280 I2C environmental sensor (3.3V logic)
Pin Mapping Table
| Nano Pin | Connected To | Function / Notes |
|---|---|---|
| 5V | MT3608 VOUT+ | Main 5V power rail (Bypasses onboard LDO) |
| GND | MT3608 VOUT- / TP4056 B- | Common ground reference |
| 3.3V | BME280 VCC | Powers 3.3V I2C sensor (Draws <1mA) |
| A4 (SDA) | BME280 SDA | I2C Data line |
| A5 (SCL) | BME280 SCL | I2C Clock line |
| D2 (INT0) | Pushbutton / RTC INT | Hardware interrupt to wake from sleep |
| D13 | Onboard LED | Status indicator (Disabled in sleep code) |
Complete Compilable Sleep & Monitor Code
This code targets the Arduino Nano v3 (ATmega328P). It reads the battery voltage without requiring an external voltage divider by using the ATmega's internal 1.1V reference, checks for brown-out conditions, and puts the board into deep sleep to maximize 18650 battery life.
#include <avr/sleep.h>
#include <avr/power.h>
#include <avr/wdt.h>
#include <Wire.h>
// --- PIN DEFINITIONS ---
const int WAKE_PIN = 2; // Hardware interrupt 0 (INT0)
const int LED_PIN = 13; // Onboard status LED
// --- ERROR HANDLING & STATE ---
bool brownOutDetected = false;
void setup() {
Serial.begin(9600);
pinMode(LED_PIN, OUTPUT);
pinMode(WAKE_PIN, INPUT_PULLUP);
// Check for Brown-out Reset Flag (BORF) in MCU Status Register
if (MCUSR & (1 << BORF)) {
Serial.println("ERROR: BOD: Brown-out detected. VCC dropped below 2.7V.");
brownOutDetected = true;
MCUSR &= ~(1 << BORF); // Clear the flag
}
Wire.begin();
Serial.print("System VCC: ");
Serial.print(readVcc());
Serial.println(" mV");
}
void loop() {
if (brownOutDetected) {
// Blink LED rapidly to indicate power failure state
for(int i=0; i<5; i++) {
digitalWrite(LED_PIN, HIGH);
delay(100);
digitalWrite(LED_PIN, LOW);
delay(100);
}
brownOutDetected = false; // Reset for next cycle
} else {
digitalWrite(LED_PIN, HIGH);
delay(500);
digitalWrite(LED_PIN, LOW);
}
// Prepare for sleep
goToSleep();
}
// Read internal 1.1V reference against VCC to calculate actual VCC
long readVcc() {
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Start conversion
while (bit_is_set(ADCSRA, ADSC)); // Wait for completion
long result = ADCL;
result |= ADCH << 8;
result = 1125300L / result; // Calculate VCC in millivolts (1.1V * 1023 * 1000)
return result;
}
void goToSleep() {
Serial.flush(); // Ensure all serial data is transmitted
// Disable peripherals to save power
power_adc_disable();
power_spi_disable();
power_twi_disable(); // Disables I2C
power_timer1_disable();
// Configure sleep mode
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
// Attach interrupt to wake up (LOW level trigger)
attachInterrupt(digitalPinToInterrupt(WAKE_PIN), wakeUpNow, LOW);
// Turn off brown-out detector in software (saves ~20uA)
MCUCR = bit(BODS) | bit(BODSE);
MCUCR = bit(BODS);
sleep_cpu(); // Execute sleep
// --- WAKES UP HERE ---
sleep_disable();
detachInterrupt(digitalPinToInterrupt(WAKE_PIN));
// Re-enable peripherals
power_adc_enable();
power_spi_enable();
power_twi_enable();
power_timer1_enable();
}
void wakeUpNow() {
// Empty ISR, just wakes the CPU
}
Debugging Power Failures: Brownouts and Overheating
When a Nano behaves erratically—resetting randomly, failing to upload, or getting hot to the touch—it is almost always a power delivery issue. According to the Microchip ATmega328P datasheet, the chip requires a stable VCC to maintain SRAM state and execute flash instructions correctly.
The First Three Things to Check When It Fails
- Measure the 5V Pin Under Load: Use a multimeter to probe the 5V pin and GND while the circuit is active. If it reads below 4.7V, your power source is sagging, or your MT3608 boost converter is poorly tuned.
- Check the USB-UART Chip Temperature: Touch the black SMD chip near the USB port (CH340G or FT232RL). If it is burning hot, you have a short circuit on the 5V USB rail, or you are backfeeding voltage into the 5V pin while simultaneously plugged into USB.
- Verify the DTR Capacitor: If uploads fail, check the 100nF capacitor between the USB-UART DTR line and the ATmega RESET pin. A failed capacitor prevents the auto-reset sequence required for bootloading.
Common Error Strings and Ranked Causes
Error 1: avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
- Cause A (Most Likely): The ATmega328P is stuck in a brownout state and cannot execute the bootloader. The 5V rail is dipping below 2.7V during the DTR reset toggle.
- Cause B: Wrong board selected in the IDE. Nano clones with the CH340G chip often require the "ATmega328P (Old Bootloader)" option.
- Cause C: The USB cable is charge-only (missing D+ and D- data lines).
Error 2: Serial Monitor outputs ERROR: BOD: Brown-out detected. VCC dropped below 2.7V.
- Cause A: You are powering via VIN with a weak 9V battery, and a peripheral (like a servo or relay) kicked on, pulling the voltage down.
- Cause B: The MT3608 boost converter is overheating and its internal thermal shutdown is dropping the output voltage.
Extending and Simplifying the Build
Depending on your deployment environment, you may need to scale this power architecture up or strip it down to the bare minimum.
How to Extend the Build (High-Draw / Remote)
If you are adding an ESP8266 WiFi module or a SIM800L GSM modem to your Nano, the 500mA limit of the 5V pin and the MT3608 will be exceeded. The Fix: Upgrade to a 2S (7.4V) 18650 battery pack and use a high-current buck converter (like the LM2596 module set to 5.5V) feeding the VIN pin. This utilizes the Nano's onboard regulator to drop the 5.5V to 5V, safely handling the 1A+ current spikes of GSM transmission without browning out the ATmega. Add a 1000µF low-ESR capacitor across the VIN and GND pins to buffer transient spikes.
How to Simplify the Build (Low-Cost / Indoor)
If you don't need the high energy density of lithium-ion and want to avoid tuning boost converters, simplify the power supply using standard alkaline cells. The Fix: Wire three AA batteries in series (4.5V nominal, ~4.8V fresh) directly into the 5V pin. Because 4.8V is within the ATmega328P's acceptable operating range (up to 5.5V), the microcontroller will run perfectly without any regulators or converters. This eliminates quiescent current draw from switching regulators, allowing a 2000mAh AA pack to sleep for over a year at 10µA.






