Arduino Wind Sensor rev P return weird Temperature and wind speed

Hi, I'm using the sensor for a project at school, but he doesn't work.

I have tried two configurations

  • Connect the sensor directly to the power adapter
  • Connect the sensor to the VIN of the Arduino

But in both configuration get the same result the temperature and wind speed looks to be random. The analogue output OUT and TMP looks to return nothing.

Is my sensor broken ? Do you see what i'm doing wrong ?
Thank you

/* A demo sketch for the Modern Device Rev P Wind Sensor
* Requires a Wind Sensor Rev P from Modern Device
* http://moderndevice.com/product/wind-sensor-rev-p/
* 
* The Rev P requires at least at least an 8 volt supply. The easiest way to power it 
* if you are using an Arduino is to use a 9 volt or higher supply on the external power jack
* and power the sensor from Vin.
* 
* Hardware hookup 
* Sensor     Arduino Pin
* Ground     Ground
* +10-12V      Vin
* Out          A0
* TMP          A2
*
* Paul Badger 2014
* code in the public domain
*/

const int OutPin  = A0;   // wind sensor analog pin  hooked up to Wind P sensor "OUT" pin
const int TempPin = A2;   // temp sesnsor analog pin hooked up to Wind P sensor "TMP" pin


void setup() {
    Serial.begin(9600);
}

void loop() {

    // read wind
    int windADunits = analogRead(OutPin);
    // Serial.print("RW ");   // print raw A/D for debug
    // Serial.print(windADunits);
    // Serial.print("\t");
    
    
    // wind formula derived from a wind tunnel data, annemometer and some fancy Excel regressions
    // this scalin doesn't have any temperature correction in it yet
    float windMPH =  pow((((float)windADunits - 264.0) / 85.6814), 3.36814);
    Serial.print(windMPH);
    Serial.print(" MPH\t");    

 


    // temp routine and print raw and temp C
    int tempRawAD = analogRead(TempPin);  
    // Serial.print("RT ");    // print raw A/D for debug
    // Serial.print(tempRawAD);
    // Serial.print("\t");
    
    // convert to volts then use formula from datatsheet 
    // Vout = ( TempC * .0195 ) + .400
    // tempC = (Vout - V0c) / TC   see the MCP9701 datasheet for V0c and TC
    
    float tempC = ((((float)tempRawAD * 5.0) / 1024.0) - 0.400) / .0195; 
    Serial.print(tempC);
    Serial.println(" C");
    delay(750);
}

That PSU seems like an overkill, did you measure its voltage, psu rated at 12.5, bet it goes to 13...
Try hoking arduino to a lower voltage, otherwise i think you hooked it up nice.

when they say above 8V for the probe, its not indefinite, says +10-12V probe hooked to Vin that is on PSU voltage,
and they recommend 9V... maybe it realy gets to 60 degrees :slight_smile:
hope your probe is still ok :confused:

Hardware hookup 
* Sensor     Arduino Pin
* Ground     Ground
* +10-12V      Vin
* Out          A0
* TMP          A2

Are you sure of the polarity of 12V on the barrel jack? +V to center pin, -V to sleeve. What is the voltage from GND to the VIN pin?

I tried again today and check all the polarity and voltage, I got 12.5V form the PSU, and 11V between Vin and ground.

I make measurements, but I see at the end that my Vin port was disconnected so I think I will retry next week during the holidays.

Thanks you for your help, I will keep you informed