Author Topic: Digital AC Energy Measurement Circuit: Voltage, Current, Power, PF, KWh  (Read 7193 times)

0 Members and 1 Guest are viewing this topic.

Offline hesam.moshiriTopic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: se
    • MyVanitar
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! :-)


Offline hesam.moshiriTopic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: se
    • MyVanitar
Re: Digital AC Energy Measurement Circuit: Voltage, Current, Power, PF, KWh
« Reply #1 on: October 05, 2023, 05:50:01 pm »
ac-energy-meter" border="0

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8651
  • Country: gb
Re: Digital AC Energy Measurement Circuit: Voltage, Current, Power, PF, KWh
« Reply #2 on: October 07, 2023, 04:56:14 pm »
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. :)
 

Offline hesam.moshiriTopic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: se
    • MyVanitar
Re: Digital AC Energy Measurement Circuit: Voltage, Current, Power, PF, KWh
« Reply #3 on: October 08, 2023, 04:06:19 pm »
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. :)

Yes, communicating with the chip is also relatively easy. other measurement chips (not necessarily better and more accurate) made the job much more complex

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2223
  • Country: mx
Re: Digital AC Energy Measurement Circuit: Voltage, Current, Power, PF, KWh
« Reply #4 on: October 09, 2023, 03:48:24 pm »
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.

 

Offline hesam.moshiriTopic starter

  • Regular Contributor
  • *
  • Posts: 140
  • Country: se
    • MyVanitar
Re: Digital AC Energy Measurement Circuit: Voltage, Current, Power, PF, KWh
« Reply #5 on: October 16, 2023, 01:12:35 pm »
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.

No problem, Yeah, usually Chinese datasheets are sometimes like this however they do a very good job in chip development.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf