Site icon Microcontroller Based Projects

10Bit 7-Segment Digital Voltmeter 0-24V

10 Bit 7-Segment Digital Voltmeter Featured Image

This is an upgrade to recently published Simple Digital Voltmeter.Few improvements were done to hardware and software.DVM operating range  was slightly increased up to 24 V Max, however the most significant change is that the code now uses full 10 bit of ADC resolution to calculate the voltage being measured allowing 3 Digit result  for 0-9.99 range  and 4 digits for 10.00-24.00 range.  Also  generic  Common Cathode 7-Segments were used as they are widely available and can be purchased on Ebay for example. Operational amplifier LM358 and simple RC low pass filter were added to PIC analog input AN1 (Channel 1) to improve circuit stability. Only a simple calibration is needed. Connect 5V to the input, calibrate R1 to display 5.00 V. See attached picture comparing  measurement to Fluke 87 V. Prototype has good accuracy if calibrated correctly.

PIC16F877A was used again for this design as other PIC models were not available during development stage. If this project will generate enough interest I’ll modify the schematic/code to work with other microcontrollers. Any PIC with 10 bit ADC and 11 available I/O pins can be configured as DVM.

10 Bit 7-Segment Digital Voltmeter Schematic

Basically now 10 bits of ADC are multiplied by 4 to achieve 4096 V reading as a full scale and again by 8 to offset constant resistor 1:8 Voltage Divider at the input. Next the result is converted to unpacked BCD digits and sent to 7-Segment Display. Due to second multiplication by 8 the last digit is not displayed but can be easily recovered if needed. In order to get a good measuring result pay attention to power supply especially to filtering capacitors connected to voltage regulator like 7805 or LM317. The fact that voltage regulator is used doesn’t necessary mean that you have a stable and low noise power. 22 uF tantalum capacitors were used at input/output of 7805. More information on the next page.

10 Bit 7-Segment Digital Voltmeter Prototype Board

Tip for using Generic 7-Segment: Usually datasheet for generic parts can be difficult to find. For this project we need to know where the segment inputs are located. This can be done by using a Diode DVM function. Just connect one of DVM  wires to arbitrary chosen 7-Segment pin and cycle through remaining pins until the segment is ON. Do it for additional few segments and you’ll know where the Common and individual pins are located. Max voltage reading  test was done with DC Power Supply. Voltage above 24 V will not be displayed correctly.


As future improvement auto range capability  can be added. Constant resistor divider can be replaced by a digital switch like CD4066 to select required division: 1:2, 1:4, 1:16, 1:32. In this case 4 digit full scale can be used for lower 2 ranges as long as the LSB digit is giving you a stable reading.Assembly code can be downloaded here. More advanced version of this project is available here.

Exit mobile version