120 VAC measurement

Status
Not open for further replies.

Thread Starter

cackharot

Joined Feb 2, 2011
13
Hi,

I need to measure only voltage at 120VAC/50Hz power line using micro-controller built in ADC 12-bit whose input rage is 0-2.56V. I have a rough idea of using a resistive/capacitive divider circuit to lower the 120VAC to 2VAC. But what i really don't understand is whether the output of divider network will swing between -2 to 2 VAC or 0-2VAC. If so do i need to level shift it using a 2VDC or use a Diode to remove the negative swing.

Requirements:

Should be accurate +-0.2V

I'll be calculating the RMS value in the microcontroller and transmit it to PC via RS232. The sampling frequency is 400Hz.
 

Kermit2

Joined Feb 5, 2010
4,162
You need to rectify the AC voltage first. I would also consider using a 'peak detector' circuit to obtain the high level of the rectified AC.

THEN you can use a voltage divider to get the required ADC input range.

Since you are working with rectified AC, you will be seeing only one polarity of the AC waveform. It will also have identical peaks in the opposite polarity. You will need to multiply your peak reading by two in order to get the positive and negative(peak to peak) value of the AC signal.
 

beenthere

Joined Apr 20, 2004
15,819
You need to rectify the AC voltage first.
Not at all - you must reduce the AC voltage with a transformer to isolate the circuit from the line. Otherwise, what you have is a lethal shock hazard, and one that will probably destroy the microprocessor when attached, as the uC will have a properly grounded DC source.

Proper galvanic isolation is necessary when working with line voltage.
 

be80be

Joined Jul 5, 2008
2,072
I would do it like this but be real careful with the mains side
And use 1/2 watt resistors


Moderator's note - that circuit was utterly unsafe and has been edited.
 
Last edited by a moderator:

beenthere

Joined Apr 20, 2004
15,819
I suppose threads like this will have to be closed, as too many members do not get the message that we only consider circuits isolated from the line.
 
Last edited:
Status
Not open for further replies.
Top