6/1/24, 4:02 AM Arduino based Multimeter
Arduino based Multimeter
By Ajish Alfred
Introduction
This is a project based on Arduino board which can measureresistance, diode, continuity[H1] , voltage[H2] ,
current[H3] , power[H4] , hfe[H5] and capacitance[H6] .The values are displayed onthe 16*2 LCD. The project
uses an Arduino pro mini boardwhose ADC feature is used along with the concepts like Voltage divide,Ohms law,
RC charging are used to develop this Multi-meter.
Fig. 1: Prototype of Arduino based Digital Multimeter
Description
The entire project can be divided into three basic blocks;
1) Resistance/Diode/Continuity Sensor Unit
2) AC/DC Voltage Sensor Unit
3) DC Current Sensor Unit
4) Power Sensor Unit
[Link] 1/27
6/1/24, 4:02 AM Arduino based Multimeter
5) hfeSensor Unit
6) Capacitance Sensor Unit
7) Processor Unit
8) Display Unit
Fig. 2: Block Diagram of Arduino based Digital Multimeter
The Resistance/Diode/Continuity Sensor, Voltage Sensor, Current Sensor, Power Sensor, Capacitance Sensor and
hfeSensor produces output voltages proportional to Resistance/Diode/Continuity, Voltage, Current, Power,
Capacitance and hferespectively.
The Processor Unit takes these voltages one by one and calculates the Resistance/Diode/Continuity Sensor,
Voltage, Current, Power, Capacitance and hfe. The Processor Unit then sends data to the Display Unit to display the
values.
The Display unit takes 4bit data from the Processor Unit and generates a 16*2 display for different measurement
values.
1) Resistance/Diode/Continuity Sensor Unit
A basic voltage divider [H7] circuit is used as the Resistance/Diode/Continuity Sensing Unit to provide an output,
which is the voltage equivalent of the unknown resistor, diode or continuous path connected as the input. From
this output voltage we cancalculate[H8] the value of unknown resistance, detect the diode type or detect a
continuous path.
[Link] 2/27
6/1/24, 4:02 AM Arduino based Multimeter
2) AC/DC Voltage Sensor Unit
A basic voltage divider circuit[H9] is used as the AC/DC Sensing Unit to scale down the input DC and AC
voltages into a DC voltage in the range of 0 to 5 V. The Processor Unit can read this scaled down voltage and
calculate[H10] the actual AC/DC voltages.
3) DC Current Sensor Unit
The Current Sensor in this project is a single low valued resistor through which the current flows to the load device.
The basic principle of current measurement is based on the Ohm’s law.
In our project we implement such a resistor in the current flowing path whose resistance value is known. Then we
measure the voltage at both the ends of the resistor to calculate[H11] the current flow.
4) Power Sensor Unit
The Power Sensor in this project is a single low valued resistor through which the current flows to the load device.
The Voltage across the resistor and the current flow [H12] through the resistor are measured to calculate[H13]
the Power consumption of the device.
5) hfe Sensor Unit
The hfe sensor in this project is actually two current sensors[H14] , one of them sense the input current (base
current) of the transistor and other one sense the output current (collector current) of the transistor. The current
sensors in this project are single low valued resistors through which the current flows to the transistor.
As the current flows through them, voltages get drops across them; we can measure these voltages to
calculate[H15] the input current, output current and the hfe.
6) Capacitance Sensor Unit
The Capacitance sensor in this project is an RC discharging circuit in which the unknown capacitor is discharged
through a known resistor. While the capacitor discharges the time taken for the capacitor to drop the voltage
across it to half the voltage before it starts discharging is measured and from that time value the capacitance is
calculated[H16] .
7) Processor Unit
The processor unit in this project is the Arduino board and it uses the ADC module[H17] to read the output
voltages from the Sensor Unit. The processor unit then applies an algorithm for calculating the measure
[Link] 3/27
6/1/24, 4:02 AM Arduino based Multimeter
resistance, diode, continuity[H18] , voltage[H19] , current[H20] , power[H21] , hfe[H22] and
capacitance[H23] .The Processor Unit then sends the data to the Display Unit.
8) Display Unit
The Display Unit is a standard 16*2 LCD on which the Arduino displays the resistance, diode, continuity, voltage,
current, power, hfe and capacitance values. The LCD has been wired in four bit mode to reduce the number of
output pins of the Arduino board to be used.
Circuit Description
Fig. 3: Circuit Diagrams of various blocks of Arduino based Digital Multimeter
Since the available Analog input channels are multiplexed, array of switches named Function/Range selector are
used to select functions and ranges as shown in following table;A value 1 indicates switch closed and the value 0
indicates a switch open.
[Link] 4/27
6/1/24, 4:02 AM Arduino based Multimeter
F0 F1 F2 R0 R1 R2 FUNCTION RANGE
0 1 5V
1 0 0 DC VOLTAGE 50V
1 1 500V
0 0 1
0 1 5V
1 0 1 AC VOLTAGE 50V
1 1 500V
0 1 RESISTANCE /CONTINUITY 10K
1 0 0 100K
0 1 0 RESISTANCE
1 1 1M
X X 1 DIODE
0 1 1 X X X CURRENT
1 0 0 X X X POWER
1 0 1 X X X HFE
1 1 0 X X X CAPACITANCE
Code Description
The code reads the analog input channels to calculate the resistance, diode, continuity[H24] , voltage[H25] ,
current[H26] , power[H27] , hfe[H28] . The code calculates the time elapsed during the capacitor discharge to
half its initial voltage and calculates the Capacitance[H29] and displays it. The code identifies the function and
range to be displayed by reading the values of Function/Range selector switches.
The code running in the Arduino uses the library function ‘micros()’to get the system time in microseconds. The
capacitance value is then displayed on the 16*2 LCD. The code running in the Arduino uses the library function
analogRead()to obtain the ADC values and [Link]()to display the 16*2 LCD.
[Link] 5/27
6/1/24, 4:02 AM Arduino based Multimeter
Fig. 4: Flow Chart of Arduino Code used for sensing various electronic physical quantities like voltage,
current and resistance
Note:
The 10 ohm resistor in Ammeter is a high value compared to 0.05 ohm or less precision resistor inside a multi-
meter. More current flow more voltage get drop across the resistor, and that voltage drop is proportional to value
of resistance. For current values above 500mA measurement, create a low resistance by connecting as many
resistances in parallel as possible. Since the ADC of Arduino can read a maximum of 5V only, don’t use a current
source with voltage more than 5V.
We have tested the Voltmeter only on maximum 30 V DC.
Project Source Code
###
[Link] 6/27
6/1/24, 4:02 AM Arduino based Multimeter
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define resistance_R50 100000
#define resistance_R500 1000000
#define resistance_V2 10000
#define caliberation_V2 1.1
#define range50_mul (resistance_R50 / resistance_V2) * caliberation_V2
#define range500_mul (resistance_R500 / resistance_V2) * caliberation_V2
#define resistance_Ri 10
#define resistance_Cr 100000
#define resistance_Rb 100000
#define resistance_Re 10
#define resistance_R2 1000
int adc_value = 0;
int voltage_peak_value = 0;
int discharge_voltage_V0 = 0;
int discharge_voltage_V1 = 0;
float voltage_average_value = 0;
float dc_voltage_V0 = 0;
float ac_voltage_V0 = 0;
float dc_voltage_V1 = 0;
float dc_voltage_V2 = 0;
float ac_voltage_V1 = 0;
float dc_current_I0 = 0;
[Link] 7/27
6/1/24, 4:02 AM Arduino based Multimeter
float dc_current_I1 = 0;
float ac_current_I0 = 0;
float dc_power = 0;
float ac_power = 0;
float npn_pnp_hfe = 0;
float capacitance = 0;
unsigned long resistance;
unsigned long sample_count = 0;
unsigned long discharge_time_T0 = 0;
unsigned long discharge_time_T1 = 0;
char fn0 = 6;
char fn1 = 7;
char fn2 = 8;
char rn0 = 9;
char rn1 = 10;
char rn2 = 13;
char function_select [4];
char range_select [4];
void setup()
[Link](16, 2);
[Link](" EG LABS ");
delay(3000);
pinMode(fn0, INPUT);
pinMode(fn1, INPUT);
[Link] 8/27
6/1/24, 4:02 AM Arduino based Multimeter
pinMode(fn2, INPUT);
pinMode(rn0, INPUT);
pinMode(rn1, INPUT);
pinMode(rn2, INPUT);
void loop()
function_select [0] = digitalRead(fn0) + '0';
function_select [1] = digitalRead(fn1) + '0';
function_select [2] = digitalRead(fn2) + '0';
function_select [3] = '';
range_select [0] = digitalRead(rn0) + '0';
range_select [1] = digitalRead(rn1) + '0';
range_select [2] = digitalRead(rn2) + '0';
range_select [3] = '';
if ( 0 == strcmp (function_select, "001") )
//=============================== VOLTAGE ========================================//
voltage_peak_value = 0;
for(sample_count = 0; sample_count < 5000; sample_count ++)
adc_value = analogRead(A0);
if(voltage_peak_value < adc_value)
voltage_peak_value = adc_value;
[Link] 9/27
6/1/24, 4:02 AM Arduino based Multimeter
else;
delayMicroseconds(10);
}
dc_voltage_V0 = voltage_peak_value * 0.00488;
ac_voltage_V0 = dc_voltage_V0 / 1.414;
if ( 0 == strncmp (range_select, "01", 2) )
[Link]();
[Link](0, 0);
[Link]("[R] ");
if (range_select [2] == '0')
[Link](" DCV");
else
[Link](" ACV");
[Link](0, 1);
[Link]("0-5 ");
if (range_select [2] == '0')
[Link](dc_voltage_V0);
else
[Link](ac_voltage_V0);
delay(500);
else;
[Link] 10/27
6/1/24, 4:02 AM Arduino based Multimeter
if ( 0 == strncmp (range_select, "10", 2) )
{
[Link]();
[Link](0, 0);
[Link]("[R] ");
if (range_select [2] == '0')
[Link](" DCV");
else
[Link](" ACV");
[Link](0, 1);
[Link]("5-50 ");
if (range_select [2] == '0')
[Link](dc_voltage_V0 * range50_mul);
else
[Link](ac_voltage_V0 * range50_mul);
delay(500);
else;
if ( 0 == strncmp (range_select, "11", 2) )
[Link]();
[Link](0, 0);
[Link]("[R] ");
[Link] 11/27
6/1/24, 4:02 AM Arduino based Multimeter
if (range_select [2] == '0')
[Link](" DCV");
else
[Link](" ACV");
[Link](0, 1);
[Link]("50-500 ");
if (range_select [2] == '0')
[Link](dc_voltage_V0 * range500_mul);
else
[Link](ac_voltage_V0 * range500_mul);
delay(500);
else;
//=================================================================================//
else;
if ( 0 == strcmp (function_select, "010") )
//============================= RESISTANCE ========================================//
voltage_average_value = 0;
for(sample_count = 0; sample_count < 10; sample_count ++)
[Link] 12/27
6/1/24, 4:02 AM Arduino based Multimeter
{
adc_value = analogRead(A1);
voltage_average_value = voltage_average_value + adc_value;
delay(10);
voltage_average_value = voltage_average_value / 10;
voltage_average_value = voltage_average_value * 0.00488;
if (range_select [2] == '0')
[Link]();
[Link](0, 0);
if ( 0 == strncmp (range_select, "01", 2) )
[Link]("0-10K: ");
else if ( 0 == strncmp (range_select, "10", 2) )
[Link]("10-100K: ");
else if ( 0 == strncmp (range_select, "11", 2) )
[Link]("100K-1M: ");
if (voltage_average_value > 0)
if ( 0 == strncmp (range_select, "01", 2) )
resistance = (1000 * (5 - voltage_average_value)) / voltage_average_value;
else if ( 0 == strncmp (range_select, "10", 2) )
resistance = (10000 * (5 - voltage_average_value)) / voltage_average_value;
else if ( 0 == strncmp (range_select, "11", 2) )
resistance = (100000 * (5 - voltage_average_value)) / voltage_average_value;
[Link] 13/27
6/1/24, 4:02 AM Arduino based Multimeter
else;
if (resistance > 10000)
[Link](resistance / 1000);
[Link](" KE");
else
[Link](resistance);
[Link](" E");
if (resistance < 10)
[Link]();
[Link](0, 1);
[Link](" CONTINUITY");
else;
else
[Link]();
[Link](0, 0);
[Link]("Diode ");
[Link] 14/27
6/1/24, 4:02 AM Arduino based Multimeter
if (voltage_average_value > 0)
{
if ( 0 == strncmp (range_select, "01", 2) )
resistance = (1000 * (5 - voltage_average_value)) / voltage_average_value;
else if ( 0 == strncmp (range_select, "10", 2) )
resistance = (10000 * (5 - voltage_average_value)) / voltage_average_value;
else if ( 0 == strncmp (range_select, "11", 2) )
resistance = (100000 * (5 - voltage_average_value)) / voltage_average_value;
else;
if ((resistance > 145) && (resistance < 165))
[Link]("Silicon");
else if ((resistance > 60) && (resistance < 80))
[Link]("Germanium");
else;
else;
delay(500);
//=================================================================================//
else;
if ( 0 == strcmp (function_select, "011") )
[Link] 15/27
6/1/24, 4:02 AM Arduino based Multimeter
//================================ CURRENT ========================================//
voltage_average_value = 0;
for(sample_count = 0; sample_count < 10; sample_count ++)
adc_value = analogRead(A2);
voltage_average_value = voltage_average_value + adc_value;
delay(10);
voltage_average_value = voltage_average_value / 10;
voltage_average_value = voltage_average_value * 0.00488;
dc_voltage_V1 = voltage_average_value;
voltage_average_value = 0;
for(sample_count = 0; sample_count < 10; sample_count ++)
adc_value = analogRead(A5);
voltage_average_value = voltage_average_value + adc_value;
delay(10);
voltage_average_value = voltage_average_value / 10;
voltage_average_value = voltage_average_value * 0.00488;
dc_voltage_V2 = voltage_average_value;
dc_current_I0 = (dc_voltage_V1 - dc_voltage_V2) / 10;
[Link]();
[Link] 16/27
6/1/24, 4:02 AM Arduino based Multimeter
[Link](0, 0);
[Link](dc_current_I0 * 1000);
[Link](" mA");
delay(500);
//=================================================================================//
else;
if ( 0 == strcmp (function_select, "100") )
//================================= POWER =========================================//
voltage_average_value = 0;
for(sample_count = 0; sample_count < 10; sample_count ++)
adc_value = analogRead(A2);
voltage_average_value = voltage_average_value + adc_value;
delay(10);
voltage_average_value = voltage_average_value / 10;
voltage_average_value = voltage_average_value * 0.00488;
dc_voltage_V1 = voltage_average_value;
voltage_average_value = 0;
for(sample_count = 0; sample_count < 10; sample_count ++)
[Link] 17/27
6/1/24, 4:02 AM Arduino based Multimeter
adc_value = analogRead(A5);
voltage_average_value = voltage_average_value + adc_value;
delay(10);
voltage_average_value = voltage_average_value / 10;
voltage_average_value = voltage_average_value * 0.00488;
dc_voltage_V2 = voltage_average_value;
dc_current_I0 = (dc_voltage_V1 - dc_voltage_V2) / 10;
dc_power = dc_current_I0 * dc_voltage_V1;
[Link]();
[Link](0, 0);
[Link](dc_power * 1000);
[Link](" mW");
delay(500);
//=================================================================================//
else;
if ( 0 == strcmp (function_select, "101") )
//================================== HFE ==========================================//
voltage_average_value = 0;
[Link] 18/27
6/1/24, 4:02 AM Arduino based Multimeter
for(sample_count = 0; sample_count < 10; sample_count ++)
adc_value = analogRead(A2);
voltage_average_value = voltage_average_value + adc_value;
delay(10);
voltage_average_value = voltage_average_value / 10;
voltage_average_value = voltage_average_value * 0.00488;
dc_voltage_V1 = voltage_average_value;
voltage_average_value = 0;
for(sample_count = 0; sample_count < 10; sample_count ++)
adc_value = analogRead(A3);
voltage_average_value = voltage_average_value + adc_value;
delay(10);
voltage_average_value = voltage_average_value / 10;
voltage_average_value = voltage_average_value * 0.00488;
dc_voltage_V2 = voltage_average_value;
dc_current_I0 = (dc_voltage_V1 / resistance_Re) * 1000;
dc_current_I1 = ((4.99 - dc_voltage_V2) / resistance_Rb) * 1000;
npn_pnp_hfe = dc_current_I0 / dc_current_I1;
[Link]();
[Link](0, 0);
[Link] 19/27
6/1/24, 4:02 AM Arduino based Multimeter
[Link]("hfe ");
[Link](npn_pnp_hfe);
delay(500);
//=================================================================================//
else;
if ( 0 == strcmp (function_select, "110") )
//=============================== CAPACITANCE =====================================//
pinMode(18, OUTPUT);
digitalWrite(18, HIGH);
delay(1000);
pinMode(18, INPUT);
discharge_voltage_V0 = analogRead(A4);
discharge_time_T0 = micros();
discharge_voltage_V1 = discharge_voltage_V0 / 2;
while ( discharge_voltage_V1 < analogRead(A4) );
discharge_time_T1 = micros();
capacitance = (discharge_time_T1 - discharge_time_T0) / 0.693;
capacitance = capacitance / resistance_Cr;
[Link]();
[Link] 20/27
6/1/24, 4:02 AM Arduino based Multimeter
[Link](0, 0);
[Link](capacitance);
[Link](" uF");
delay(500);
//=================================================================================//
else;
###
Circuit Diagrams
Circuit-Diagram-Arduino-Based-Digital-Multimeter
Project Video
[Link] 21/27
6/1/24, 4:02 AM Arduino based Multimeter
Arduino Multimeter
Filed Under: Electronic Projects
← Previous Article Next Article →
Questions related to this article?
Ask and discuss on [Link] and [Link] forums.
Tell Us What You Think!!
You must be logged in to post a comment.
EXPAND YOUR KNOWLEDGE
AND STAY CONNECTED
[Link] 22/27
6/1/24, 4:02 AM Arduino based Multimeter
Get the latest info on technologies, tools
and strategies for EE professionals.
GET THE ENEWSLETTER
Search this website GO
Featured Products at
Amphenol's high-current power
pin connectors provide a high-
speed transmission performance
up to 10 Gb/s
Learn more
Amphenol's pitch flex connectors
are available in multiple heights
and are vibration-proof
Learn more
Amphenol's FFC offer the
flexibility and performance
associated with pitch size, length,
and thickness options
Learn more
Amphenol’s micro connectors low
profile 0.60 mm stack height and
high current rating of up to 5 A
Learn more
EE LEARNING CENTER
BROWSE CLASSROOMS
[Link] 23/27
6/1/24, 4:02 AM Arduino based Multimeter
BROWSE DESIGN GUIDES
EXPAND YOUR KNOWLEDGE
AND STAY CONNECTED
Get the latest info on technologies, tools
and strategies for EE professionals.
GET THE ENEWSLETTER
HAVE A QUESTION?
Have a technical question about an article or other engineering questions? Check out our
engineering forums [Link] and [Link] where you can get those
questions asked and answered by your peers!
EDA BOARD
ELECTRO-TECH-ONLINE
[Link] DISCUSSIONS
Why reactive power is not considered for calculation of efficiency of SMPS?
PROBLEM IN DESIGNING HIGH PASS FILTER USING OTA
ESD
N Channel and P Channel MOSFET symbols
SAR using PSoC 5LP
[Link] DISCUSSIONS
Any way to watch tv on Smart Tv without a cable box?
RS232 Simple linear Buffer (OshonSoft Basic).
Is it possible to make a gate level digital wrist watch
Need help identifying this burnt out resistor
12V LM317 variable power supply, pot got burned.
FEATURED TUTORIALS
[Link] 24/27
6/1/24, 4:02 AM Arduino based Multimeter
VHDL Tutorial – 5: Design, simulate and verify NAND, NOR, XOR and XNOR gates using AND-
OR-NOT gates in VHDL
VHDL Tutorial 6: Design and verify De Morgan’s Theorem using VHDL
VHDL Tutorial – 7 NAND gate as universal gate using VHDL
VHDL Tutorial – 8: NOR gate as a universal gate
VHDL Tutorial – 9: Digital circuit design with a given Boolean equation
VHDL Tutorial – 10: Designing half and full-adder circuits
RECENT ARTICLES
4G LTE and GNSS board from MIKROE supports global tracking and telematics
Environmentally sustainable radio wave absorbers designed for high-tech applications
Microchip expands BLE product line with wireless devices
Infineon unveils transistor devices for digitalization and decarbonization
Infineon introduces high-performance NFC bridge tag for IoT authentication
EE ENGINEERING TRAINING DAYS
[Link] 25/27
6/1/24, 4:02 AM Arduino based Multimeter
SUBMIT A GUEST POST
ANALOG IC TIPS
CONNECTOR TIPS
BATTERY POWER TIPS
DESIGNFAST
EDABOARD FORUMS
EE WORLD ONLINE
ELECTRO-TECH-ONLINE FORUMS
EV ENGINEERING
MICROCONTROLLER TIPS
POWER ELECTRONIC TIPS
SENSOR TIPS
[Link] 26/27
6/1/24, 4:02 AM Arduino based Multimeter
TEST AND MEASUREMENT TIPS
5G TECHNOLOGY WORLD
SUBSCRIBE TO OUR NEWSLETTER
ABOUT US
CONTACT US
ADVERTISE
Copyright © 2024 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used,
except with the prior written permission of WTWH Media
Privacy Policy
[Link] 27/27