Digital Voltmeter using Arduino

Introduction

            7-segment displays are most popular in panel meters, It can show direct numerical value on display, It’s cost is low and display size bigger than LCD’s. Lets interface four digit display, most of the time four digits are enough to display data.

Problem Statement

            We are making a Voltmeter using four digit 7-segment display, for this IC 74HC595 shift register is used instead of 7448 decoder, use of shift register gives few advantages such as you can display sign, few alphabets and control decimal point location.

7-Segment display types and its pin out

7-Segment Display Pin Diagram
7-Segment Display Pin Diagram

Based on the number we want to show on display prepare decoding table

7-segment Decoding
7-segment Decoding

Those segments we want to keep on make 1 and remaining 0.

Number dp G F E D C B A Hex Value
0 0 0 1 1 1 1 1 1 3F
1 0 0 0 0 0 1 1 0 06
2 0 1 0 1 1 0 1 1 5B
3 0 1 0 0 1 1 1 1 4F
4 0 1 1 0 0 1 1 0 66
5 0 1 1 0 1 1 0 1 6D
6 0 1 1 1 1 1 0 1 7D
7 0 0 0 0 0 1 1 1 07
8 0 1 1 1 1 1 1 1 7F
9 0 1 1 0 1 1 1 1 6F

Arduino Connection with 7-Segment Display

            To drive 7-segment display we used 74HC595 as Segment driver, you can use ULN2003 for driving common terminal, If the LED current is more, as we have used 1K Ohm resistor current stays in limit. We used three lines for driving segments and four for common terminal. At a time only one display is in on state.

Digital Voltmeter Circuit Diagram
Digital Voltmeter Circuit Diagram

Arduino Code for Voltmeter using 4-Digit 7-Segment Display

In program we have used TimerOne Library for Display scanning.

Result

            You can observe its output on serial terminal also, the display will show the voltage reading, apply voltage at ADC A0 pin using potentiometer. This code demonstrates how to multiplex multiple displays and concept of 7-segment display.

Leave a Reply

Your email address will not be published. Required fields are marked *