|
|
View previous topic :: View next topic |
Author |
Message |
eabir
Joined: 16 Aug 2010 Posts: 19
|
FFT for L3GD20 Gyro |
Posted: Thu Mar 13, 2014 5:16 am |
|
|
Hello,
Assume using CCS fft.h :
I would like to sample an axis of the L3GD20 Gyro and output the fft result.
My question is: what is the sample rate Fs which i should use,(then i can calculate each frequency range for each bin by Fs/(2*N).)
In the L3GD20 datasheet there is 'ODR' = Digital output data rate, is it the Fs i'm looking for?
Thanks |
|
|
RF_Developer
Joined: 07 Feb 2011 Posts: 839
|
|
Posted: Thu Mar 13, 2014 9:01 am |
|
|
Yes. With any device that samples data for you at a constant rate, it determines the sample rate. With any device that has an analogue signal that you sample in your own ADC, you decide what rate to sample at, but PICs are not very good at precise, regular sampling.
Also the sensor may sample all three axes simultaneously, which PICs can't do by themselves.
So, you have to set up the sensor to sample at the rate that best suits your application. The FFT range will be half the sample rate. By the looks of it, the sensor has the filters to avoid aliasing built-in, which is also something the PIC can't really do.
Most PICs are not well suited to FFT analysis, even more so with floating point FFTs. Nost have very limited data memory, are slow and have few adaptions for DSP work, such as single instruction 16bit multiply/accumulate, DMA for memory to memory data transfer, and flexible address stepping for interleaved data access such as required for FFTs, barrel shifter etc. Of course the dsPICs are targeted at such applications, and presumably should have such things. I don't know for sure as I've never used one. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|