AC Voltage measurement using PIC16F877A microcontroller
AC voltage measurement using pic microcontroller and op-amp.You have came across many online tutorials on various websites about voltage measurement using different microcontrollers. But all these tutorials are about measurement of low DC voltage.In this project, you will learn how to measure high AC voltage using PIC16f877A micrcontroller.
Page Contents [hide]
- 1 Alternating voltage measurement :
- 1.1 Difference Amplifier:
- 1.2 Video lecture on AC voltmeter design
- 1.3 COMPLETE CIRCUIT DIAGRAM:
- 1.4 AC voltage measurement code
- 1.5 Second method to measure AC voltage
- 1.6 Simulation result of how to measure ac voltage project:
- 1.7 List of components :
- 1.8 Program for how to measure AC voltage using pic microcontroller:
Alternating voltage measurement :
To measure 220V AC, you need to step down this voltage. Because microcontrollers can’t measure voltage greater than 5V. If you give voltage more than 5V to the analog input of microcontroller, it will get damage permanently. To assure protection of microcontroller, you will need to step down 220 volt AC into AC voltage whose peak value should be less than 5V. For example , 220V AV mean RMS voltage and its peak value is equal to 311 volt. similarly you have to step down high AC voltage of in such a way that its peak value should not be greater than 5 volt.
There are two methods to step down 220 alternating voltage into low alternating voltage which peak value should not be greater than 5 volt.
- Potential Transformer ( All Electrical Engineering students must know about P.T and its use)
- Difference amplifier ( I will discuss difference amplifier method in this project.)
Potential Transformer can also be used to step down 220 Alternation voltage.But why you want to spend more money? when you can do this with the help of cheap operational amplifiers and few resistors. Difference amplifier method is more economical than potential Transformer when you want to step down voltage less than 400 volt AC.
NOTE: Difference amplifier method is economical for voltage measurement less than 400 volt. Because above 400 volt, this method become expensive than potential Transformer. There are reasons behind it. I am not going to discuss reasons here.This method is suitable for final year students who want to measure Alternating voltage and current.
Difference amplifier is used to amplify voltage from two voltage levels.In case of Alternating voltage we have two voltage level one is positive with respect to neutral and other is negative with respect to neutral. I will recommend you to Google about difference amplifier and its use.
you can adjust the gain of difference amplifier according to our requirement by selecting proper values of resistors.In this project gain is equal to :
Gain= R8/(R1+ R2+ R3) ;
In Alternating voltage case second voltage level is zero. Because during positive cycle and negative cycle other side is considered zero or neutral. So output voltage will be
vout = gain * Vinput;
In Above picture resistor R1, R2, R3 R4, and R5 have high values which do not allow high voltage to appear across op-amp. Because high input resistors are used that’s why micro ampere current will low and this way power loss will be in mili watts. According to difference amplifier gain formula our gain will be:
For more detail: AC Voltage measurement using PIC16F877A microcontroller
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic – Simulation – PCB Layout – Gerber Viewer
JLCPCB Prototype: Only $2 for 10pcs 10×10cm, 24 hours Quick Turn, DHL Delivery in 3 days
Current Project / Post can also be found using:
- arduino based voltage stabilizer
- High voltage measrmnt using pic microconreiller