Simple digital voltmeter can be built by using PIC microcontroller and a few discrete components. PIC16F877A 10 bit ADC module was used for this purpose, we’ll work only with 8 upper bits to translate input voltage to digital form and send it to LED display. Hardware of this design is very similar to digital clock project hardware (minimal changes required). Only SW4 was implemented for display test. SW 3, 2,1 still in the schematic but were not used for DVM.
Analog voltage is connected to AN1 (Pin 3) through simple voltage divider for 1:10 attenuation. With 8 bits of data the Max reading after ADC will be 255 – all bits are “1”.In order to display the result this number should be separated into individual digits: 100’s,10’s,1’s – this is done by subtracting 100’s from the result and incrementing the 100’s counter. Next we move to 10’s and 1’s.Hex and assembly files can be downloaded at the bottom of the page. The only adjustment needed is for R1.Aplly 5 V DC to voltage divider input and tune R1 till you get 0.5 V in analog input (Pin 3).LTC3710HR data sheet can be found here. If LTC3710HR is not available as with previous project the schematic can be easily modified for different 7-Segment Displays. Just map out PIC output pins with each segment and connect in parallel all digit segments (make sure that less than 25mA required for each segment).I would also recommend looking at 7-Segment Display with SPI post for related multiplexing routine. Input voltage range for this version is 0 – 25 V DC. DVM circuit was tested with couple of 9v batteries and the result seems to be promising.
Same battery was measured with UNI-T UT71D as you can see the measurements are close. Compared to a real DVM there is a small offset of about 0.1v.In order to improve the accuracy a more precise resistors can be used for voltage divider and instead of using circuit VDD as voltage reference for A/D converter a more stable source should be built. Hex and Assembly files are available here. You may also be interested in a more advanced DVM version available here.