PDA

View Full Version : ac 220v measurement with differential amplifier



asifiqbal
- 16th September 2018, 07:24
hello guys,
do anyone has example code of pic basic pro or proton basic for ac 220v measurement with differential amplifier method,
this is reference link for example of design and c code
http://microcontrollerslab.com/ac-voltage-measurement-using-microcontroller/
please help if someone knows thanks

Ioannis
- 24th September 2018, 13:41
1. Be very careful with such circuits. IT CAN KILL YOU INSTANTLY!!!

2. Be very careful with the earth symbol, as it is the low voltage 5V or 12V common point and NOT the Power Line Earth!

3. After the opamp divider you will get about 4.04 Volt max for 240VAC rms line voltage. What is the problem you face? You mean that you cannot make a program with ADC to convert the 4volts to digital and display it?

You have to take into account that the voltage is not rectified by the opamp and the output is still a sinus signal of positive offset. So you have to find the maximum voltage measurement within many samples. The circuit is not exactly a voltmeter rather a detector and incidentally according to the firmware, highest voltage detector (or lowest, or mean or whatever).

Example:



temp var word
line_voltage var word

temp=0

for i=0 to 49
adcin 1,line_voltage
if temp<line_voltage then temp = line_voltage
next i


Now you have the voltage representation in digital value.

What you will do next depends...

Ioannis