กลับไปหน้ารวมไฟล์
arduino-volt-meter-12f940-en.md

INTRODUCTION:

In This project I am going to make a Digital Voltmeter using an Arduino nano and a HD44780 Compatible 16*2 LCD we apply the analog voltage that we want to measure to one of the analog input pins of the Arduino. We can measure maximum 5V Dc voltage with this digital Voltmeter. I shall try to increase its rage further in my future projects.

Hardware List:

  • 1. Arduino Nano
  • 2. HD44780 LCD Display ( 16*2)
  • 3. 10K potentiometer
  • 4. Bread Board
  • 5. 10K trimmer potentiometer
  • 6. Jumper wire
  • 7. 100 ohm resistor
  • 8. Mini B USB Cable

Follow the given steps to setup everything correctly

Step1 – Insert the Arduino nano and HD44780 LCD display carefully in the bread board. After inserting these two further insert a 10ktrimmer, 10K potentiometer and a 100 ohm resistor as shown in the following figure.

Step2- Connect all the pins of the hardware to one another according to the given schematic diagram. When your hardware wiring is done then please make sure to check all the connections twice so that there will be no possibility of any king of wiring error. After wiring your setup will be something like this

Fig-1

Step3- Adjust the contrast of the characters shown on the lcd screen to any level that you like by rotating the knob of the 10k Trimmer clockwise or anticlockwise with the help of a screw driver.

Fig-2

Step4- Write an sketch to read the analog voltage from one of the analog pins of the Arduino and print this voltage value on the LCD Display.

To calculate the input analog voltage of any of the analog input pins we use a basic formula of DAC or ADC Convertor and that is

Vout = (digital input * Vref)/Resolution of the ADC

Atemega328P microcontroller of Arduino nano has a 10 Bit Successive approximation type ADC that converts the analog value into 10 bits binary equivalent.

Step5- After calculating the voltage on the analog pin of the Arduino we print this voltage value on a 16*2 LCD.

Step6- After writing the sketch verify the sketch and when verification is done then you should upload this sketch on your hardware the Latest Arduino Software.

Sketch (C/C++ Code)

#include

LiquidCrystal lcd(5,6,7,8,9,10);

float voltage;

float val;

const int Vref = 5.0;

const int resolution = 1024.0;

void setup() {

// put your setup code here, to run once:

lcd.begin(16,2);

lcd.setCursor(0,0);

lcd.print("Voltage:");

}

void loop() {

// put your main code here, to run repeatedly:

val = analogRead(A3);

voltage = (val*Vref)/resolution;

lcd.setCursor(0,1);

lcd.print(voltage);

delay(90);

}

Pictures of my work-

Schematicdiagram-

EXPANDED TECHNICAL DETAILS

Voltage Division Theory

While the Arduino's ADC can only measure up to 5V, this project uses a Resistor Voltage Divider to measure much higher voltages (e.g., 0-25V).

  • Circuit Design: Uses a 10kΩ and a 2.2kΩ resistor in series. This scales down a 24V signal to approx. 4.3V, which is safe for the Arduino's analog pins.
  • Math Logic: The firmware multiplies the raw ADC reading (0-1023) by a "Correction Factor" derived from the resistor values and the reference voltage (5.0V).

Safety & Display

  • Protection: Includes a Zener Diode (5.1V) across the input to prevent accidental over-voltage from damaging the microcontroller.
  • UI: The real-time voltage is displayed on a 16x2 LCD with 2 decimal places of precision, creating a handy, portable diagnostic tool for testing batteries and power supplies.

ข้อมูล Frontmatter ดั้งเดิม

title: "Arduino Volt Meter"
description: "Digital Voltmeter with Arduino And HD44780 LCD"
author: "ramjipatel376"
category: ""
tags:
  - "embedded"
  - "monitoring"
  - "robots"
views: 2108
likes: 0
price: 870
difficulty: "Intermediate"
components:
  - "1x Alphanumeric LCD, 16 x 2"
  - "1x Multitool, Screwdriver"
  - "1x Solderless Breadboard Full Size"
  - "1x Trimmer Potentiometer, Square"
  - "1x Jumper wires (generic)"
  - "1x Resistor 100 ohm"
  - "1x USB-A to Mini-USB Cable"
  - "1x Rotary Potentiometer, 10 kohm"
  - "1x Arduino Nano R3"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles:
  - "https://projects.arduinocontent.cc/8eb25f63-660d-48b8-9b03-cc0b51855119.ino"
documentationLinks: []
passwordHash: "cca67460063e2a89552b31f34dfa8f1bc78b098794ac433706df29118b78d486"
encryptedPayload: "U2FsdGVkX18By5Njcqp6mhD4/5wNFfoVpjtDaYMiVt7rgd27BTUQiEvtR8Q13nCKqIUkJ7WjZaSslvU6eP9fF5GY/Qda6M+D24ZKchDhwV8="
seoDescription: "Learn how to build a Digital Voltmeter with Arduino and HD44780 LCD for accurate voltage measurement in your projects."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/arduino-volt-meter-12f940_cover.jpg"
lang: "en"