HELP WITH VOLTAGE SENSING

Can someone help me explain briefly this diagram of a voltage sensing circuit?

What does the capacitor and the resistors R4 and R5 do in the circuit? What do you call the capacitor and 2 resistors in the diagram?

From what have I read, the capacitor is used for filtering noise and the two resistors R4 and R5 act as a voltage bias to give an output of 2.5v. Am I missing something here?

Please help!

Thanks.

There is no R5

R3 and R4 form a voltage divider, the capacitor decouples the centre of the divider to reduce noise.

Thus say R3 and 4 are the same, the centre voltage is 2.5V, and thus you subtract 2.5 from the measured voltage to give a range of -2.5V to +2.5V.

Note that is it crucial that the AC source is floating with respect to the Arduino ground for this circuit to work.

There are other ways to do this... A bunch of folk were very helpful when I explored this topic in the past. I found the suggestion of using a capacitor to isolate the AC portion of the power signal to be a great one instead of relying on the voltage divider and capacitor to exert enough bias to keep the signal positive and so on. I never tried out the opto-isolator circuit that was suggested, I can't simulate it on iCircuit and I don't have the time right now to breadboard it. Some day...

As for the circuit I show at the end, you could ignore the schottky diodes and the voltage divider 'tree' at the far right, they are simply there to ensure that even if the circuit gets hit with a 2x over-voltage that the input voltage into the Arduino never exceeds safe limits. Given the 33k resistors on the transformer output, it's unlikely that the current limits of the protection diodes inside the Atmel MCU will ever be taxed beyond capacity, but I like a belt and suspenders approach.

I question even the need to try and measure an AC sine wave voltage, even when biased to fit into the 0-+5vdc analog measurement range of an arduino analog input pin. Once you do have this wave form avalible, what would one expect to do with it? What is the application objectives for this signal?

Detecting zero crossings is best done in the digital domain and measurement of peak or average AC voltage is better done with prior rectification and filtering and then measuring as a DC voltage. The 328p is rather limited to what it can perform in the AC DSP type applications and can't envision too many practical examples of handling sine wave analysis in a arduino sketch?

Lefty

Not sure I agree if the objective is to measure power consumption, for example. The open energy monitor that promoted the design published here by te OP achieves accuracy within less than 1% by my limited measurements.

I have yet to calibrate using the yokogawa wt210 at work, however.

Constantin: Not sure I agree if the objective is to measure power consumption, for example. The open energy monitor that promoted the design published here by te OP achieves accuracy within less than 1% by my limited measurements.

I have yet to calibrate using the yokogawa wt210 at work, however.

OK, lets talk about it. If power consumption measurement is the objective why would one be interested in the instantaneous voltage values of a sine wave anywhere in it's 0-360 degree. AC Power RMS values are based on the RMS voltage value of the complete AC voltage sine-wave cycles. Most all digital volt meters convert the AC voltage to an equivalent DC voltage that is proportional to the AC voltage, they don't do conversion voltage measurements of every degree of the AC voltage sine-wave. Unless one is trying to measure equivalent RMS power of a AC voltage that is a non-sine-wave in nature then I don't see any benefit and only complexity of trying to track and measure instantaneous AC voltage values?

Excellent point, as always. So, use a full wave bridge rectifier after a transformer to start measuring a DC-only signal? Do the diodes introduce some sort of distortion? I have to admit that I followed in the footsteps of the open energy monitor project to simplify things for me.

I wonder then why the open energy monitor folk made life harder on themselves instead of using the rms approach.