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

Post Reply
User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Measuring AC Mains Voltage (Non-Invasive) help needed

Post by Jordy101091 »

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: 364 times
Been thanked: 716 times
Contact:

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

Post by JohnCrow »

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: 25 times
Been thanked: 188 times
Contact:

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

Post by Jordy101091 »

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: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

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

Post by Brendan »

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

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

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

Post by Jordy101091 »

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: 243
Joined: Tue Nov 27, 2012 12:53 pm
Location: Cambridge, UK
Has thanked: 140 times
Been thanked: 118 times
Contact:

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

Post by Brendan »

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

Post Reply