NRG 40 Anemometer: Using Freqmeasure.h to measure frequency on the arduino mega


trying use nrg 40 anemometer measure wind speed on arduino mega. have signal going through comparator, lm 324, try , convert sinewave square wave using 5v source. i'm using freqmeasure.h's serial output example follows:

code: [select]


/* freqmeasure - example serial output
 * http://www.pjrc.com/teensy/td_libs_freqmeasure.html
 *
 * example code in public domain.
 */
#include <freqmeasure.h>

void setup() {
  serial.begin(57600);
  freqmeasure.begin();
}

double sum=0;
int count=0;

void loop() {
  if (freqmeasure.available()) {
    // average several reading together
    sum = sum + freqmeasure.read();
    count = count + 1;
    if (count > 30) {
      float frequency = freqmeasure.counttofrequency(sum / count);
      serial.println(frequency);
      sum = 0;
      count = 0;
    }
  }
}



does square wave need input pin 49? voltage pk-pk matter? how "perfect" square wave need arduino read it? frequency around 60 hz pk-pk of ~600mv.

there simple equation windspeed frequency in hz variable, need convert voltage sinewave generated anemometer square wave can read arduino mega.

thanks , if i'm missing crucial information please let me know can provide it!!

quote
a pk-pk of ~600mv
that won't work arduino digital input.

not enough information. please read "how use forum" post , follow directions.


Arduino Forum > Using Arduino > Sensors > NRG 40 Anemometer: Using Freqmeasure.h to measure frequency on the arduino mega


arduino

Comments

Popular posts from this blog

Help with codes to add 1 more shift register and add more to matrix LED

tcp client

Is there an HTML component in Flex 2.0?