Académique Documents
Professionnel Documents
Culture Documents
Voltmeter and Ammeter can be easily made using PIC Microcontroller having ADC
(Analog to Digital Converter). I am using PIC16F877A and the result is displayed on
an LCD Display. PIC16F877A is enough if you do this project only for testing purposes.
I suggest to use PIC with low pin numbers and multiplexed 7 segment display if you
wish to use this as your measuring instrument.
If you dont know the basis of PIC ADC and LCD Interfacing please read the following
articles.
ADC module of PIC Microcontroller converts the Signals on its analog pin to 10 bit
binary data and it has software selectable high and low voltage reference input to
some combination of VDD, VSS, RA2 and RA3. The analog input to PIC is limited to
VSS and VDD voltages (0 5V) of PIC.
This circuit is designed to measure 0 to 30V. So we will map 0 to 30V to 0 to 5V by
using a voltage divider. Current through a circuit can be measured by introducing a 1
ohm resistor and measuring the voltage across it. To minimize the path resistance we
will use .47 ohm special resistor with fuse (shown in figure) and current is calculated.
Voltage
and
Current
Sampling
circuit
is
shown
below.
When the Input voltage is 30V (max) the voltage across 20K ohm resistor becomes
5V which is feedback to the analog pin RA2 of the PIC Microcontroller.
i = ADC_Read(3);
V = v*4.89;
I = i*4.89;
By using values V and I we can calculate the Input Voltage and Current across the
Load (Connected across Output terminals).
Voltage across 20K resistor = V
Current through 20K = V/20K
Input Voltage = Current through 20K * 120K
neglected)
Thus,
V = (V/20)*120;
Circuit Diagram
Note: VDD and VSS of the pic microcontroller is not shown in the circuit diagram.
VDD should be connected to +5V and VSS to GND.
You can download the hex file, MikroC source code, Proteus files etc here
Voltmeter and Ammeter using PIC Microcontroller