Summary of 0-5V LCD volt meter using PIC16F877A
This project demonstrates a simple 0-5V LCD voltmeter using a PIC16F877A microcontroller and an HD44780 display. It reads analog voltage directly via the RA0 pin, utilizing the microcontroller's power supply as a reference. While basic, accuracy can be improved by calibrating software scaling or adding an op-amp to increase input impedance. The design includes an LED for status indication and supports in-circuit programming via ICSP.Parts used in the PIC LCD Volt Meter:
- PIC16F877A Microcontroller
- HD44780 LCD Display
- Op-Amp (for impedance improvement)
- LED Indicator
- ICSP Connector
- 1k Potentiometer (for testing)
- 7805 Voltage Regulator
- Voltage Reference (optional for high accuracy)
So the input range is from 0V to 5V - the maximum source impedance is 2k5 (for testing use a 1k pot). To improve the circuit add an opamp in front to present greater impedance to the circuit under test. The output impedance of the opamp will be low which is a requirement of the PIC analogue input.
Specification
| Voltage range | 0V - 5V |
| Input signal level | TTL |
| Maximum input impedance | 2k5 |
The LCD volt meter uses the microcontroller power supplies as reference voltages and so it is not likely to be very accurate (e.g. a 7805 5V regulator has an accuracy of 5%). You can make it more accurate by setting the scaling value in the software to match the power supply (measuring the supply using a voltmeter) (see Calibration later).
The most accurate way of all will be to use a voltage reference and feed this into RA3 as the positive reference value but this project simply provides a quick and easy way of measuring volts without circuit complexity.
The project mainly shows how to control and setup the software to read an analogue value from the first analogue port RA0.
Note when designing using the analogue inputs its a good idea to start from AN0 as there is only a limited set of ways that more analogue ports can be selected for use (see the chip data sheet - analogue inputs).
PIC lcd volt meter Hardware
You can use any PIC microcontroller that has an ADC and enough memory to hold the program.
The LED is pulsed after every ADC acquisition to indicate that the processor is alive - so you can tell if the software is active.
You can program the PIC in circuit through the ICSP connector.
For more detail: 0-5V LCD volt meter using PIC16F877A
- What is the input voltage range of this project?
The input range is from 0V to 5V. - Can I use any PIC microcontroller for this project?
You can use any PIC microcontroller that has an ADC and enough memory to hold the program. - How do I improve the circuit accuracy regarding input impedance?
Add an op-amp in front to present greater impedance to the circuit under test. - Why might the measurement not be very accurate?
The meter uses the microcontroller power supplies as reference voltages which may have up to 5% error. - What is the best way to make the measurement more accurate?
Set the scaling value in the software to match the actual power supply or use a dedicated voltage reference fed into RA3. - Which analog port should be used first for designing with analog inputs?
It is a good idea to start from AN0 because there are limited ways to select more analog ports. - How does the LED indicate the processor status?
The LED is pulsed after every ADC acquisition to show the software is active. - Can the PIC be programmed without removing it from the circuit?
Yes, you can program the PIC in circuit through the ICSP connector.
Related projects
PIC16F877 Driving LCD in 4-Bit Mode using PIC16F877 with Proteus Simulation
Introduction This microcontroller project shows how a PIC16F877 can drive an LCD display using 4-bit mode inside a Proteus simulation.The project demonstrates...
Programmers & ICSP · PIC16F877AEPE PIC/LCD Demo using PIC16F877 with Proteus Simulation
IntroductionThe EPE PIC/LCD Demo is a classic microcontroller project that demonstrates how a PIC16F877 can fully control a PG12864F graphical LCD.Designed as...
Motors & Robotics · PIC16F877AEfficient Sun-Following Robot: A Solar Tracker with Microcontroller Control
Abstract The impending global challenge of dwindling non-renewable fuel resources underscores the urgency of transitioning towards renewable energy alternatives like solar power....
Meters & Test Instruments · PIC16F688Determine capacitance by measuring the charging time using PIC16F688
When TEST botton is pressed, RA3 pin is set to "1". R2 and R3 are divide the voltage to 1/2 Vra3 which...
Meters & Test InstrumentsFrequency Meter Using Microcontroller
This tutorial simply states how to calculate frequency of a pulse source using a microcontroller. Story https://youtu.be/NAoj-HLRIro This tutorial simply states how...
Meters & Test Instruments · PIC16F84ADigital thermometer with PIC16F84 circuit
This electronic project is a very simple thermometer that is based on the PIC16F84A microcontroller, designed by Microchip. Why to use a...
