Metering and Instrument Circuits

Digital Volt And Amp Meter Circuit Diagram

In the article “Digital Volt & Amp Meter Circuit Diagram” we are going to learn how how to make a digital  volt & amp meter.

Digital Volt & Amp Meter Circuit Diagram
Digital Volt & Amp Meter Circuit Diagram

The circuit uses a single PIC Microchip to perform the Voltage, Current & Temperature conversions & display functions. The PCB Board uses large tracks & can easily be made using the “press-n-peel” method & a hobby drill. Components should be readily available anywhere in the world. Moreover, the hex files are available for the PIC16F877A & the PIC16F887 & the display can either be LCD or LED.

Digital Volt & Amp Meter Circuit Diagram
Digital Volt & Amp Meter Circuit Diagram Schematic

Warnings

There is only one & last warning that don’t attempt to construct this project unless you are sure what you are doing. Nobody else but you can make the decision to construct it & therefore you are solely responsible for what you are doing or not doing with it.

Programming

The PIC Microchip Processor should be programmed before it will function as a Volt & Amp meter. There are many internet sites & PIC programmers that you can use. I used a Microchip MPLAB ICD 2 during the project. You might need to make changes to the circuit to accommodate a different type of programmer, do read the programmers instructions carefully.

Specifications

This circuit relies on the internal analog to digital converter (ADC) of the PIC Microchip Processor. The accuracy depends on scaling the input voltage for the ADC for all three measurements. Here good news is that both the PIC’s which can be used for this project have 10-Bit resolution ADC units which must work adequately in most circumstances.

In order to determine the resolution, a simple to advanced mathematics can be used – I’ll use simple mathematics & present a basic explanation in order for you to get going on the project.

The Voltage of the PSU can be adjusted from 0 – 33V depending on the components in your circuit. The PIC can only measure voltages between 0 – 5V & represent the values measured as a 10bit binary number from 0 – 1024. In order to determine the voltage increment which can be measured one has to divide the scaled input voltage by 1024 & that equals: 33V/1024 = 32.2mV.

Similarly, the current range is 0 – 3A. Which means that we can measure in 3.0/1024 = 2.9mA increments in a near perfect circuit.

Best Voltage resolution at 33.0V – 32.2mV
Best Current resolution at 3.0A – 2.9mA

Features

Either a LED /LCD display can be used:

  • LCD Output has the compatibility with most LCD Displays with a HD44780 drive chip. It was designed for a 2 line x 16 character display
  • 6 x 7 Segment LED Display using Common Anode displays
  • Configuration via RS232 terminal to set Voltage & Current conversion factors
  • Two PIC16F processors are supported, the 16F877A & 16F887 – separate hex files
  • IPSC Connector for Programming the PIC in circuit
  • Separate -12V – 0 – +12V, Power Supply

Schematic Diagrams

Digital Volt & Amp Meter Circuit Diagram
Digital Volt & Amp Meter Circuit Diagram ProcessorSchematic
Digital Volt & Amp Meter Circuit Diagram
Digital Volt & Amp Meter Circuit Diagram LED Display
Digital Volt & Amp Meter Circuit Diagram
Digital Volt & Amp Meter Circuit Diagram PSU Schematic

The power supply requires a small 12-0-12 transformer perhaps not shown on the schematic. The circuit draws around 100mA. I used a 10VA transformer – please adjust the value of the fuse to protect your transformer. The heat sinks had a SK145-25 part number on the packet, I am not sure if it is easily available.

Voltage

R17 & VR1 form a voltage divider as input to the ADC Input of the PIC. As the input voltage changes so, will the output of the Voltage divider on PIN 3 of the PIC. When calibrating the project for use, it is important to remove the PIC from the circuit & adjust the Value of VR1 in such a manner that the output of the Voltage divider is never >5.0V. Failing to do so might damage the PIC.

Current

The current measurement is more complex & involves an Op-Amp configured as an inverting amplifier to provide the input for the PIC. The resistor R7, in the Power Supply circuit is used as a shunt resistor. The small voltage drop across the resistor will vary according to the amount of current a given load will draw from the PSU. In order to measure with greater accuracy, the small voltage drop is amplified using an Op-Amp circuit.

Using the formula for an inverting amplifier the output voltage of the Op Amp can be calculated as follows:

1. The maximum current through R7 maybe 3.0A
2. The voltage drop over R7 = V = I * R = 3.0A * 0.47R = 1.41V
3. Op-Amp output = Vout = -(R12/R16)(Vin) = -(33K/10K)/1.41V = -4.653V. However, the input is a negative voltage & if we negate the answer we should measure close to 4.653V for the maximum load.

Fan Control

For cooling the main heatsink a third channel on the PIC’s ADC is used to measure the temperature and control a small fan. For this purpose a NTC Thermistor with a value of 10K is used. The NTC Thermistor is a device which reduces in resistance as the temperature is increased. The same principal of a voltage divider is used to produce a voltage output which allows the PIC to be used to determine the temperature measurement. The NTC Thermistor is connected in series with a 10K resistor R19 to produce a variable voltage output the PIC will compare to a set point to determine if the fan switches on.

Electrical Setup

It is highly recommended to use IC sockets on the PCB. This will greatly help setting up the project.

Voltage:

Remove all the ICs from the PCB
•Adjust the PSU for the lowest output 0V
•Adjust VR1 to its middle or halfway position
•Connect the Voltage inputs CH1_0V & CH1_IN to the output of the PSU.
•Connect a DVM to the 0V & PIN 3 of the 40 PIN IC socket
•Adjust the output of the PSU & follow the increase & decrease of voltage on the output of the voltage divider
•Adjust the PSU to deliver this maximum output
•Now adjust VR1 to until the DVM measures 5.00V at the maximum output of the PSU

Current:

Remove all the ICs from the PCB
•Connect a dummy load to the PSU, for calibration I used a 12V globe drawing 690mA
•Now connect the DVM to the CH0_0 & CH0_IN connections
•Add & remove the dummy load & note down the increase & decrease in the voltage drop over R7 & the inputs of the Op-Amp. CH0_IN should measure negative in respect to CH0_0.
•Now insert the OP-Amp into the IC socket & apply the power to the processor board from the -12 – 0 – +12V PSU
•The output of the Op-Amp PIN 6, should have a positive voltage with the dummy load connected & should be close to the value calculated as follows:

  • As an example, I will use the 690mA 12V globe.
  • Voltage over R7 = (0.69*0.47) = 0.3243V
  • PIN 6 V (out) = (33K / 10K) * 0.3243V = 1.070V
  • The exact Voltage is not important, as long as it is close to 1.070V & drops to 0V when the dummy load is removed.
    • Ensure the output voltage of the Op-Amp is present at PIN 2 of the 40 PIN IC socket

Temperature:

Connect the power to the processor board from the -12 – 0 – +12V PSU
•Now connect the DVM to Vss (0V) & PIN 5 of the 40 PIN IC socket.
•Heat & Cool the Thermistor & ensure a voltage drop decrease or increase is present on PIN 5.
•There is no adjustment required for the Thermistor.

Software Configuration

The project needs to be calibrated before use & the following instructions should be followed carefully. A software terminal emulator is required & I suggest RealTerm available from (realterm.sourceforge.net ) . Please do not use Hyperterminal – it does not work for this project.

A null-modem cable is required to ensure correct handshaking & the pin-outs are as follows:

Digital Volt & Amp Meter Circuit Diagram

X2 – To project board
X3 – To PC or Terminal

From connector X2 you need to make a Pigtail adapter:

Digital Volt & Amp Meter Circuit DiagramX2 PIN 2 connects to JP7/1
X2 PIN 3 connects to JP7/3
X2 PIN 5 connects to JP7/4 (Vss)

Digital Volt & Amp Meter Circuit Diagram

Port Configuration

Determine the serial communications port you are using & start realterm with the following command line parameters:

realterm.exe baud=9600 port=xx flow=2

or if you are using a different terminal use:

9600, none, 8, 1, rts/cts flow control

  • Enable the setup mode by placing a Jumper on JP5 on the SET position
  • A question mark <?> will show some help with the commands
  • Power up the processor board & you will receive the following messages & follow the example shown:

Digital Volt & Amp Meter Circuit Diagram

Voltage Calibration 

  • Connect the DVM to the output of the PSU & adjust the output to the maximum output voltage e.g. 30.1V
  • Type the command >vlt show

You will see something like the following on the terminal console:

0960 * 01000 = 960000 -> 960mV

The second value <01000> is the value you are interested in & this value may be changed to suite your needs.

      Example:

  • To adjust the display output to 30.1V take the following steps
  • Divide 30.1V by 960 = 0.032533748
  • Multiply the answer by 1,000,000 = 3253
  • Type the comman >vlt set
  • At the prompt enter the value e.g Value >32533
  • Now type the <vlt show> command again to see the result.

Digital Volt & Amp Meter Circuit Diagram

Current Calibration

  • Connect the DVM in series with a small load (e.g. 12V Globe) to the output of the PSU & adjust the output to limit the current value  e.g. 500mA
  • Type the command >amp show

You will see something like the following on the terminal console:

0162 * 01000 = 162000 -> 162mA

The second value <01000> is the value you are interested in & this value may be changed to suite your needs.

  • Example:
  • To adjust the display output to 500mA take the following steps
  • Divide 500 by 162 = 3.086
  • Multiply the answer by 1,000 = 3086
  • Type the command >amp set
  • At the prompt enter the value e.g Value >3086
  • Now type the <amp show> command again to see the result.

Temperature & Fan

  • Type the command >tmp show

You will see something like the following on the terminal console:

 

0395 – 0400 – 0001

 

The first value is the raw ADC value, the second is the temperature set point & the third is the value of the fan timer. You can adjust the set point value to suite the type of NTC Thermistor you are using.

 

  • The fan should be set to “auto” for this setting to work by using the <fan auto> command.
  • The fan will switch on when the ADC value is below the set point & switch off when the ADC value is higher than the set point & the fan timer has reached a pre set value. This will prevent the PIC controlling the temperature of the Thermistor to a pre set value.
[button color=”orange” link=”https://circuit-diagramz.com/simple-digital-led-ammeter-using-icl7107/”]Read>> Simple Digital LED Ammeter Using ICL7107 [/button] Read>> Simple Digital LED Ammeter Using ICL7107 
  • The timer value can not be adjusted – I have used <4096kb> program memory. However a US$69.00 license will remove the memory limitation & enable a future <4096kb> memory to code up to. Any enhancements will have to wait until I can afford the upgrade.

LCD Connection

JPL LCD ATM1602B Connections

RS to RB5 – PIN 38
R/W to RB4 – PIN 37
E to RB3 – PIN 36
DD0 to None
DD1 to None
DD2 to None
DD3 to None
DD4 to RD4 – PIN 22
DD5 to RD5 – PIN 21
DD6 to RD6 – PIN 20
DD7 to RD7 – PIN 19

Parts

 The board may be used in various configurations & some parts are not required when an option is selected.

The PIC16F887 does not require the following parts:


Q7 – 4.0MHz crystal

 

C5, C6 – 22pF Ceramic Dipped Capacitor

 

The LCD Display Option does not require the following parts:

 

R4, R5, R6, R7, R8, R9, R10, R11 – 100R Resistors

 

R1, R2, R3, R13, R14, R15 – 3K3 Resistors

 

Q1, Q2, Q3, Q4, Q5, Q6   – BC557 PNP Transistors

 

LD0, LD1, LD2, LD3, LD4, LD5 – 7 Segment Displays

 

For some parts you need to calculate a value:

R22 – Current limiting resistor value for LCD Backlight

Qty Value Device Parts
1 PIC16F877A/887 PIC Microchip IC1
1 3mm LED LED1 LD6
1 LCD Backlight R 21
1 4.0MHz XTAL/S Q7
1 2K2 Calculate .25W Resistor R 22
6 3K3 .25W Resistor R1, R2, R3, R13, R14, R15
2 10K .25W Resistor R16, R19
1 10K TRIMPOT VR1
1 10uF/35V Elect Cap Radial C4
3 20pF Ceramic C2, C3, C7
2 22pF Ceramic C5, C6
3 100K .25W Resistor R20, R24, R26
8 100R .25W Resistor R4, R5, R6, R7, R8, R9, R10, R11
1 100nF Ceramic C1
1 330K .25W Resistor R 12
2 470K .25W Resistor R17, R18
2 680R .25W Resistor R23, R25
1 BC548B BC548B Q8
6 BC557 BC557 Q1, Q2, Q3, Q4, Q5, Q6
1 DS275 DS275 IC3
1 IPSC 1X5 Socket JP3
1 LCD/LED 1X3 Pin Header JP4
1 SET/RUN 1X3  Pin Header JP5
1 RS232 1X5 Socket JP7
6 SA56-11SRWA Kingbright LD0, LD1, LD2, LD3, LD4, LD5
1 TL081P TL081P IC2
1 Ampron MF11 Thermistor 10K TH1

 

Digital Volt & Amp Meter Circuit Diagram -Photos

Digital Volt & Amp Meter Circuit Diagram Digital Volt & Amp Meter Circuit Diagram Digital Volt & Amp Meter Circuit Diagram Digital Volt & Amp Meter Circuit Diagram Digital Volt & Amp Meter Circuit Diagram

Digital Volt & Amp Meter Circuit Diagram -PCB

Digital Volt & Amp Meter Circuit Diagram Digital Volt & Amp Meter Circuit Diagram Digital Volt & Amp Meter Circuit Diagram Digital Volt & Amp Meter Circuit Diagram Digital Volt & Amp Meter Circuit Diagram

Digital Volt & Amp Meter Circuit Diagram
Digital Volt & Amp Meter Circuit Diagram PCB

 

Tags

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button
Close
Close