Arduino Based Digital Voltmeter Using 16X2 LCD (Voltage Range 0 to 5V)

The simple digital voltmeter made  using Arduino  Nano and 16X2 LCD, the project is tested on TWOVOLT Multi-Project LCD Shield; Arduino has a couple of 10 Bit ADC pins, we have used A0 pin as an input. The PR2 Trimmer pot used as input voltage, Remove PR2 to measure the external voltage. 16X2 LCD used to display the measured voltage.  Arduino can be power using USB cable or 12V DC at CN1 VDD and GND pin. PR2 5K Ohms or 10K Ohms can be used.

Arduino Pins LCD

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground

Arduino Pins Vs Devices

  • Switch 1 Arduino Pin A3
  • Switch 2 Arduino Pin D6
  • Switch 3 Arduino Pin D7
  • Current Sensor ACS714 Arduino Pin A5
  • Trimmer Potentiometer Arduino Pin A0
  • LM35 Sensor Arduino Pin A4
  • Power MOSFET Arduino Pin D9
  • Relay Arduino Pin D8

Download Arduino Code


Hardware Required for the Project


Arduino Code for the project


/*
Simple code to mesure the voltage and display on 16X2 LCD, code tested on
Multi project LCD shield from twovolt.com , circuit, pcb layout and code available
at ourwebsite www.twovolt.com and video available at www.youtube.com/thetwovolt
*/
#include “LiquidCrystal.h”

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

float voltage = 0.0;
float temp=0.0;
int analog_value;

void setup()
{
lcd.begin(16, 2);
lcd.setCursor (0,0);
}
void loop()
{

analog_value = analogRead(A0);
voltage = (analog_value * 5.0) / 1024.0;

if (voltage < 0.1)
{
voltage=0.0;
}
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(“Voltage= “);
lcd.print(voltage);
delay(30);
}


Complete Circuit of Arduino Multi-project LCD Shield