Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Anemometor - inductor measurement

Status
Not open for further replies.
Once you know the variables of what you have, as in how many pulses per unit and if the pulses are linear then you just remove the // from the lower lines and fill in the math functions. If you want to get fancy have the output display things like wind velocity in kilometers per hour as well as miles per hour. Heck, using an Arduino you can also toss in ambient temperature. :) Good luck with it. Just remember the final lines need to be setup.

Ron

Hi again, I was doing some measurments and noticed a problem, on the attached photo is the output from the arduino, I have a big fan and was counting a good wind meter I have and according to that I was calibrating mine, but as you can see at the photo the 4.42 mph is the correct measurment but without moving it ( I have it steady and same distance, not moving it) every some time it goes to 2.94 mph. Attached the code as well. Do you know why?

Code:

#define mph_var 2.23
#define kph_var 3.6

double windRate, ms, Mph, Kph; //This is the value we intend to calculate.
volatile int count; //This integer needs to be set as volatile to ensure it updates correctly during the interrupt process.

void setup() {
attachInterrupt(0, Wind, RISING); //Configures interrupt 0 (pin 2 on the Arduino Uno) to run the function "Wind"
Serial.begin(9600); //Start Serial
}
void loop() {
count = 0; // Reset the counter so we start counting from 0 again
interrupts(); //Enables interrupts on the Arduino
delay (100); //Wait
noInterrupts(); //Disable the interrupts on the Arduino

//Start the math Calculate for mph or kph or both
windRate = (count * 11.00) * 60; //Take counted pulses in the last second and multiply by 5.0 and then convert it to minutes
windRate = windRate / 1000; //Convert windrate, giving you Velocity/ Hour

ms = windRate;
Mph = ms * mph_var;
Kph = ms * kph_var;

// Serial.println(count); //Print the variable windRate to Serial
Serial.print("m/s: ");
Serial.print(ms);
Serial.print("\t");
Serial.print("mph: ");
Serial.print(Mph);
Serial.print("\t");
Serial.print("km/h: ");
Serial.println(Kph);
}

void Wind()
{
count++; //Every time this function is called, increment "count" by 1
}
 

Attachments

  • Capture.JPG
    Capture.JPG
    126.1 KB · Views: 69
Hi, something else as well, I blow on the fan and I have the measurements attached. So, when I blow on the fan I count the rising so the count is 1-2-3-4-5-6 etc. How can I make it measure more accurate on mph because the output I take for 1 pulse is 1.47 for 2 is 2.94 etc, how can I make it more precise ramp?
 

Attachments

  • Capture.JPG
    Capture.JPG
    66.6 KB · Views: 81
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top