Air Flow Sensor Arduino Interfacing

Last Updated on March 16, 2024

Anemometer sensor or Air flow sensor from moderndevice is a low cost Arduino friendly air flow sensor. This sensor named as wind sensor Rev.p and it has hardware compensation for ambient temperature and stand for positive temperature co-efficient thermistors.

This sensor can sense hurricane force winds without saturating. It can sens from 0 to 150Mph winds and gives output sense voltage upto 3.3V hence it is most suitable for all range of microcontrollers and Arduino development boards.

Wind Sensor

Wind Sensor Schematics

This sensor works by thermal Anemometer based technique or hot wire technique, it gives sense out by heating an element and the power difference required to maintain the heat at heat element during wind flow. When the air flow increase the heat element lose the heat suddenly then it requires more power to maintain the heat, if there is no wind the heat element remains stable by the way the power and current flow difference to the heat element is measured and drawn as sense out.

Air Flow Sensor Arduino Interfacing

The wind sensor has five pins, Ground pin is connected to Arduino GND pin, +10-12V pin is connected to Arduino Vin pin, out pin is connected to Arduino Analog input pin A0, and TMP pin to A2 pin, power supply to the sensor board is given from Arduino board.


Power the Arduino board by using 9 Volt or 12V supply on the external power jack and power the sensor from arduino Vin pin after uploading sketch.

Air Flow Sensor Arduino Code


*  A demo sketch for the Modern Device Rev P Wind Sensor
* Requires a Wind Sensor Rev P from Modern Device
* 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 
* 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() {

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(" 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.println(" C");



6 thoughts on “Air Flow Sensor Arduino Interfacing

  1. Hello sir,
    I purchased the same component. But i want to know some of the component detail and its use. Please help me to find the component.
    Component number- 1002 and that was connected between jp5 and jp1.

  2. Is there possibility to autocalibrating this sensor through arduino, just with knowing temperature change given by other thermometer which is connected to the board?

  3. Having similar code and configuration, I am getting a “nan” result for the air speed and fluctuating temperature. Will there be possible explanation for this?

Leave a Reply

Your email address will not be published. Required fields are marked *