All about power today.. For a while now, I’ve been looking around for a mains (220-240VAC) power monitoring circuit that I might be able to interface with an Arduino. There is of course the OpenEnergyMonitor solution, but they seem to use a transformer to isolate and measure the mains voltage. The transformer doesn’t exactly couple to the mains nicely: so the voltage on the secondary side is not a scaled voltage of the input side, the transformer itself will distort the voltage sine wave.

Then over the weekend I came across Dave Berkeley’s Project Page, and he has a cool design for mains power usage monitor that does measure the line voltage directly. His Home Energy Monitor uses a dual channel ADC with opto-isolation, nice solution. There is loads of info over at his site, I’ve just changed a few little parts for my version. He uses a 10bit ADC [MPC2003] which I couldn’t get from RS, they were showing back order on the part, so I had a dig around and came up with a 12bit version of the same chip [MPC3202] just have to watch the conversion time, it’s not 200ksps but 100ksps, but I don’t see it being a problem (famous last words!).

So started up KiCAD and got work, then on to RS to get the parts! If you like a PDF of the circuit diagram here you go: Mains Power Monitor Circuit Diagram (rev 1.0)

Initial circuit diagram for my power meter

On Dave’s circuit he has a voltage divider that I couldn’t make sense of, it looks like he has 100K current limiting resisters on the two input lines and a divider made up from one of these and a 270R. The simulation on this only gave a 2.08 -> 2.92 volt swing on the ADC, given a 311V peek to peek AC input [which is 220VAC * sqt(2)]. I’ve used 1M0 on the current limiting and a divider of 1M0 and 10K, which give a little more input to the ADC.

Oregano Simulation on mains voltage divider

I’ve used an op-amp here to semi-simulate the ADC input just to check for any filtering that might be on the ADC front end.

Mains voltage divider – Transient Analysis plot

So there we have it, stay tuned.. Will post the prototyped version soon, parts due in a few days.. Scope at the ready!