Wind Sensor (Rev P) Help

Questions about Modern Device and JeeLabs Sensors
Post Reply
mstrange
Posts: 2
Joined: Wed Dec 23, 2015 7:46 pm

Wind Sensor (Rev P) Help

Post by mstrange » Wed Dec 23, 2015 8:13 pm

Hi,

I am having some issues with the Wind Sensor (Rev P). I am using and Arduino UNO clone (Moteino - ATMega328P). I can read temperature correctly, although I had to adjust the formula in the sketch to 3.3v vs 5.0 that is in the sketch. For wind speed, I am getting values of 11 - 14 MPH in my house. When I blow on the sensor, I get 100+ MPH. Do I need to make a similar adjust for 3.3v for windMPH? If so, where do I do that? If not, any help would be appreciated.
Code Snippet:
int windADunits = analogRead(_A6);
float windMPH = pow((((float)windADunits - 264.0) / 85.6814), 3.36814);

Serial.print("windADUnits:");
Serial.print(windADunits);
Serial.print(" : ");
Serial.print(windMPH);
Serial.println("MPH");

Results:
windADunits:449 : 13.36MPH
windADunits:450 : 13.61MPH
windADunits:450 : 13.61MPH
windADunits:450 : 13.61MPH
windADunits:450 : 13.61MPH
windADunits:451 : 13.86MPH
windADunits:452 : 14.11MPH
windADunits:453 : 14.36MPH
windADunits:452 : 14.11MPH
windADunits:452 : 14.11MPH
windADunits:451 : 13.86MPH
windADunits:445 : 12.41MPH
windADunits:441 : 11.51MPH
windADunits:443 : 11.96MPH
windADunits:442 : 11.74MPH
windADunits:443 : 11.96MPH
windADunits:443 : 11.96MPH

paul
Site Admin
Posts: 702
Joined: Mon May 12, 2008 4:19 pm

Re: Wind Sensor (Rev P) Help

Post by paul » Fri Dec 02, 2016 7:06 pm

mstrange,

Try scaling those windADunits down by 3.3/5.0 and see what you get.

PB

ikebanat
Posts: 1
Joined: Fri May 25, 2018 5:20 am

Re: Wind Sensor (Rev P) Help

Post by ikebanat » Fri May 25, 2018 5:22 am

hello paul it is possible for you to post an example of some code?

paul
Site Admin
Posts: 702
Joined: Mon May 12, 2008 4:19 pm

Re: Wind Sensor (Rev P) Help

Post by paul » Thu May 31, 2018 7:16 pm

mstrange

Here is one formula you can try
WS_MPH = (((Volts – ZeroWind_V) / (3.038517 * (Temp_C ^ 0.115157 ))) / 0.087288 ) ^ 3.009364

you will need to use the pow() function for the exponentials

here is the link with some more tips
https://moderndevice.com/news/calibrati ... egression/

Hope that helps,

Paul

Post Reply