Rev-c Wind sensor help needed

I am currently using the REVC sensor from Modern device to measure the wind speed and temperature for a project.
While using the sensor with an external 5V power supply, I started to get very strange values for both the temperature and the wind speed ( temperatures of about -23C at 25C and wind speeds of about 500m/s when there was no wind ). I made use of the code provided on the website and the issue continued even when I switched from the external power supply to the 5V from the Arduino.

Link to sensor: Wind Sensor Rev. C – Modern Device

code used:

/* Modern Device Wind Sensor Sketch for Rev C Wind Sensor
 This sketch is only valid if the wind sensor if powered from 
 a regulated 5 volt supply. An Arduino or Modern Device BBB, RBBB
 powered from an external power supply should work fine. Powering from
 USB will also work but will be slightly less accurate in our experience.
 
When using an Arduino to power the sensor, an external power supply is better. Most Arduinos have a 
 polyfuse which protects the USB line. This fuse has enough resistance to reduce the voltage
 available to around 4.7 to 4.85 volts, depending on the current draw. 
 
 The sketch uses the on-chip temperature sensing thermistor to compensate the sensor
 for changes in ambient temperature. Because the thermistor is just configured as a
 voltage divider, the voltage will change with supply voltage. This is why the 
 sketch depends upon a regulated five volt supply.
 
 Other calibrations could be developed for different sensor supply voltages, but would require
 gathering data for those alternate voltages, or compensating the ratio.
 
 Hardware Setup: 
 Wind Sensor Signals    Arduino
 GND                    GND
 +V                     5V
 RV                     A1    // modify the definitions below to use other pins
 TMP                    A0    // modify the definitions below to use other pins
 

 Paul Badger 2014
 
 Hardware setup:
 Wind Sensor is powered from a regulated five volt source.
 RV pin and TMP pin are connected to analog innputs.
 
 */


#define analogPinForRV    1   // change to pins you the analog pins are using
#define analogPinForTMP   0

// to calibrate your sensor, put a glass over it, but the sensor should not be
// touching the desktop surface however.
// adjust the zeroWindAdjustment until your sensor reads about zero with the glass over it. 

const float zeroWindAdjustment =  .2; // negative numbers yield smaller wind speeds and vice versa.

int TMP_Therm_ADunits;  //temp termistor value from wind sensor
float RV_Wind_ADunits;    //RV output from wind sensor 
float RV_Wind_Volts;
unsigned long lastMillis;
int TempCtimes100;
float zeroWind_ADunits;
float zeroWind_volts;
float WindSpeed_MPH;

void setup() {

  Serial.begin(57600);   // faster printing to get a bit better throughput on extended info
  // remember to change your serial monitor

  Serial.println("start");
  // put your setup code here, to run once:

  //   Uncomment the three lines below to reset the analog pins A2 & A3
  //   This is code from the Modern Device temp sensor (not required)
  //pinMode(A2, INPUT);        // GND pin      
  //pinMode(A3, INPUT);        // VCC pin
  //digitalWrite(A3, LOW);     // turn off pullups

}

void loop() {


  if (millis() - lastMillis > 200){      // read every 200 ms - printing slows this down further
    
    TMP_Therm_ADunits = analogRead(analogPinForTMP);
    RV_Wind_ADunits = analogRead(analogPinForRV);
    RV_Wind_Volts = (RV_Wind_ADunits *  0.0048828125);

    // these are all derived from regressions from raw data as such they depend on a lot of experimental factors
    // such as accuracy of temp sensors, and voltage at the actual wind sensor, (wire losses) which were unaccouted for.
    TempCtimes100 = (0.005 *((float)TMP_Therm_ADunits * (float)TMP_Therm_ADunits)) - (16.862 * (float)TMP_Therm_ADunits) + 9075.4;  

    zeroWind_ADunits = -0.0006*((float)TMP_Therm_ADunits * (float)TMP_Therm_ADunits) + 1.0727 * (float)TMP_Therm_ADunits + 47.172;  //  13.0C  553  482.39

    zeroWind_volts = (zeroWind_ADunits * 0.0048828125) - zeroWindAdjustment;  

    // This from a regression from data in the form of 
    // Vraw = V0 + b * WindSpeed ^ c
    // V0 is zero wind at a particular temperature
    // The constants b and c were determined by some Excel wrangling with the solver.
    
   WindSpeed_MPH =  pow(((RV_Wind_Volts - zeroWind_volts) /.2300) , 2.7265);   
   
    Serial.print("  TMP volts ");
    Serial.print(TMP_Therm_ADunits * 0.0048828125);
    
    Serial.print(" RV volts ");
    Serial.print((float)RV_Wind_Volts);

    Serial.print("\t  TempC*100 ");
    Serial.print(TempCtimes100 );

    Serial.print("   ZeroWind volts ");
    Serial.print(zeroWind_volts);

    Serial.print("   WindSpeed MPH ");
    Serial.println((float)WindSpeed_MPH);
    lastMillis = millis();    
  } 

}

what is this mean?

When I used the code, I commented those out. The are not needed for the measurements

Are you using this outside with the electronics exposed to the outdoor elements like dust, dirt, sun, humidity, bugs, condensation etc?

no, its being used indoors in an enclosed space.

The only thing that looks a little flimsy is the tiny trimpot.
Try moving it back and fourth a few times then re-calibrate.
If it still doesn't work then something was damaged somehow.

I tried to recalibrate it but there was no change

Did it ever work right or did it just all of a sudden one day start giving wrong values?

It worked right most of the time and one day it just stopped working.

If you have a DMM(Digitl Multi Meter) and know how to use it and know how to read a schematic, then you could do some hardware debugging.
But even if you found a bad component, would you know how to replace it?

I used a multimeter to check the voltages across RV and TMP, to see if it was the same as what I was getting from the arduino code.

Were they the same?

It was the same for the TMP but not for the RV.

So the temperature measurement actually works OK and it's only the wind speed that doesn't?

both aren't working properly, but its only the voltage from the Temperature that matches the Arduino display, the RV (for wind) does not

Well I'm done for today.
Maybe another forum member can pick it up from here.

thank you

very strange wind measurement, its formula near identical to that of simple Thermistor


#define analogPinForRV    A1
#define analogPinForTMP   A0

const float zeroWindAdjustment =  .2; // negative numbers yield smaller wind speeds and vice versa.

float TMP_Therm_ADunits_F;  //temp termistor value from wind sensor
float RV_Wind_ADunits_F;    //RV output from wind sensor
float RV_Wind_Volts;
unsigned long lastMillis;
int TempCtimes100;
float zeroWind_ADunits;
float zeroWind_volts;
float WindSpeed_MPH;

void setup() {
  Serial.begin(57600);   // faster printing to get a bit better throughput on extended info
  Serial.println("start");
}

void loop() {
  if (millis() - lastMillis > 200) {     // read every 200 ms - printing slows this down further
    lastMillis += 200;

    TMP_Therm_ADunits_F = (float)analogRead(analogPinForTMP);

    // these are all derived from regressions from raw data as such they depend on a lot of experimental factors
    // such as accuracy of temp sensors, and voltage at the actual wind sensor, (wire losses) which were unaccouted for.
    TempCtimes100 = int(0.005 * TMP_Therm_ADunits_F * TMP_Therm_ADunits_F - 16.862 * TMP_Therm_ADunits_F + 9075.4);

    RV_Wind_ADunits_F = (float)analogRead(analogPinForRV);
    RV_Wind_Volts = RV_Wind_ADunits_F *  0.0048828125;
    zeroWind_ADunits = -0.0006 * TMP_Therm_ADunits_F * TMP_Therm_ADunits_F + 1.0727 * TMP_Therm_ADunits_F + 47.172; //  13.0C  553  482.39

    zeroWind_volts = zeroWind_ADunits * 0.0048828125 - zeroWindAdjustment;

    // This from a regression from data in the form of
    // Vraw = V0 + b * WindSpeed ^ c
    // V0 is zero wind at a particular temperature
    // The constants b and c were determined by some Excel wrangling with the solver.

    WindSpeed_MPH =  pow((RV_Wind_Volts - zeroWind_volts) * 4.347826086956522 , 2.7265);

    Serial.print("  TMP volts ");
    Serial.print(TMP_Therm_ADunits_F * 0.0048828125, 5);

    Serial.print(" RV volts ");
    Serial.print(RV_Wind_Volts,2);

    Serial.print("\t  TempC*100 ");
    Serial.print(TempCtimes100 );

    Serial.print("   ZeroWind volts ");
    Serial.print(zeroWind_volts,2);

    Serial.print("   WindSpeed MPH ");
    Serial.println(WindSpeed_MPH);
  }
}

Try a different analog input for the wind, for example A3 and see if the voltage you measue with the DMM matches the printed value

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.