Hello,
How much samples is need and how much uS time between it to stable read AC current from shunt connected to port of MCU?
Voltage is 230V and net frequency is 50Hz (Eastern Europe). If possible diagram please.
50Hz Ammeter on PIC16F628A
-
- Posts: 143
- http://meble-kuchenne.info.pl
- Joined: Tue Oct 19, 2021 9:31 am
- Has thanked: 73 times
- Been thanked: 5 times
-
- Matrix Staff
- Posts: 1739
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 440 times
- Been thanked: 603 times
Re: 50Hz Ammeter on PIC16F628A
Hello,
It's hard to say without seeing your circuit. Do you have any hardware filtering on the input such as R/C low pass filters.
Best thing might be to hardware filter as much as possible and then run your ADC result through a software median filter followed by a low pass filter and this should give you a fairly stable result.
I would start with playing around with the settings you mentioed to try and get as stable an output as possible and then you can add the additional filters to get a highly stable value.
It's hard to say without seeing your circuit. Do you have any hardware filtering on the input such as R/C low pass filters.
Best thing might be to hardware filter as much as possible and then run your ADC result through a software median filter followed by a low pass filter and this should give you a fairly stable result.
I would start with playing around with the settings you mentioed to try and get as stable an output as possible and then you can add the additional filters to get a highly stable value.
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