1/1

|
how to calculate frequency of a signal using ADC outputsamples
by Unknown on Aug 24, 2006 |
Not available! | ||
|
You can count the number of zero crossings in a known period of
time, hence f=N/T, being N the number of crossings counted and T the amount of time counting. I'm no specialist but maybe that can be a good start. That will only work if you have good zero crossing points which with an ADC you often don't. You can improve matters by filtering the data first if you know the expected operating frequency range and by adding hysterisis to the edge detection. Measuring the number of counts in a time period is only an accurate method if your time period starts and stops on an input edge. If you want to calculate the frequency by making a measurement over a fixed period, say 1 sec, then you can improve on the accuracy by measuring the number of counts and the time period between the last edge and the end of your time period. If tn = the time period between the last edge and the end of time period n Cn = the number of counts in time period n T = length of time period Then Fn = Cn / (T + tn-1 - tn) I use the above in an 8 bit micro to measure frequencies to 0.01Hz resolution with an 1 sec update rate. (There are lots of additional complications if you want to measure frequencies that are lower than 1/T) -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.5/426 - Release Date: 23/08/2006 |
|||
1/1

