# Design of AC measurement circuit

I posted a question earlier,

How to measure AC voltage without a voltage divider using microcontroller

and I got some very useful answers, one of those was to implement this for isolation

http://www.edn.com/design/test-and-measurement/4344950/Optocoupler-simplifies-power-line-monitoring

I am having trouble understanding the circuit in the link above, so I need a help.

I dont understand why is a 3.3V reference used here at both the isolated and non isolated side of the circuit? The 5V is for the opamp which I totally get but why 3.3V and also with what ratio should R1 be changed to cater 220VAC? How are the gain values calculated here?

The 3.3V reference for the first op-amp IC1 is used to create a 2.5V offset, so the AC voltage centered at 0v ± 2.5V is converted to a voltage centered at 2.5V ± 2.5V, i.e. a range of 0-5V since the TLC2272 is a single supply op-amp, and can't generate a negative voltage from the negative half-cycle of the input.

As the description says, "Resistor R2 adds a dc offset current to allow for both polarities in VIN."

The top LED in IC2 is lit during the positive half of the cycle, and the bottom LED is lit during the negative half.

The two pots connected to IC3 are used to adjust the gain and provide an offset so the AC voltage centered at 2.5V ± 2.5V with a range of 0-5V.

Note the description in the second paragraph says, "Variable resistor VR2 trims the overall gain, and VR1 adjusts the output-voltage offset, which is nominally 2.5V."

I agree with Kevin that it's not obvious why the second 3.3V regulator is really needed, unless the designer is trying to keep the reference separate from the supply to the op-amps. But then they are using 5V to bias pin 2 of IC2.

It's also odd (IMO) that there are no bypass caps (e.g. 0.1 µF) shown for either op-amp supply. I always use bypass caps on any IC, whether digital of analog.

• Gee thanks. But what about the input side? Why do we need it there? – alexhilton Oct 12 '15 at 18:51
• @alexhilton Same thing. Again from the description, "Resistor R2 adds a dc offset current to allow for both polarities in VIN.". Apparently a variable resistor is needed to trim this value, standard tolerance (1%) resistors are good enough. – tcrosley Oct 12 '15 at 18:56
• We are already trimming down 110VAC with the input voltage divider, why set another reference? – alexhilton Oct 12 '15 at 18:57
• @alexhilton It has nothing to do with trimming -- the TLC2272 is a single supply op-amp, and can't generate a negative voltage from the negative half-cycle of the input. – tcrosley Oct 12 '15 at 19:21
• In my second comment, I said "Apparently a variable resistor is needed to trim this value, standard tolerance (1%) resistors are good enough." Should have been, "Apparently a variable resistor is not needed to trim this value, standard tolerance (1%) resistors are good enough." – tcrosley Oct 12 '15 at 19:46

I agree it seems arbitrary why it uses the 3.3V reference rather than the 5V supply as a reference. Either could be used with appropriate changes in R2 and VR1.

Since the attenuator for R1 and the 2.4k is so large you can just scale R1 with the input voltage so 220V would require 480K resistor.

Be careful about the choice of component for R1 as it will have 220V across it - I would use two 1/2 watt resistors in series for safety reason.

• Why use a reference at all? That is my question, and if I want a microcontroller to read these DC values I will need 5V, what do I do in that case, its set for 2.5V! – alexhilton Oct 12 '15 at 19:04
• As tcrosley mentions, the reference is needed to offset the AC input voltage (with a zero average) to a suitable level for the single supply amplifier to deal with. The final output is AC not DC. It needs to be approximately centered on the supply to optimize dynamic range. If you take the peak to peak (or RMS) level in the micro controller then the absolute value of the reference is not critical. – Kevin White Oct 12 '15 at 19:19