I need to compute the frequency components of a given analog signal using the FFT/DFT algorithm which has to be intefaced using Arduino. The analog signal will be generated using a frequency generator.
The processing time for 1 cycle needs to be 20 ms ( assuming frequency = 50 Hz). Preferably, any window algorithm should also be implemented.
How do I go about this project? Please, help me out.
You might find it easier to meet the performance targets if you just use the Arduino to read the analog input, and send the data up to a computer to do the frequency domain stuff.
PeterH:
You might find it easier to meet the performance targets if you just use the Arduino to read the analog input, and send the data up to a computer to do the frequency domain stuff.
Peter is saying, that if you need to do a lot of processing on the data, that it may be quicker to send the data to the PC (e.g. via serial) and get the PC to do the FFT or whatever you want to do.
I think it really depends on what processing you need to do, as Serial is not very fast (e.g. 115200 is around 10k bytes per sec). I guess Ethernet via SPI may be a bit faster.
BTW. You've not really defined the parameters of what you are sampling and at what rate and how big the FFT window needs to be etc etc.
You're implying that you are doing FFT on a 50HZ signal, but I suspect that's not what you mean.
What is the max frequency that you are trying to resolve, i.e multiply that by at least 10 will give you your sample rate, and then you can determine even whether its possible to sample the data.
This sort of question seems to get asked all the time on this forum, and the answer is normally that unless the frequencies you are sampling are in the audible range and you only want to do a simple FFT, then the Arduino is not the platform for you.
In which case... consider faster hardware or FPGA.