Digital AC Energy Measurement Circuit V2, RMS Voltage, RMS Current, Real Power, Power Factor, KWh

Ғылым және технология

Digital AC Energy Measurement Circuit V2, RMS Voltage, RMS Current, Real Power, Power Factor, KWh
======================================
Altium Designer + Legal License (Free): www.altium.com/yt/myvanitar
======================================
Altium 365: www.altium.com/altium-365
======================================
OctoPart: octopart.com
======================================
Article: www.pcbway.com/blog/technolog...
======================================
Gerber/PCB Order: www.pcbway.com/project/sharep...
======================================
Other Videos: bit.ly/2N9OlPa
======================================
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 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! :-)

Пікірлер: 47

  • @bakryzain160
    @bakryzain1609 ай бұрын

    Very cool, thank you... I'm excited for the next project

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    sure!

  • @hp2073
    @hp20739 ай бұрын

    This project is very nice 😊

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    Thank you! Cheers!

  • @ChristieNel
    @ChristieNel9 ай бұрын

    Superb! I use a DC version of that with a high current shunt. I've been wanting to design an AC version and remember saving the IC datasheet from your previous design. Those little OLED screens are superb for the price. I use them everywhere. Though, I2C is really terrible.

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    Thanks. The IC does a nice job for the majority of applications. Here the data rate is low to demonstrate some characters (using I2C), otherwise, the SPI version should be used

  • @ChristieNel

    @ChristieNel

    9 ай бұрын

    @@MyVanitar I have not found a version with the SPI pinout, but that would be my preference. I'm running mine at 400kHz so I get a decent refresh rate and my driver is now pretty robust and does auto-recovery on lockup, but it does consume a lot of MCU processing compared to SPI.

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    I posted the article

  • @avardgah5236
    @avardgah5236Ай бұрын

    Nice video. Thanks bro...❤ Are u from Iran?

  • @MellexLabs
    @MellexLabs9 ай бұрын

    Nice build! How does it measure voltage? Have you considered a galvanic isolation transformer for measuring current? I have used the LEM HX 10P/S2 in one of my projects it uses hall effect and it goes up to 10A + 300% surge current without shunt resistors... its a bit expensive but it allowed me to keep the low voltage components completely isolated from the high voltage side.

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    Check the article for full details. it's published now

  • @neilthompson6713
    @neilthompson67138 ай бұрын

    This is professional work. High quality. Time is well spent to watch this video if the topic is of interest to the viewer. If I had suppliers who could provide this quality analysis and implementation, I would be a most loyal customer. Better yet, if I had employees who could do work like this then I would be both happy and proud. Question: I need to replace a commercial panel-mount meter that has 0.1% accuracy because the meter is physically too big. This posting quotes the accuracy of this design around 0.5 percent. Can the accuracy be improved by changing components or is a new design required?

  • @MyVanitar

    @MyVanitar

    8 ай бұрын

    Thank you very much. Regarding your question, the accuracy depends on the chip or ADC. For this chip, the accuracy is around 0.5%, but 0.1% is possible with a different design. You are welcome to send me an Email (you can find it in the KZread "About" section) and discuss it.

  • @eerrfanshayyestehh2069
    @eerrfanshayyestehh20694 ай бұрын

    👍👍👍👍👍👍👍

  • @orides5976
    @orides59766 ай бұрын

    What a useful and interesting little IC to measure AC power! I´d like to learn how to program this microcontroller as well. I like it because it is powerful and extremely cheap. Can you give some guidance on how to start with it? What software did you use to develop the firmware? Thank you!

  • @MyVanitar

    @MyVanitar

    6 ай бұрын

    Thanks. The MCU is STM32 so I used the STM32 IDE. if you want to build one for yourself, you can order the PCB or assembled board and use the HEX file to program the MCU using an STM32 programmer. if you want to go commercially and need the code or PCB to make modifications for your brand, we should make other steps

  • @orides5976

    @orides5976

    6 ай бұрын

    Thank you for your quick reply! I liked your project very much, but my focus right now is to learn how to program these small STM32 micros. I have some cool projects that the STM32G030F6P6 would fit perfectly.@@MyVanitar

  • @lumivex
    @lumivex3 ай бұрын

    Nice and neat circuit . Can you add over load cut off and when load is remove it will restore back?

  • @MyVanitar

    @MyVanitar

    3 ай бұрын

    if the load is removed, the screen shows zero consumption. for overcurrent detection yes is possible, but it needs some modifications, on this PCB is not possible

  • @rob040
    @rob0409 ай бұрын

    Hi Again. 🙂 Just saw your second version and I'm impressed. Found the HEX file, but not the code. One small remark, this and the previous version has a cosmetic error: kilo isn't with a capital K, it's kWh. Capital K is Kelvin. 😉

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    I can not publish the code for this one because I wrote it myself and spent a fat amount of time on it. for the first version, yes, you should look at the function name in the library, otherwise, names and letters might be different in the text.

  • @rob040

    @rob040

    9 ай бұрын

    Understood, but are you going to adapt it in this version?

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    adapting what? Do you mean adding PF?

  • @rob040

    @rob040

    9 ай бұрын

    Changing KWh into kWh as it should be. I can't do it myself. I understood the PF is already available, correct? I read all the content and watched the video, but the meaning of the four TACT switches is not entirely clear. Can you please explain?

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    two tacts are to calibrate the voltage and the other two to calibrate the current. if you want to have the PF, let me know to give you a different HEX file

  • @neilmorrison2183
    @neilmorrison21839 ай бұрын

    Volts? Amps? Watts? Can it handle a split 240 system like in the US/Canada?

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    This design does the measurements, it's not like UPS. Check the article for full details

  • @ZomB1986
    @ZomB19868 ай бұрын

    When I saw the Hackaday headline, I thought this was for measuring the entire house. I may have been biased because I need an entire-house measuring solution. But with 6W it's not gonna fly.

  • @MyVanitar

    @MyVanitar

    8 ай бұрын

    Why not, You can use it for your entire house. if we assume the maximum current consumption of your house is 20A, then the power dissipation on the shunt is only 0.4W (20*20*0.001R)

  • @MyVanitar

    @MyVanitar

    8 ай бұрын

    if you use four 4 milliohm resistors (=1milliohm), you can increase it even to 12W. please watch the video completely and read the article

  • @oleksii.zagorskyi
    @oleksii.zagorskyi9 ай бұрын

    I'm, but I could not get, where I can see schema of this device?

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    Check the article for full details. it's published now

  • @mohamedashraf3789
    @mohamedashraf37894 ай бұрын

    How much volts and amps can the circuit handle?

  • @MyVanitar

    @MyVanitar

    4 ай бұрын

    This is for the AC line (220V). maximum current depends on the power of the shunt resistor

  • @kamalzinzuvadiya6488
    @kamalzinzuvadiya64889 ай бұрын

    Helllo sir, i have also done one project in that i am also measure vrms Irms and pf but in inductive load pf not shoing correct

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    I don't know about your circuit, but how do you know the true PF value

  • @kamalzinzuvadiya6488

    @kamalzinzuvadiya6488

    9 ай бұрын

    Can you share contact details I will contact you personally. Thank you for response.

  • @MyVanitar

    @MyVanitar

    9 ай бұрын

    before that, I just want to know what was your reference tool to measure the PF for comparison

  • @hieunguyenanh2366
    @hieunguyenanh23668 ай бұрын

    You don't support the code, why can't you find the code related to the kernel button?

  • @MyVanitar

    @MyVanitar

    8 ай бұрын

    for someone who wants to build this for himself, the HEX file is enough.

  • @mohamedashraf3789
    @mohamedashraf37894 ай бұрын

    I want to communicate with you

  • @MyVanitar

    @MyVanitar

    4 ай бұрын

    if you have a question, the best place is to ask is the KZread comments. for business talks please send me an Email

  • @mohamedashraf3789
    @mohamedashraf37894 ай бұрын

    where the Code ?

  • @MyVanitar

    @MyVanitar

    4 ай бұрын

    Did you check the article? You can download the complied HEX

Келесі