Modern Devices Rev P Wind Sensor Mathematics


We are using the subject anemometer with an Arduino Uno and trying to read temperature and especially wind speed. The parts and arduino work like a charm--no problem with libraries, and below is the lines of code we used to calculate the wind speed from the pin reading:

float windMPH = pow((((float)windADunits - 264.0) / 85.6814), 3.36814);
Serial.print(" MPH\t");

One can guess the problem--no datasheet anywhere from Modern Devices, and the wind speed it serial prints is switching back and forth from 7 mph to 1500 mph when we blow on it.

Does anyone here have experience with this part and have a hint at how to change the math on this line to get reasonable readings?? We can play with the numbers on our own, but that yields inconsistent results when we for instance divide everything by 1500 etc....

 float windMPH =  pow((((float)windADunits - 264.0) / 85.6814), 3.36814);

Where did those "magic" numbers come from ?

below is the lines of code

Some of them, anyway.

If the value in windADunits varies in a meaningful way when you manipulate the sensor, then the problem is in the way that you implemented the equation or in the equation itself.

If the value in windADunits does not vary in a meaningful way, the problem isn't the equation or its implementation.

So, what is the problem?

Have you printed the output from the sensors, and windADunits, to verify that you are getting reasonable results?

Here's the link the OP neglected to include: Wind Sensor Rev. P - Low Cost Anemometer | Modern Device

I experimented with an earlier version of that sensor, and it is completely useless.

Your only hope for making any use of it is to have a friend with a fully calibrated, temperature controlled wind tunnel perform a calibration run and work out a mathematical model for the response (plan on a full day or more of work).

Thanks for posting website...that is in fact the part. Investigating today the WindADunits. If we get reasonable values (0-3.3v) from that we will experiment with changing the math. That line of code was taken from the sketch posted on their site based on their "wind tunnel" tests...