Hi
I need to use the Acs712 to measure the current of 220v ( PWM).
I have crossed this article:
https://www.baldengineer.com/measure-pwm-current.html
This tutorial explains how to measure PWM current and voltage, using a Modified Moving Average (MMA) algorithm.
----------------------
Has anybody implemented this method?
Thanks
Measure PWM Current with a Modified Moving Average
-
- Posts: 47
- http://meble-kuchenne.info.pl
- Joined: Wed Jul 12, 2023 7:09 am
- Has thanked: 7 times
- Been thanked: 12 times
-
- Matrix Staff
- Posts: 1952
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 510 times
- Been thanked: 698 times
Re: Measure PWM Current with a Modified Moving Average
Hello,
There is a running average component in Flowcode 10 already, You may need to do a full library update to get these if you don't have them already.
It's not quite the same as MMA in that it takes a percentage of the filtered value and a percentage of the new sensor value. e.g. 90% old + 10% new. I tend to use this a lot in the various applications I put together.
I'll see if we can also add a MMA filter for you as that would also be handy.
There is a running average component in Flowcode 10 already, You may need to do a full library update to get these if you don't have them already.
It's not quite the same as MMA in that it takes a percentage of the filtered value and a percentage of the new sensor value. e.g. 90% old + 10% new. I tend to use this a lot in the various applications I put together.
I'll see if we can also add a MMA filter for you as that would also be handy.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Matrix Staff
- Posts: 1952
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 510 times
- Been thanked: 698 times
Re: Measure PWM Current with a Modified Moving Average
I've now added a floating point version of the MMA filter, let us know how you get on with using it.
I'll try and find some time later today to also do an integer version. Edit - this is now there too.
I'll try and find some time later today to also do an integer version. Edit - this is now there too.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel