Mains AC voltage logging

Hi there,

I'm wanting to make a simple stand alone device to record the mains voltage and store it to memory. I'd like to be able to record the voltage every minute and then be able to download the data at a later stage onto my PC. At this stage i don't need multiple readings and averaging over the minute etc. Just a simple instantaneous reading every 60s.

Any help on where to start? Thoughts on this?

I've only got the Arduino UNO, but I am happy to purchase some memory or even a GSM add-on to transmit the data if that would be easier. Thanks in advance.

It depends on how "instantaneous" you mean.

michinyon: It depends on how "instantaneous" you mean.

very useful michi

Well the mains AC supply is a varying AC waveform. Most people know this, but not everybody.

If it is a 220 volt supply, the actual voltage will vary between -311 and +311 voltages. If you sample it on a very small time scale, you could any number, which would be meaningless. You could do this with a simple resistor voltage divider, if you weren't concerned about blowing yourself up.

You could also try to measure the peak value, and you would get +311 volts.

You could also try to measure the RMS value, which is not entirely simple to do. You could measure the RMS power more easily, but then you have to make assumptions about the power factor.

You could get a 4 digit LED display designed for monitoring mains power, and then try to hack it somehow. There are plenty of these for low voltage on ebay, I have noticed any for A/C but I am sure they exist somewhere.

You could build a tiny transformer, and then rectify the output, and then measure the DC voltage, that might work.

You need to use a Voltage Transformer to step down the mains AC and then rectify it to a DC.

This is exactly how we do things in electricity distribution and metering, 11kV+ uses VT's to bring voltage down to 110V normally, plus CT's to measure current.

I'm not sure what the LV distribution system voltages are there in SA, but you want something that would get you down to at least 12V. You should be able to buy a transformer to do this quite easily. Rectify the output to DC and then use meters to equate your input AC RMS voltage to the output DC voltage. Use a voltage divider to get you down to the 0-5v range for an analog input and then use the product of the Primary AC to Secondary Rectified DC, plus the DIvider network, to give your ratio you need to program into the Arduino.

You'll then have the value that will allow you to scale any analog input to the equivalent RMS AC voltage on the Primary side.

You obviously need to take all necessary precautions with both sides of your design, ensuring you have the correct protective devices designed in.

This is exactly how High Voltage Metering and Protection measurements are taken. The VT and CT ratios are programmed into the meters or relays, so that they then display the Primary side values. I.e VT ratio of 11000/110 and CT ratio of 200:5 would cover an 11kV feeder up to 4MVA. I often test switchgear protection systems at 11kV that will be measuring up to 1600A primary current with 1600:1 CT's and standard 11000/110 VT's.

This might be useful

There are many ways to do it, from the simplest of directly adc'ng the ac signal, to ieee-1057 7-parameter estimation / dft.

You will need to figure out their pros / cons.

How about using one of the digital voltmeters that comes with a built in serial port for logging ?

That should work - i guess

Might cost a little too much

You can use circuit like this "HCPL-7520 linear optoisolator"

Are you looking to measure voltage or wattage?


Interesting project, thanks for the link!

I'd like to be able to log at a reasonably high sample rate, the waveform/voltage of 230vAC. If a predefined voltage range was exceeded (ie brownouts or spikes), then I'd like to write say 100mS of data before and 100mS of data after that event. In other words, I'd like to capture anything other than a clean 230vAC sinewave.

Is there any Arduino sampling hardware that's good enough for this - I'd anticipate that a sample rate of at least 1MHz (ie every 1uS) with at least a 16bit resolution.

Be interested if anyone has played with this area.

you might have guessed that since this thread started in 2013, things have changed.

one thing is the rules of the forum. How to use this forum is a sticky post at the top of every forum.

start a new thread.