Arduino Based Multimeter
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.
Description
5) hfeSensor Unit
7) Processor Unit
8) Display Unit
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.
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.
https://www.engineersgarage.com/arduino-based-multimeter/ 2/27
6/1/24, 4:02 AM Arduino based Multimeter
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.
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.
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.
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.
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
https://www.engineersgarage.com/arduino-based-multimeter/ 3/27
6/1/24, 4:02 AM Arduino based Multimeter
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
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.
https://www.engineersgarage.com/arduino-based-multimeter/ 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
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 lcd.print()to display the 16*2 LCD.
https://www.engineersgarage.com/arduino-based-multimeter/ 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.
###
https://www.engineersgarage.com/arduino-based-multimeter/ 6/27
6/1/24, 4:02 AM Arduino based Multimeter
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define resistance_Ri 10
#define resistance_Re 10
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;
https://www.engineersgarage.com/arduino-based-multimeter/ 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;
char fn0 = 6;
char fn1 = 7;
char fn2 = 8;
char rn0 = 9;
void setup()
lcd.begin(16, 2);
delay(3000);
pinMode(fn0, INPUT);
pinMode(fn1, INPUT);
https://www.engineersgarage.com/arduino-based-multimeter/ 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()
voltage_peak_value = 0;
adc_value = analogRead(A0);
voltage_peak_value = adc_value;
https://www.engineersgarage.com/arduino-based-multimeter/ 9/27
6/1/24, 4:02 AM Arduino based Multimeter
else;
delayMicroseconds(10);
}
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("[R] ");
lcd.print(" DCV");
else
lcd.print(" ACV");
lcd.setCursor(0, 1);
lcd.print("0-5 ");
lcd.print(dc_voltage_V0);
else
lcd.print(ac_voltage_V0);
delay(500);
else;
https://www.engineersgarage.com/arduino-based-multimeter/ 10/27
6/1/24, 4:02 AM Arduino based Multimeter
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("[R] ");
lcd.print(" DCV");
else
lcd.print(" ACV");
lcd.setCursor(0, 1);
lcd.print("5-50 ");
lcd.print(dc_voltage_V0 * range50_mul);
else
lcd.print(ac_voltage_V0 * range50_mul);
delay(500);
else;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("[R] ");
https://www.engineersgarage.com/arduino-based-multimeter/ 11/27
6/1/24, 4:02 AM Arduino based Multimeter
lcd.print(" DCV");
else
lcd.print(" ACV");
lcd.setCursor(0, 1);
lcd.print("50-500 ");
lcd.print(dc_voltage_V0 * range500_mul);
else
lcd.print(ac_voltage_V0 * range500_mul);
delay(500);
else;
//=================================================================================//
else;
voltage_average_value = 0;
https://www.engineersgarage.com/arduino-based-multimeter/ 12/27
6/1/24, 4:02 AM Arduino based Multimeter
{
adc_value = analogRead(A1);
delay(10);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("0-10K: ");
lcd.print("10-100K: ");
lcd.print("100K-1M: ");
if (voltage_average_value > 0)
https://www.engineersgarage.com/arduino-based-multimeter/ 13/27
6/1/24, 4:02 AM Arduino based Multimeter
else;
lcd.print(resistance / 1000);
lcd.print(" KE");
else
lcd.print(resistance);
lcd.print(" E");
lcd.clear();
lcd.setCursor(0, 1);
lcd.print(" CONTINUITY");
else;
else
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Diode ");
https://www.engineersgarage.com/arduino-based-multimeter/ 14/27
6/1/24, 4:02 AM Arduino based Multimeter
if (voltage_average_value > 0)
{
else;
lcd.print("Silicon");
lcd.print("Germanium");
else;
else;
delay(500);
//=================================================================================//
else;
https://www.engineersgarage.com/arduino-based-multimeter/ 15/27
6/1/24, 4:02 AM Arduino based Multimeter
//================================ CURRENT ========================================//
voltage_average_value = 0;
adc_value = analogRead(A2);
delay(10);
dc_voltage_V1 = voltage_average_value;
voltage_average_value = 0;
adc_value = analogRead(A5);
delay(10);
dc_voltage_V2 = voltage_average_value;
lcd.clear();
https://www.engineersgarage.com/arduino-based-multimeter/ 16/27
6/1/24, 4:02 AM Arduino based Multimeter
lcd.setCursor(0, 0);
lcd.print(dc_current_I0 * 1000);
lcd.print(" mA");
delay(500);
//=================================================================================//
else;
voltage_average_value = 0;
adc_value = analogRead(A2);
delay(10);
dc_voltage_V1 = voltage_average_value;
voltage_average_value = 0;
https://www.engineersgarage.com/arduino-based-multimeter/ 17/27
6/1/24, 4:02 AM Arduino based Multimeter
adc_value = analogRead(A5);
delay(10);
dc_voltage_V2 = voltage_average_value;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(dc_power * 1000);
lcd.print(" mW");
delay(500);
//=================================================================================//
else;
voltage_average_value = 0;
https://www.engineersgarage.com/arduino-based-multimeter/ 18/27
6/1/24, 4:02 AM Arduino based Multimeter
for(sample_count = 0; sample_count < 10; sample_count ++)
adc_value = analogRead(A2);
delay(10);
dc_voltage_V1 = voltage_average_value;
voltage_average_value = 0;
adc_value = analogRead(A3);
delay(10);
dc_voltage_V2 = voltage_average_value;
lcd.clear();
lcd.setCursor(0, 0);
https://www.engineersgarage.com/arduino-based-multimeter/ 19/27
6/1/24, 4:02 AM Arduino based Multimeter
lcd.print("hfe ");
lcd.print(npn_pnp_hfe);
delay(500);
//=================================================================================//
else;
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;
discharge_time_T1 = micros();
lcd.clear();
https://www.engineersgarage.com/arduino-based-multimeter/ 20/27
6/1/24, 4:02 AM Arduino based Multimeter
lcd.setCursor(0, 0);
lcd.print(capacitance);
lcd.print(" uF");
delay(500);
//=================================================================================//
else;
###
Circuit Diagrams
Circuit-Diagram-Arduino-Based-Digital-Multimeter
Project Video
https://www.engineersgarage.com/arduino-based-multimeter/ 21/27
6/1/24, 4:02 AM Arduino based Multimeter
Arduino Multimeter
Featured Products at
EE LEARNING CENTER
BROWSE CLASSROOMS
https://www.engineersgarage.com/arduino-based-multimeter/ 23/27
6/1/24, 4:02 AM Arduino based Multimeter
HAVE A QUESTION?
Have a technical question about an article or other engineering questions? Check out our
engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those
questions asked and answered by your peers!
EDA BOARD
ELECTRO-TECH-ONLINE
EDABOARD.COM DISCUSSIONS
ELECTRO-TECH-ONLINE.COM DISCUSSIONS
FEATURED TUTORIALS
https://www.engineersgarage.com/arduino-based-multimeter/ 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
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
https://www.engineersgarage.com/arduino-based-multimeter/ 25/27
6/1/24, 4:02 AM Arduino based Multimeter
ANALOG IC TIPS
CONNECTOR TIPS
DESIGNFAST
EDABOARD FORUMS
EE WORLD ONLINE
ELECTRO-TECH-ONLINE FORUMS
EV ENGINEERING
MICROCONTROLLER TIPS
SENSOR TIPS
https://www.engineersgarage.com/arduino-based-multimeter/ 26/27
6/1/24, 4:02 AM Arduino based Multimeter
TEST AND MEASUREMENT TIPS
5G TECHNOLOGY WORLD
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
https://www.engineersgarage.com/arduino-based-multimeter/ 27/27