Bargraph Voltmeter

A simple bargraph voltmeter can be built using 2×16 LCD or compatible VFD display. For Arduino version click here. This design utilizes PIC16F877 microcontroller and its ADC block to convert 0 – 5V input voltage to a binary number shown as active segments on the display. In this particular design I’ve connected CU16025-UW6J VFD 2×16 Character VFD display to PIC. This display is pin compatible with any standard 2×16 LCD, so if you don’t have it just replace the VFD with HD44780 LCD (14 pin parallel interface) and the circuit should work without any additional modifications. Similar post on interfacing a VFD display can be found here. The code divides the input voltage samples taken from AN1 channel to 16 ranges for each display segment. So switching from one segment to another requires 310 mV change in input signal.
Bargraph-Voltmeter-Prototype-Board
Input voltage can be increased by using a simple resistor voltage divider. Just make sure that a full scale produces 255 in decimal in ADRESH after ADC conversion or the code will behave incorrectly. In some cases you can normalize the converted result by factor of 2 using rotate command (Rotate Left or Right to multiply or divide the number by 2). Here is a design schematic. Assembly source code can be downloaded here.

Bargraph-Voltmeter-Schematic
You can see the voltage bargraph operation in the short video. Analog input AN1 (Pin 3 of PIC) is connected to a variable power supply.

Posted in PIC16F87X Projects
 

Leave a Reply

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

*