Digital AC Energy Measurement Circuit: Voltage, Current, Power, PF, KWh - Page 1
Forum section: electronics / general

author: hesam.moshiri
author_rank: Regular Contributor
timestamp: September 30, 2023, 07:56:43 am
content: Disclaimer: Some parts of this circuit carry dangerous Mains voltage. If you are a beginner, seek guidance from experienced users.Dealing with the 110V/220V AC mains voltage and measuring the AC load parameters are regarded as a challenge for electronic designers, both in circuit design and calculations. The situation becomes more complex when dealing with inductive loads because they cause a phase shift between voltage and current and alter the sine-wave shape of the AC signal (resistive loads do not). The power factor of resistive loads is theoretically equal to 1.In this article/video, I introduce a circuit that can measure AC RMS voltage, RMS current, active power, power factor, and energy consumption (KWh) of the loads. I used a low-cost STM32 Microcontroller and provided four push buttons for initial calibration. The device can independently measure the parameters and display the results on a bright 1.3-inch OLED display. The measurement error rate is around 0.5% or lower.For the schematic and PCB design, I use Altium Designer 23. I shared the PCB project with my colleague for feedback and edits through Altium 365's secure cloud space. The Octopart component search engine proves invaluable for obtaining component information and generating the Bill-of-Materials (BOM). To ensure the production of high-quality fabricated boards, I forwarded the Gerber files to PCBWay. I used the Siglent SDM3045X benchtop multimeter to calibrate the circuit. That’s a quick and easy process.It's a cool device for everyday electronics, so let’s get started! :-)

author: coppice
author_rank: Super Contributor
timestamp: October 07, 2023, 04:56:14 pm
content: Interesting chip. They kept the pin count to the absolute minimum. Most energy measurement chips can't resist adding some bells and whistles, and have at least 16 pins.

author: hesam.moshiri
author_rank: Regular Contributor
timestamp: October 08, 2023, 04:06:19 pm
content: Quote from: coppice on October 07, 2023, 04:56:14 pmYes, communicating with the chip is also relatively easy. other measurement chips (not necessarily better and more accurate) made the job much more complex

author: schmitt trigger
author_rank: Super Contributor
timestamp: October 09, 2023, 03:48:24 pm
content: Very interesting project, thanks for posting.I am quite familiar with Analog Devices' family of AC power meters. This Hiliwi device is certainly cheaper, more compact, and integrates many functions in a simple-to-use package.Although its datasheet is somehow lacking.NOTE: I am not criticizing in any way your project,it is actually very cool!. I am only making a comment that Chinese IC datasheets in general leave information gaps. For instance, what do they mean with the statement "This register is of default" for the Current Parameter REG and Voltage Parameter REG?The datasheet also does not mention the effect of distortion in the computed values.

author: hesam.moshiri
author_rank: Regular Contributor
timestamp: October 16, 2023, 01:12:35 pm
content: Quote from: schmitt trigger on October 09, 2023, 03:48:24 pmNo problem, Yeah, usually Chinese datasheets are sometimes like this however they do a very good job in chip development.