FFT proof of concept
Moderators: violet, jeremy882, crail.lyu969
Re: FFT proof of concept
The assember routines from Embedded Signals are available for different compilers (Keil, IAR, GCC). The attached zipfile contains them all. The second letter (k, i or g) of the filename determines the compiler (Keil, IAR, GCC).
 Attachments

 FFT128real32.zip
 (25.84 KiB) Downloaded 366 times

 Prekindergarten
 Posts: 3
 Joined: Fri Mar 25, 2011 5:14 pm
 Are you a staff member of seeedstudio?: no
 Which products/projects are your favorite?: DSO nano V2
Re: FFT proof of concept
Hi Paulvvz,
your FFT is really fantastic. I've made some measurements at my highschool with a frequency generator and the results of your FFTROutine were very exactly.
I only had the Problem, that only signals in the area of 2kHz to 60 kHz were able to be measured right. The result for sinuswaves with lower of higher Frequency were that they also should have a peakfrequency at the area of 2 kHz to 60 kHz.
Do you know where the Problem could be? I gave pure SInuswaves with Frequency from 5 Hz to about 500 kHz as an input, but only got a peakfrequency at the kHzarea.
Thank you very much.
Eli
your FFT is really fantastic. I've made some measurements at my highschool with a frequency generator and the results of your FFTROutine were very exactly.
I only had the Problem, that only signals in the area of 2kHz to 60 kHz were able to be measured right. The result for sinuswaves with lower of higher Frequency were that they also should have a peakfrequency at the area of 2 kHz to 60 kHz.
Do you know where the Problem could be? I gave pure SInuswaves with Frequency from 5 Hz to about 500 kHz as an input, but only got a peakfrequency at the kHzarea.
Thank you very much.
Eli
Re: FFT proof of concept
Hi Eli,
a FFT algorithm computes the frequencies of the samples depending on the sample frequency. By changing the TD (time per division), the max frequency of the FFT changes. Try changing the TD to higher sample frequency.
The inherent nature of FFT algorithms is that frequencies above the Nyquist frequency (sample frequency divided by two) will be displayed as a lower frequency. That is the reason that ideally a lowpass filter should be used with a filterfrequency equal to the Nyquist freq.
a FFT algorithm computes the frequencies of the samples depending on the sample frequency. By changing the TD (time per division), the max frequency of the FFT changes. Try changing the TD to higher sample frequency.
The inherent nature of FFT algorithms is that frequencies above the Nyquist frequency (sample frequency divided by two) will be displayed as a lower frequency. That is the reason that ideally a lowpass filter should be used with a filterfrequency equal to the Nyquist freq.

 Prekindergarten
 Posts: 1
 Joined: Wed Jan 11, 2012 4:46 am
 Are you a staff member of seeedstudio?: no
 Which products/projects are your favorite?: DSO Nano
Re: FFT proof of concept
Hello, I tested the firmware that implements the FFT by Paulvvz and I was really impressed. In order to allow inclusion, in future versions, of the FFT calculus using open code, I used the libraries of DSP from ST and the work done by Benf and Paulvvz to also implement an FFT aplication. So, I am posting the code and firmware here. This FFT can operate with 64, 256 or 1024 points. The graph of the frequency is superimposed on the temporal graph, but using a different color. IAR 5.4 was used in the compilation.
Re: FFT proof of concept
Hi wlacerda,
Nice work! Superimposing the FFT with yellow is very well done. This FFT really works great!
Some suggestions for improvement:
 the frequency at the bottom left (nicely in yellow) always displays Hz, but can be also KHz;
 the FFT amplitude varies with input amplitude. Can the value be displayed relative in dB?
And now we wait for someone to integrate this in the latest version or someone who writes a bootlaoder that let the user choose which application to boot. That would be really awesome.
Paul
Nice work! Superimposing the FFT with yellow is very well done. This FFT really works great!
Some suggestions for improvement:
 the frequency at the bottom left (nicely in yellow) always displays Hz, but can be also KHz;
 the FFT amplitude varies with input amplitude. Can the value be displayed relative in dB?
And now we wait for someone to integrate this in the latest version or someone who writes a bootlaoder that let the user choose which application to boot. That would be really awesome.
Paul
Last edited by Paulvvz on Wed Mar 07, 2012 2:37 am, edited 1 time in total.

 Prekindergarten
 Posts: 1
 Joined: Sun Feb 26, 2012 8:48 pm
 Are you a staff member of seeedstudio?: yes
 Which products/projects are your favorite?: DSO Nano v2  DSO Quad
Re: FFT proof of concept
Hello,
This FFT Code is really impressive. I've tested it. But avaliable APP version is 3.11.
Is there any way to porting BenF v3.64 ?
Thanks.
This FFT Code is really impressive. I've tested it. But avaliable APP version is 3.11.
Is there any way to porting BenF v3.64 ?
Thanks.

 Prekindergarten
 Posts: 1
 Joined: Fri Apr 06, 2012 8:02 pm
 Are you a staff member of seeedstudio?: no
 Which products/projects are your favorite?: DSO nano v1
Re: FFT proof of concept
just wanted to say you guys are awesome.
next up, tetris.
next up, tetris.
Re: FFT proof of concept
Hi, I have made this bootloaderPaulvvz wrote:And now we wait for someone to integrate this in the latest version or someone who writes a bootlaoder that let the user choose which application to boot. That would be really awesome.
Paul
I finally got to integrate the free FFT stuff into my git tree (which had the opensource 3.11 + my "infrastructure" fixes to build with gcc and IAR4/5 from common code but not much new features). For now it is in a separate fftrelocated branch at https://gitorious.org/dsonano/dsofirmware . I also intend to merge the later released opensource 3.13 code, which will simplify code relocation (more on that later). I have not pushed it to my master branch yet, awaiting some rebasing to make the merges cleaner.
I think I will post more on the bootloader work in a new thread, but using it for dualbooting Benf and the free FFT version seemed like a good demonstration of it. The boot loader is work in progress and the implementation here to select BenF/FFT is just a hack. Instructions are in the zipfile.
I hope this can encourage more development on the DSO Nano!
Note: This only works with the old USB bootloader, not the new "HEX" filebased bootloader firmware.
Last edited by tormod on Tue Aug 07, 2012 1:49 am, edited 1 time in total.
Re: FFT proof of concept
Hi Tormod,
Great work! This is really a very nice big step for further improvements/extensions. Thanks!
Paul
Great work! This is really a very nice big step for further improvements/extensions. Thanks!
Paul