Nano Digital Volt Meter

Nano Digital Volt Meter is a microcontroller based simple DIY project for electronics hobbyists and makers. It is a compact digital voltmeter which can incisively measure input dc voltages in 0 to 55V range. The project is built around an Arduino Nano microcontroller board. Another key component is an I2C LCD panel, which is easier to wire up as the microcontroller can talk to the display over a single pair of wires.

Key Hardware

  • Arduino Nano (v3)
  • 16×2 I2C LCD
  • 1K &10K (1%) Resistors

Wiring Diagram

Nano Digital Voltmeter - Circuit Diagram

Connection Diagram

The analog sensor on the Nano board senses the voltage on the analog pin and converts it into a digital format that can be processed by the microcontroller. Here, the input voltage is routed to an analog pin through a simple passive voltage divider, and with the values shown it can measure dc voltage in 0V to 55V range. However, when feeding 55V, the analog pin will be held at its maximum tolerable voltage of 5V. So, it’s better to treat this voltmeter as a “0-48V DVM” unless you want to add an “Arduino Toast” in your breakfast menu!

Arduino Code/Sketch

* Nano DVM
* Version v1.0
* With 16x2 I2C LCD
* Designed as a 0-55V DC DVM
* Recommended Input 0-48 V (see text)
* By - T.K.Hareendran

#include "LiquidCrystal_I2C.h"
#include "Wire.h"
#define LCDADDR 0x3F // Select correct I2C address of the I2C LCD (0x27 or 0x3F)
//#define LCDADDR 0x27 // Uncomment for next address, and comment above line!
#define LCDCOLS 16
#define LCDROWS 2
LiquidCrystal_I2C lcd(LCDADDR, LCDCOLS, LCDROWS); // LCD object
void setup() {
lcd.print(" *NANO LAB DVM* "); // Custom Text
void loop() {
int Pin; // 0-1023 I/P
double Vin;
Pin = analogRead(A0); // Probe Input
Vin = Pin * (5.0*11 / 1023); // Pin to Vin (Reduction Factor 11)
lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(1, 1);
lcd.print(Vin, 3);
lcd.print(" VOLT DC "); // Custom Text

Power Supply Picks

The Arduino Nano can be powered from any 7-12V unregulated dc supply through Vin pin (pin30). You can also use a  regulated 5V (> 5V inputted here will fry your board at once)  instead as the power supply by applying +5V pin (pin27). According to official documentation, the input power source (USB/Vin/+5V) is selected to the highest voltage source automatically.

The prototype was tested initially with a Duracell PP3-size 9-volt alkaline battery. Since the +5V pin of Nano can provide safe current upto 500 mA, the LCD was powered directly from the same +5V (pin27) rail. However, it’s better to use a regulated 5V external dc power supply for the DVM (see figure shown below) if you prefer to use the display with always-on backlight.

Nano Digital Voltmeter - Circuit Update

And finally, a random snap of my Nano DVM’s display screen:

Nano Digital Voltmeter - Screen

Nano Digital Voltmeter – Screen

Leave a Comment


  • Hello thanks for sharing – works like charm
    a little question tho…

    lets say i’m using mega board – can i probe like multi sources?
    lets say A0- 15v , A1- 13v , A2- 28v and so on

    • Syam: It’ll work! What’s the error message dellivered by your prototype? Could you elaborate how your code failed – upload failure or voltage reading error? Also post relevant screenshots here. Otherwise it’s not easy to figure out the issue.

  • failed compiling code.

    Arduino: 1.6.5 (Windows 7), Board: “Arduino Pro or Pro Mini, ATmega328 (5V, 16 MHz)”

    Codreydotcom_version_singlechannel.ino: In function 'void setup()':
    Codreydotcom_version_singlechannel:17: error: no matching function for call to 'LiquidCrystal_I2C::begin()'
    Codreydotcom_version_singlechannel.ino:17:11: note: candidate is:
    In file included from Codreydotcom_version_singlechannel.ino:9:0:
    C:\Program Files\Arduino\libraries\LiquidCrystal_I2C-master/LiquidCrystal_I2C.h:58:8: note: void LiquidCrystal_I2C::begin(uint8_t, uint8_t, uint8_t)
    void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS );
    C:\Program Files\Arduino\libraries\LiquidCrystal_I2C-master/LiquidCrystal_I2C.h:58:8: note: candidate expects 3 arguments, 0 provided
    no matching function for call to 'LiquidCrystal_I2C::begin()'

    This report would have more information with
    “Show verbose output during compilation”
    enabled in File > Preferences.