Arduino Anemometer: Wind Speed Measuring Project

In this article, we’ll look at how to build an Arduino anemometer and write code to run the system. Anemometers are synonymous with meteorology and are common weather station instruments, but the devices have numerous …

A three-cup type anemometer

In this article, we’ll look at how to build an Arduino anemometer and write code to run the system.

Anemometers are synonymous with meteorology and are common weather station instruments, but the devices have numerous applications, which we will list below.

Developing this project is relatively straightforward because we will use a ready-made rotating cup anemometer sensor.

But let’s begin by defining this device. Read on to learn more!

Table of Contents

What Is an Anemometer?

Also known as an anemograph, an anemometer is an instrument used to measure wind speed and direction.

Although primarily used in meteorology, the device has several other applications, but more about these uses later.

Anemometers come in three types:

  • Ultrasonic anemometer
  • Hot wire anemometer
  • Rotating/revolving cup electric anemometer 
  • Thrust anemometer
A set of ultrasonic anemometers

A set of ultrasonic anemometers

Among these types, the rotating three-cup anemometer is the most popular and is the industry standard.

The instrument operates like a wind turbine, where airflow pushes against the wind cups to turn them.

These anemometer cups then rotate a center shaft, which turns an electric generator.

This current generator produces a varying analog voltage proportional to the wind velocity.

So you can map the voltage to wind speed and display the reading.

How To Build An Arduino Anemometer Project

You will build this project using the Adafruit anemometer wind sensor. It has the following specifications.

  • Testing range: 0.5 m/s to 50 m/s
  • Max wind speed: 70 m/s
  • Resolution: 0.1 m/s
  • Output voltage: 0.4V to 4V
  • Start wind speed: 0.2 m/s
  • Accuracy deviation: 1 m/s (worst-case scenario)
  • Wire connections/pinout: Pin1 – brown power wire, Pin2 – black ground wire, Pin3 – blue signal wire

The component has a rugged build quality that can withstand harsh weather and strong winds outdoors.

An anemometer and wind vane mounted on the same pole

An anemometer and wind vane mounted on the same pole

What You Need

  • Adafruit anemometer sensor
  • OLED display or LCD module (16 x 2 is enough)
  • 9V battery or power adapter
  • Jumper wires

The anemometer has an operating voltage of 7-24VDC, so the battery or power supply must be within this range.

If your battery has a voltage lower than 7V, you can use a DC-DC boost converter module, such as the MT3608.

Hardware Connections

Battery/Power SupplyArduino Nano
Battery/Power SupplyAdafruit Anemometer
+9VVcc (brown wire)
-veGND (black wire)
Arduino NanoAdafruit Anemometer
A0Signal (blue wire)
Arduino NanoLCD

The LCD runs on 5V from the Arduino board and gets its I2C connection to display the wind speed readings via its SDA and SCL pins.


You’ll have to download the liquid crystal I2C library first, then include it in the project to enable the Arduino board to display data on the LCD.

After that, write the code below on your Arduino IDE, then upload it to your Nano board.

Code Explanation

This Arduino sketch is self-explanatory, but we’ll look at its core logic, the voltage-to-wind speed mapping function.

It is the last section of the code (mapfloat). The function takes in these five float parameters.

(1) float x – voltage variable from the anemometer sensor

(2) float in_min – the minimum input voltage from the sensor (0.4V)

(3) float in_max – the maximum input voltage from the sensor (2V)

(4) float out_min – 0.4V maps to 0 m/s wind speed

(5) float out_max – 2V maps to the max speed (32.4 m/s)

Arduino features a built-in map() function, but this function does not work with float arguments.

So we need this mapfloat function to convert the sensor’s voltage reading to wind speed.

In the code, we call this function to calculate the wind speed in m/s, with the only variable being voltage.

So how do we get the voltage? The sensor’s signal cable connects to the analog pin A0, and we capture this input using the analog read function.

But we can’t use this raw voltage data because the reading is analog.

So we convert the float sensor value to a value in the 0-1023 range by dividing it by 1023.

After that, we multiply the result by five to scale the number between zero and five.

The resulting value will be the first argument when we call the mapfloat function.

You can display the wind speed in miles per hour using this formula.

wind speed (mph) = (wind speed in m/s * 3600) / 1609.344

Code Output

You can view the output on either the serial monitor or LCD.

On the serial monitor, the output will include the following.

  • Analog value
  • Voltage
  • Wind speed in m/s and mph

But the LCD is tinier and shows fewer characters than the serial monitor.

So we’ve set it to initialize by showing “EMBEDWIZ” and “ANEMOMETER” in the void setup function.

A handheld anemometer indicating wind speeds on its LCD

A handheld anemometer indicating wind speeds on its LCD

After that, it will display “Wind Speed” and the speed in m/s, indicating the speed in real time because the code in the void loop section runs repetitively.

Wind Speed Classifications

The speed readings will only be figures that don’t make sense if you can’t classify the wind speed. It’s like driving on a highway with no speed limits.

You won’t know when you are overspeeding or which lane to use if you want to move slowly.

So here are some classifications to help you make sense of the data.

Wind Speed (at 10 m altitude/height)Classification
0.0 – 0.40.0 – 0.9Calm
0.5 – 1.81.0 – 3.5Light air
1.9 – 3.63.6 – 7.0Light breeze
3.7 – 5.87.1 – 11.0Gentle breeze
5.9 – 8.511.1 – 17.0Moderate breeze
8.6 – 11.017.1 – 22.0Cool/fresh breeze
11.1 – 14.022.1 – 28.0Strong breeze
14.1 – 17.028.1 – 34.0Moderate gale
17.1 – 21.034.1 – 41.0Fresh gale
21.1 – 25.041.1 – 48.0Strong gale
25.1 – 29.048.1 – 56.0Storm (whole gale)
29.1 – 34.056.1 – 65.0Violent storm
An anemometer indicating strong 40mph winds

An anemometer indicating strong 40mph winds

Project Applications

You can develop and deploy this project in the following applications.

  • Aviation: parachuting, paragliding, airplanes, balloon flights, etc.
  • Agriculture: checking wind conditions before burning stubble or crop spraying
An agronomist using an ultrasonic anemometer on a farm

An agronomist using an ultrasonic anemometer on a farm

  • Fire extinguishing: determining how fast and likely fires will propagate
  • Science: meteorology (weather stations) and aerodynamics
  • Hobbies: RC planes, boats, and flying kites
  • Training: Experimenting and measuring airflow for various conditions
  • Interior heating and ventilation: measuring airflow and checking filter conditions
  • Civil engineering: monitoring site safety for safe crane operation, checking wind stress, etc.
  • Outdoor sports/activities: archery, shooting, golf, cycling, sailing, hiking, etc.
  • Industry: pollution control and measuring airflow

Wrap Up

As you can see, the project is relatively easy, and we recommend making at least one improvement to get more comprehensive wind speed results.

Replace the 16 x 2 LCD module with a larger one that can show the wind speed classification after calculating the speed, then write the code to handle this categorization.

That’s it for this article. Contact us if you encounter any challenges, and we’ll be in touch to help.