Close Menu
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
Facebook X (Twitter) Instagram
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
How To Electronics
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
How To Electronics
Home » 0-50V DC Voltmeter using Arduino & Seven Segement Display
Arduino Projects

0-50V DC Voltmeter using Arduino & Seven Segement Display

Mamtaz AlamBy Mamtaz AlamUpdated:August 22, 20223 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
DC Voltmeter using Arduino and Seven Segment Display. This time we will be interfacing Arduino with 7 segment display and MA7219 IC to measure voltage ranging from 0-50V with almost no error at all. This DC voltmeter is linear with voltage and shows a linear characteristics from 0.01 Volt to 50 Volt.
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

Introduction:

We are back again here with the latest Arduino Project, i.e DC Voltmeter using Arduino and Seven Segment Display. This time we will be interfacing Arduino with 7 segment display and MA7219 IC to measure voltage ranging from 0-50V with almost no error at all. This DC voltmeter is linear with voltage and shows linear characteristics from 0.01 Volt to 50 Volt. Voltage beyond 50 Volt isn’t measurable by it. The above figure shows the 0-50V DC Voltmeter using Arduino and Seven Segment Display.

The Arduino inbuilt 10 bit ADC, can be used for measuring the 0-50V. Popular MAX7219 display driver, connected with Arduino Uno is used for displaying the measured DC voltage.

You can learn more about 7 segment Display at Stopwatch using 4 Digit 7 Segment Display & Arduino


Parts & Components:

  1. Arduino UNO Board
  2. MA7219 IC
  3. Resistors – 27K & 1200K
  4. 1N4728 3.3 Volt Zener Diode
  5. 4 digits, common cathode Seven Segment Display




Design & Explanation:

The voltage divider circuit is used to divide voltage into two parts, out of which one is fed to the input analog terminal of Arduino. Internal reference voltage as Vref 1.1V of Arduino is selected for measurement.

The resistor R1and R2 forms the voltage divider which is connected to analog input pin A0 of Arduino.
1N4728 3.3 Volt Zener Diode, at the A0 pin, is used for high voltage protection for Arduino.

Vout = (R2 / R1+R2 ) * Vin.
 

If Vin is 50V then

Vout = (27/1200+27) * 50V = 1.1 V = 1100 mV.
ADC Resolution = Vref / (1024 -1)
ADC Resolution = 1.1 V / 1023 = 1100mV / 1023 = 1.075 mV


0-50V DC Voltmeter using Arduino and Seven Segement Display:
DC Voltmeter using Arduino and Seven Segment Display. This time we will be interfacing Arduino with 7 segment display and MA7219 IC to measure voltage ranging from 0-50V with almost no error at all. This DC voltmeter is linear with voltage and shows a linear characteristics from 0.01 Volt to 50 Volt.


0-50V DC Voltmeter using Atemga328 and Seven Segement Display:

The same project can also be implemented using Atmega328 micro-controller. All you need to do is replace the Arduino Board with Atmega328 micro-controller, with addition of few more components as in the circuit diagram below.

DC Voltmeter using Arduino and Seven Segment Display



Programming & Source Code:

Here is a code for 0-50V DC Voltmeter using Arduino. The programming is written in the Arduino language and the same program is applicable for both circuits. For the first circuit, you can directly upload the program. And for the 2nd circuit, you need to upload the program to ATmega328. This is done by replacing the ATmega328 microcontroller on Arduino Uno Board with a fresh ATmega328 micro-controller. Before uploading you need to upload bootloader, then the only program can be successfully uploaded.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <LedControl.h>
 
int analogPin1 = 0;    
int val = 0;          
 
// inputs: DIN pin, CLK pin, LOAD pin. number of chips
LedControl mydisplay = LedControl(11, 9, 10, 1);
 
void setup()
{
   analogReference(INTERNAL);
  mydisplay.shutdown(0, false);  // turns on display
  mydisplay.setIntensity(0, 15); // 15 = brightest
  mydisplay.setDigit(0, 0, 9, false);
  mydisplay.setDigit(0, 1, 8, false);
  mydisplay.setDigit(0, 2, 7, false);
  mydisplay.setDigit(0, 3, 6, false);
  mydisplay.setDigit(0, 4, 5, true);
  mydisplay.setDigit(0, 5, 4, false);
  mydisplay.setDigit(0, 6, 3, false);
  mydisplay.setDigit(0, 7, 2, false);
}
 
void loop()
{
  val = analogRead(analogPin1);    
  int converted = map(val, 0, 1023, 0,5000);  
  
  converted = HexToBCD(converted);
 
  mydisplay.setDigit(0, 0, ((converted>>12)&0x0F), false);
  mydisplay.setDigit(0, 1, ((converted>>8)&0x0F), true);
  mydisplay.setDigit(0, 2, ((converted>>4)&0x0F), false);
  mydisplay.setDigit(0, 3, (converted&0x0F), false);
  
 
 
            
                  
  delay(1000);      
}
unsigned int HexToBCD(unsigned int number)
{
    unsigned char i=0;
    unsigned int k = 0;
 
    while(number)
    {
        k = ( k ) | ((number%10) << i*4);
        number = number / 10;
        i++;
    }
 
    return(k);
}

There is a simple method to measure the voltage as well in case if you want to measure the voltage from 0-30V. You can simply use a Resistive Voltage Sensor with Arduino Board.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleInterfacing RGB LED Strip with Arduino with Fade & Color Effect
Next Article Temperature to Voltage Converter using Thermistor & 741

Related Posts

DC Energy Meter using Arduino

Build a DC Energy Meter using Arduino – 32V/5A

Updated:August 26, 20252K
Interfacing ADXL375 Accelerometer with Arduino

Interfacing ADXL375 Accelerometer with Arduino (±200g)

Updated:June 28, 2025
PZEM-004T Arduino Energy Meter

DIY AC Energy Meter using PZEM-004T & Arduino

Updated:March 6, 20258K
Interfacing BMI160 Accelerometer & Gyroscope with Arduino

Interfacing BMI160 Accelerometer & Gyroscope with Arduino

Updated:February 2, 20259K
Password Based Door Lock Security System Using Arduino & Keypad

Password Based Door Lock Security System Using Arduino & Keypad

Updated:February 2, 20252436K
Earthquake Detector Alarm with with Accelerometer & Arduino

Earthquake Detector Alarm with Accelerometer & Arduino

Updated:February 2, 2025661K
Add A Comment

CommentsCancel reply

Latest Posts
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

May 31, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

May 10, 2026
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

May 2, 2026
A Guide to Sourcing Obsolete ICs for Vintage Projects

Beyond AliExpress: A Guide to Sourcing Obsolete ICs for Vintage Projects

April 21, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

April 27, 2026
Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

February 26, 2026
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

April 27, 2026
DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

February 1, 2026
Top Posts & Pages
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • IoT Based Drinking Water Quality Monitoring with ESP32
    IoT Based Drinking Water Quality Monitoring with ESP32
  • LD2410 Sensor with ESP32 - Human Presence Detection
    LD2410 Sensor with ESP32 - Human Presence Detection
  • ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
    ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
  • DIY IoT Water pH Meter using pH Sensor & ESP32
    DIY IoT Water pH Meter using pH Sensor & ESP32
  • Buck Converter: Basics, Working, Design & Application
    Buck Converter: Basics, Working, Design & Application
  • How to use Modbus RTU with ESP32 to read Sensor Data
    How to use Modbus RTU with ESP32 to read Sensor Data
Categories
  • Arduino Projects (197)
  • Articles (60)
    • Learn Electronics (19)
    • Product Review (15)
    • Tech Articles (28)
  • Electronics Circuits (46)
    • 555 Timer Projects (21)
    • Op-Amp Circuits (7)
    • Power Electronics (13)
  • IoT Projects (204)
    • ESP32 MicroPython (7)
    • ESP32 Projects (81)
    • ESP32-CAM Projects (15)
    • ESP8266 Projects (76)
    • LoRa/LoRaWAN Projects (22)
  • Microcontrollers (38)
    • AMB82-Mini IoT AI Camera (4)
    • BLE Projects (18)
    • STM32 Projects (19)
  • Raspberry Pi (93)
    • Raspberry Pi Pico Projects (57)
    • Raspberry Pi Pico W Projects (12)
    • Raspberry Pi Projects (24)
Follow Us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
About Us

“‘How to Electronics’ is a vibrant community for electronics enthusiasts and professionals. We deliver latest insights in areas such as Embedded Systems, Power Electronics, AI, IoT, and Robotics. Our goal is to stimulate innovation and provide practical solutions for students, organizations, and industries. Join us to transform learning into a joyful journey of discovery and innovation.

Copyright © How To Electronics. All rights reserved.
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Looks like you're using an ad blocker. Please allow ads on our site. We rely on advertising to help fund our site.