Measuring AC Mains Voltage (Non-Invasive) help needed

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Measuring AC Mains Voltage (Non-Invasive) help needed

Postby Jordy101091 » Thu Apr 25, 2013 9:14 pm

Hi all,

I'm almost finished school, and I want to start a new project.
This project will be a Home Energy Monitor System that allows the user to see how many power the home is consuming and returning to and from the electrical net.
However there is just one ketch with this project and it involves measuring the mains voltage for acquired power calculations.
I have found a website called http://openenergymonitor.org/emon/, on this site they use a non-invasive method of measuring the means voltage using a standard AC/AC adapter.
With this adapter they are scaling the voltage down and providing electrical isolation to the rest of the system.

Image

I have build the above circuit with also a 9VAC adapter and on my scope I'm getting the same values and waveforms so that at least is working ok.

The question I want to ask you is:
What kind of magic do I need to do to get a value that is (almost) equal to the mains voltage, this is the part that I do not understand I I'm hoping that you can help me with this task.
I really can use a push in the wright direction.


PS. Don't worry's about the mains voltage I know what I'm doing, and if it helps I'm make Industrial Electrical Cabinets for a living :wink:
the will to learn, should not be stopped by any price

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 381 times
Been thanked: 716 times
Contact:

Re: Measuring AC Mains Voltage (Non-Invasive) help needed

Postby JohnCrow » Thu Apr 25, 2013 9:56 pm

Hi Jordy

Sounds like an interesting project.
Im sure you will get plenty of support on here

PS. Don't worry's about the mains voltage I know what I'm doing, and if it helps I'm make Industrial Electrical Cabinets for a living

Mains projects are fine as long as that extra bit of care is taken. Keep one hand in your pocket at all times :shock: :D
1 in 10 people understand binary, the other one doesn't !

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: Measuring AC Mains Voltage (Non-Invasive) help needed

Postby Jordy101091 » Thu Apr 25, 2013 10:13 pm

What I do before I'm going to work with mains is taking my trusty fluke and check for mains voltage if the voltage is present turn the main switch off measure again if the mains is gone then you have a safe working place, and even before I start working a check it one more time incase somebody has turn it on agian, so don't worry :)
the will to learn, should not be stopped by any price

Brendan
Posts: 222
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 136 times
Been thanked: 115 times
Contact:

Re: Measuring AC Mains Voltage (Non-Invasive) help needed

Postby Brendan » Sat Apr 27, 2013 1:03 am

Hi Jordy.

First, the isolation circuit is sound, and the relatively high resistance value for R2 should afford adequate protection against mains spikes. Worth mentioning that unregulated transformer supplies employ a bridge rectifier feeding a reservoir capacitor providing a smoothed DC output, and it is the action of the capacitor that largely snubbers high transients when you disconnect the transformer supply. This circuit however has no such capacitor to snubber spikes so don't reduce spike protection (using the input ESD protection diodes) by dropping the value of R2 for any reason.

If I understand the question correctly, you can first calibrate your design for both the current and voltage measurement ADCs. I don't know what you intend to use for current measurement but the following exemplifies end-to-end mains voltage calibration, accounting for all possible circuit tolerances and regardless of ADC resolution...

1. Establish the AC RMS mains input voltage by measuring the transformer input directly with a good digital multimeter.

2. Multiply the mains RMS value by √ 2 to give you the equivalent peak AC value. For example, 230VAC RMS x √ 2 = 325.269 V peak.

3. Establish what the voltage-measuring ADC is giving you by way of a corrected peak digital value - i.e... (ADC MaxValue minus ADC MinValue) ÷ 2 = ADC peak.

You have then established the representative ADC peak value for the corresponding mains peak voltage calculated in '2' above, enabling you to directly correlate peak mains voltage from the ADC. Clearly, multiplying the ADC peak value by the constant 1 ÷ √ 2 will give you the representative RMS value for power calculations generally sufficient for your application.


Expected ADC values are calculable of-course, though component tolerances will need to be reasonably good to ensure consistent accuracy if building a number of units. The above is more of an introductory exercise that will both optimise accuracy and simplify the approach to start off with.


Hopefully this helps.

All the best,

Brendan
These users thanked the author Brendan for the post:
medelec35 (Sat Apr 27, 2013 1:05 am)
Rating: 5%
 

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 27 times
Been thanked: 190 times
Contact:

Re: Measuring AC Mains Voltage (Non-Invasive) help needed

Postby Jordy101091 » Sat Apr 27, 2013 5:26 pm

I really like your reply Brendan,

I will have a go with it and see if a can get some results.
Really appreciate your input.

Regards Jordy
the will to learn, should not be stopped by any price

Brendan
Posts: 222
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 136 times
Been thanked: 115 times
Contact:

Re: Measuring AC Mains Voltage (Non-Invasive) help needed

Postby Brendan » Sat Apr 27, 2013 7:00 pm

You're welcome Jordy, and glad to be of assistance.

Just clicking the 'thanks' icon is usually reward enough :wink:


Good luck with your project,

Brendan
These users thanked the author Brendan for the post:
Jordy101091 (Sun Apr 28, 2013 12:48 am)
Rating: 5%