AC voltage measurement.

Hi, I'm trying to measure AC voltage using arduino. I tried using a transformer in my circuit but the arduino voltage display is not linear with the changes in the input. What should I use in my circuit to measure the changes in the input AC voltage using arduino?

Ralph2694: Hi, I'm trying to measure AC voltage using arduino. I tried using a transformer in my circuit but the arduino voltage display is not linear with the changes in the input. What should I use in my circuit to measure the changes in the input AC voltage using arduino?

What circuit would that be? Are you trying to measure the average voltage(RMS) or the peak to peak voltage(PTP)?

What results did you get with your circuit and code? What code?

Paul

A couple of issues -

First the Arduino can’t directly measure the negative half of the AC voltage. The Arduino can be damaged by negative voltages or by voltages above +5V.

And, you are “sampling” a waveform so the readings will “seem” random. There are several ways of dealing wit this. You can find the peaks and calculate the RMS (if it’s a sine wave, this method will work). You can take readings and calculate RMS, or you can take an average of the absolute values and adjust/calculate RMS (again only if you know it’s a sine wave). Or, you can rectify & filter, measure the DC, take the diode drop into account, and calculate RMS.

What AC voltage level? What circuit are you using? What code?

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :)