Pages: [1]   Go Down
Author Topic: HELP WITH THE LIBRARY FFT  (Read 821 times)
0 Members and 1 Guest are viewing this topic.
Loja
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Solo se que nada se
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello world arduino

I'm in a project is to demonstrate and plot the spectral diagram of an analog signal and not to start.???? ..... smiley-cry

First of all I read about arduino Seller FFT and see that is the only option to apply, but my problem is, as I can use it and do not know how?? .... smiley-cry.

I would like some help or some examples of how to use and get the amplitude and phase of each analog signal with this program because I need to extract all the amplitudes and phases of all the harmonics existing one signal and calculate the THD.

Thank you thank you
Logged

Offline Offline
Edison Member
*
Karma: 57
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A link to the library ?
What is your sketch ?

When you also post the question in another language, you could add a link to it.
Logged

Loja
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Solo se que nada se
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm new to programming in arduino

This is the library:

https://code.google.com/p/neuroelec/downloads/detail?name=ffft_Library.zip&can=2&q=

I do not know how to use the code,

I want to acquire analog 6-channel, and the code provided below is valid for 6 analog channels:

ISR(ADC_vect)
{
  if (position >= FFT_N)
    return;
 
  capture[position] = ADC + zero;
  if (capture[position] == -1 || capture[position] == 1)
    capture[position] = 0;

  position++;
}


also
void adcCalb(){
  Serial.println("Start to calc zero");
  long midl = 0;
  // get 2 meashurment at 2 sec
  // on ADC input must be NO SIGNAL!!!
  for (byte i = 0; i < 2; i++)
  {
    position = 0;
    delay(100);
    midl += capture[0];
    delay(900);
  }
  zero = -midl/2;
  Serial.println("Done.");
}


And I do not understand if the prescale is activated for all analog ports, or is necessary to activate for each port.

Thanks you


Logged

Pages: [1]   Go Up
Jump to: