50Hz Ammeter on PIC16F628A

Use this section to discuss your embedded Flowcode projects.
Post Reply
Sergejs
Posts: 143
http://meble-kuchenne.info.pl
Joined: Tue Oct 19, 2021 9:31 am
Has thanked: 73 times
Been thanked: 5 times

50Hz Ammeter on PIC16F628A

Post by Sergejs »

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.

Sergejs
Posts: 143
Joined: Tue Oct 19, 2021 9:31 am
Has thanked: 73 times
Been thanked: 5 times

Re: 50Hz Ammeter on PIC16F628A

Post by Sergejs »

I put here my project for best understanding.
Ammeter_01.fcfx
(10.74 KiB) Downloaded 81 times

BenR
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

Post by BenR »

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.

Post Reply