Professional Documents
Culture Documents
Digital Arduino Voltmeter
Digital Arduino Voltmeter
Arduino Voltmeter
ELECTRONICS HUB
P ROJ E C T S | T U T O RI A L S | C O U RS E S
Contents [hide]
1 Circuit Diagram
2 Components
3 Component Description
4 Circuit Design
5 Working
6 Applications
7 Code 1
8 Code 2
9 Related Articles
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
1/16
21/6/2017 Digital Arduino Voltmeter
A Voltmeter or a Voltage Meter is a measuring instrument that is used for measuring voltage
or potential di erence between two points in a circuit. Voltmeters are an important piece of
equipment which are associated with any kind of electronics project. They are used in
measurement of both AC and DC voltages.
Voltmeters are again classi ed in to two types namely Analog Voltmeter and Digital Voltmeter.
Analog Voltmeter consists of pointer that moves across a scale and the movement is
proportional to the voltage measured.
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
2/16
21/6/2017 Digital Arduino Voltmeter
Analog Voltmeters are further classi ed based on their principle of construction. Some of the
commonly known analog voltmeters are Permanent Magnet Moving Coil Voltmeter, Recti er
Type Voltmeter, Electrostatic Type Voltmeter, Moving Iron Type Voltmeter etc.
Select the Next Set of Arduino Projects You Want to Learn in Electronicshub: Arduino
Projects»
Analog Voltmeters generally have an error percentage of 5% and the parallax error is often an
issue. But analog voltmeters can be used to measure ranging from few volts to several
thousand volts.
To overcome the defects of analog voltmeters, Digital Voltmeters are introduced. Unlike
analog voltmeters, which scale and a pointer to show the measured voltage, digital voltmeters
directly display the measured voltage numerical on a digital display.
The percentage of error in digital voltmeters is usually less than 1% and the accuracy can be
increased in precision digital voltmeters with high speed measurement and option of storing
the values in a memory.
In this project, an Arduino based Digital Voltmeter which can measure voltages up to 50V is
designed.
Circuit Diagram
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
3/16
21/6/2017 Digital Arduino Voltmeter
Components
Arduino UNO
16 x 2 LCD Display
10KΩ POT
100KΩ
10KΩ
Connecting Wires
Component Description
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
4/16
21/6/2017 Digital Arduino Voltmeter
Component Description
Electronics Project Kits For Students Click Here ×
Arduino UNO
Arduino UNO is one of the most popular electronics prototyping board based on ATmega328P
Microcontroller. ATmega328P is an AVR architecture based 8-bit microcontroller.
16 x 2 LCD Display
A 16 x 2 LCD display is the most commonly used display unit for microcontroller based
applications.
It supports 16 characters in a row with two such rows. It also supports special characters and
even custom characters.
Circuit Design
For measuring voltages less than or equal to 5V, rst circuit can be used. For measuring
voltages up to 50V, second circuit can be used. The LCD part in both the circuits are same.
Pin 1 and 2 (Vss and Vdd) of the LCD power supply pins for display. They are connected to
ground and +5V supply respectively. Pin 3 (Vee) of the LCD is the contrast adjust pin of the
display. It is connected to the wiper terminal of the 10KΩ POT while the other terminals of the
POT are connected to +5V supply and ground respectively.
The next three pins of the LCD are control pins. Pins 4 and 6 (RS and E) of the LCD are
connected to digital input/output pins 2 and 3 of Arduino respectively. Pin 5 (RW) of the LCD is
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
5/16
21/6/2017 Digital Arduino Voltmeter
In the rst circuit, which is used to measure voltages up to 5V, there are no additional
connections and the voltage to be measured is connected directly to the analog input A0 of
the Arduino UNO.
In the second circuit, which is used to measure voltages up to 50V, we need to connect a
voltage circuit additionally. The output of the voltage divider circuit consisting of 100KΩ
resistor and 10KΩ resistor is connected to the analog input pin A0 of the Arduino UNO with
other end of the 100KΩ resistor connected to the voltage to be measured and the other end of
the 10KΩ resistor connected to the ground.
The ground terminal of the input voltage to be measured and Arduino UNO must be common.
Working
The aim of the project is to build a digital voltmeter using Arduino UNO. The components
required and the construction of the project is very simple. The working of the project is
explained here.
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
6/16
21/6/2017 Digital Arduino Voltmeter
In the rst circuit, which is used to measure a maximum voltage of 5V, the input voltage is
given to the analog input pin of the Arduino. The reference voltage of the ADC is 5V. The ADC in
Arduino UNO is of 10-bit resolution. Hence, the input voltage is calculated by multiplying the
analog value at the analog pin with 5 and dividing the value with 210 i.e. 1024.
The range of voltages for Arduino UNOs analog input is 0V to 5V. Hence, in order to increase
this range, a voltage divider circuit must be used.
In the second circuit, the range of the analog input of Arduino UNO is increased up to 50V by
using a voltage divider consisting of 100KΩ resistor and 10KΩ resistor. With the help of the
voltage divider circuit, the input voltage being measured is brought down to the range of
Arduino UNOs analog input.
The rest of the calculations are made in the programming part of the Arduino UNO.
NOTE
The disadvantage of using voltage divider based voltmeter is the error of measurement.
Hence, we need multiple ranges of voltmeter.
In order to reduce the error, the ratio of R1 and R2 in the voltage divider must be
minimum.
For example, to measure an input voltage of 50V, the ratio of R1 and R2 must be greater
than ((50/5) – 1) i.e.
R1/R2 > 9
Hence, if we choose R1 as 100KΩ and R2 as 10KΩ, then it is possible to measure the voltages
up to 50V.
Applications
An Arduino based Digital Voltmeter is designed in this project which can be used to
measure di erent ranges of DC voltages.
The circuit can be extended to measure even AC voltages with slight modi cation in
circuit and code.
Code 1
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
7/16
21/6/2017 Digital Arduino Voltmeter
1
2
#include "LiquidCrystal.h"
Electronics Project Kits For Students Click Here ×
3 LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
4
5 float voltage = 0.0;
6 float temp=0.0;
7 int analog_value;
8
9 void setup()
10 {
11 lcd.begin(16, 2);
12 lcd.setCursor (0,0);
13 lcd.print(" Arduino based ");
14 lcd.setCursor(0,1);
15 lcd.print("Digital Voltmeter");
16 delay(2000);
17 }
18 void loop()
19 {
20
21
22 analog_value = analogRead(A0);
23 temp = (analog_value * 5.0) / 1024.0;
24
25 voltage = temp/(0.0909);
26 if (voltage < 0.1)
27 {
28 voltage=0.0;
29 }
30 lcd.clear();
31 lcd.setCursor(0, 0);
32 lcd.print("Voltage= ");
33 lcd.print(voltage);
34 lcd.setCursor(13,1);
35 lcd.print("V");
36 delay(30);
37 }
Code 2
1 #include "LiquidCrystal.h"
2
3 LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
4
5 float voltage = 0.0;
6 float temp=0.0;
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
8/16
21/6/2017 Digital Arduino Voltmeter
7
8
int analog_value;
Electronics Project Kits For Students Click Here ×
9 void setup()
10 {
11 lcd.begin(16, 2);
12 lcd.setCursor (0,0);
13 lcd.print(" Arduino based ");
14 lcd.setCursor(0,1);
15 lcd.print("Digital Voltmeter");
16 delay(2000);
17 }
18 void loop()
19 {
20
21
22 analog_value = analogRead(A0);
23 voltage = (analog_value * 5.0) / 1024.0;
24
25 if (voltage < 0.1)
26 {
27 voltage=0.0;
28 }
29 lcd.clear();
30 lcd.setCursor(0, 0);
31 lcd.print("Voltage= ");
32 lcd.print(voltage);
33 lcd.setCursor(13,1);
34 lcd.print("V");
35 delay(30);
36 }
Related Articles
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
9/16
21/6/2017 Digital Arduino Voltmeter
Arduino Relay Control Arduino LED Matrix Arduino Introduction Arduino RFID Reader
Stepper Motor Control Portable Ultrasonic Rotary Encoder With Arduino Based Digital
Using Arduino Range Meter Arduino – Know it all Thermometer
Leave a Reply
Your email address will not be published. Required elds are marked *
Comment
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
10/16
21/6/2017 Digital Arduino Voltmeter
Name *
Email *
Website
POST COMMENT
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
11/16
21/6/2017 Digital Arduino Voltmeter
Electronics Hub
YouTube 16K
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
12/16
21/6/2017 Digital Arduino Voltmeter
Ikuti di Pinterest
Electronics Hub
Follow +1
+ 71,296
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
13/16
21/6/2017 Digital Arduino Voltmeter
Electronics Hub
665.069 suka
Sukai Halaman Daftar
Jadilah orang pertama yang menyukai ini.
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
14/16
21/6/2017 Digital Arduino Voltmeter
http://www.electronicshub.org/digitalarduinovoltmeter/ ×
15/16
21/6/2017 Digital Arduino Voltmeter
Courses Embedded
Electronics Project Kits ForAurdino
Students Click Here ×
Calculator Power Solar
Contact Robotics Free circuits
ARM Home Automation
IOT
TUTORIALS
Capcitors
Resitors
Filters
Diodes
Transistors
TUTORIALS FOLLOW US
http://www.electronicshub.org/digitalarduinovoltmeter/ 16/16