Building your own hardware to measure AC power isn’t a simple task. There’s a number of things to measure, including voltage, current, power, and power factor. The Atmel 90E24 is a single chip solution designed for this exact purpose. Connect a few components, and all the power data is available to a microcontroller over SPI.
[hwstar] built a custom power monitoring board based on this IC. His AC-Emeter will give you all the measurements you’d want, and includes an ESP12 module for data collection and WiFi connectivity. Aside from the Atmel 90E24 device, a high power and low resistance resistor is needed for shunt sense current measurement. An external module is used to convert mains voltage down to 5V to power the board.
Of course, working with mains voltages can be a dangerous endeavour. Fortunately, [hwstar] provides some tips on how to prevent “equipment from being BLOWN UP” along with the open source hardware and firmware.
[via Embedded Lab]