Digital Ammeter circuit using pic microcontroller
Digital Ammeter circuit using pic microcontroller is designed to measure dc current. In this project, you will learn how to measure dc current using pic microcontroller? how to convert current into voltage from using shunt resistor? how to design low resistance shunt resistor using simple wire? How to display current value on LCD. Digital Ammeter using pic microcontroller project is designed to measure DC current. Digital AC Ammeter can also designed using pic microontroller. Digital Ammeter circuit project have many application in electronics, electrical and power electronics projects. Current measurement is also used in microcontroller based projects for over current protection in circuits. Other than these application, it can be used as digital Ammeter circuit for current measurement in electronics experiments.
Circuit diagram of digital Ammeter circuit using pic microcontroller is given below. In this circuit diagram 30 volt dc source is applied to 40ohm load. Current passing through this load is measured with the help of shunt resistor and PIC16F877A microcontroller. Now the question is why we need shunt resistor to measure current?
Why we need shunt resistor?
Microcontrollers or any microcomputer system can not read current directly. Microcontrollers only sense voltage. Microcontrollers logic high and low is also based on voltage level. Therefore microcontrollers do not sense current directly. That is why we need to current into voltage form. Shunt resistor is used to convert current into voltage form. When current passes through shunt resistor, voltage appears across shunt resistor. This voltage can be easily measured with the help of analog to digital converter channel of PIC16F877A microcontroller. This measured voltage value can be converted back into current in programming using ohm’s law formula:
V = IR;
Shunt resistor value is known and voltage is measured with pic microcontroller. So current can be easily calculated by using above Ohm’s law formula.
I = V/R
In this digital ammeter circuit project 0.47 ohm shunt resistor is used. Now you must be wondering how to design this low resistance value resistor? The simplest solution to this problem is to take a piece of wire and makes it few turn. After making few turns, measure its resistance with the help of ohm meter. You can easily design .47 ohm resistor with the help of simple wire. It is a hit and trail method. Keep trying untill you successfully get a value close to .47 ohm. Other option is to used hall effect current sensor which converts current into voltage directly. Magnitude of voltage depends on magnitude of current.
100K ohm resistor at the input of analog to digital converter is used to protect microcontroller from high current. because current always follow a low resistance path. If you don’t use any resistor there, current will start to flow towards microcontroller instead of shunt resistor. It will damage microcontroller permanently.1N4733A zener diode is used to protect microcontroller from over voltage appearing across it. Because voltage more than 5 volt may damage microcontroller permanently. LCD is interfaced with PIC16F877A microcontroller to display current value. If you don’t know how to interface LCD with PIC16F877A microcontroller, check following article first:
Program for digital ammeter circuit using pic microcontroller
Now lets discuss how to write code for digital ammeter using pic microcontroller? program for digital Ammeter is written using Mikro C pro compiler for pic. It is very easy to use to compiler for pic microcontroller. It have large set of libraries which makes microchip microcontroller very easy to use.
For more detail: Digital Ammeter circuit using pic microcontroller
Current Project / Post can also be found using:
- digital ammeter circuit diagram pdf
- programer ammeter circuit
- measure dc current with pic microcontroller
- voltmeter using pic16f877a