Archive for October 2010

Fast Signal Sampling (Part 1)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 12 In an early post, I described an electronic interface which adjusts the level electret microphones to the level of Arduino’s ADC. We need now to accurately sample the signal, using enough samples to get a nice representation of the captured […]

Sound capture (Part1)

Part 1, 2, 3, 4, 5 On one side we have sound, on the other side we want volts. In between, we need a device which will convert air pressure changes into electrical signal changes: a microphone! The one we will use is of the electret type, nammed after the type of membrane in use. It is small, cheap and […]

Fast Fourier Transform (FFT) (Part 7)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 Those who exercized the library and tried to change the default value from the customizable variables (and most probably the size of both data vectors) probably faced some lockups, inifinite loops or unpredicted operations. In most cases, the answer to these problems lies in the limited size of the arduino memory… Let’s be positive […]

Fast Fourier Transform (FFT) (Part 6)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 PlainFFT is a simple but effective library which contains all the previously described functions for running FFT on vectors of data. Here is the example code from the library files which demonstrates the (pretty easy) use of the FFT. The content of the vectors of interest is printed on completion of each FFT stage […]

Fast Fourier Transform (FFT) (Part 5)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 So far so good, we got our magnitude spectrum. We may now analyze it just like any other spectrum in order to get meaningful information. In our case, we may want to identify the main frequencies from the spectrum. Firstly we will run a peak picking algorithm in order to locate major peaks, and […]

Fast Fourier Transform (FFT) (Part 4)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 Once the FFT algorithm is executed, we get complex values, made of imaginary values and real values. We need to apply some maths in order to convert them in magnitude values. This is quite simply done thanks to the following routine which converts the complex (so as to say rectangular) values into a polar […]

Fast Fourier Transform (FFT) (Part 3)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 FFT stands for fast Fourier Transform. The DFT (Discret Fourier Transform) applies to vectors containing any number of signal samples. But it is sssssssssllllllllllllllllllllllloooooooooooooowwwwwwww due to the repeated number of operation. Computing a DFT of n points takes n^2 arithmetical operations, while an FFT can compute the same result in only n log2(n) operations. […]

Fast Fourier Transform (FFT) (Part 2)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 Here is a recap of the pieces of code that we need in order to convert a wave into a frequency spectrum: Store data in a vector (Double data type) Weigh this data according to one function (default is Rectangle, also known as box car, in other words, no weighing!) Execute the FFT algorithm […]

Fast Fourier Transform (FFT) (Part 1)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 —————————————————————————— Important notice: The huge popularity of PlainDSP (merge of PlainFFT and PlainADC libraries) and the numerous requests for help drove me to think about a convenient solution for all designers, artists, students, professors, R&D people, prototypists who need to understand, experiment, create systems which feature advanced Digital Signal Processing on Arduino. The result of intense […]