Close Menu
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
Facebook X (Twitter) Instagram
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
How To Electronics
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
How To Electronics
Home » How to Measure Wind Speed using Anemometer & Arduino
Arduino Projects

How to Measure Wind Speed using Anemometer & Arduino

Mamtaz AlamBy Mamtaz AlamUpdated:August 30, 202312 Comments8 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
Anemometer Arduino
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

Overview

In this project, we will learn how to how to measure Wind Speed using Adafruit Anemometer Sensor & Arduino. An anemometer is a device used for measuring wind speed and direction. It is also a common Weather Station instrument.

In all studies that involve wind speed measurement such as meteorology, wind turbines & agriculture, we need accurate wind speed information for decision making. There are several types of anemometers with medium and high costs such as cups, hot wire & pitot tubes. The anemometer used here is the cup-type anemometer.

Wind Speed Arduino

The anemometer sensor we are using here is the Adafruit anemometer. The Adafruit anemometer is capable of measuring wind speeds up to 70 m/s or 156 mph which should be adequate for our location. We can interface the Adafruit Anemometer Sensor with Arduino and OLED Display. The sensor will measure the wind speed in m/s and displays the value on OLED Screen. You can convert the wind speed from m/s to miles per hour or kilometer per hour.


Bill of Materials

Following are the components that we need for making Wind Speed Measurement Project or Arduino Anemometer Project. You can purchase all the components easily online from Amazon. Check the purchase link below.

S.N.Components NameQuantityPurchase Links
1Arduino Nano Board1Amazon | AliExpress
2Adafruit Anemometer Sensor1Adafruit
30.96" I2C OLED Display1Amazon | AliExpress
4MT3608 Boost Converter Module1Amazon | AliExpress
53.7V Li-Ion Battery 1Amazon | AliExpress




What is Anemometer?

An anemometer is a device used for measuring wind speed and direction. It is widely used for measuring the speed of airflow in the atmosphere, in wind tunnels, and in other gas-flow applications. The term is derived from the Greek word anemos, which means wind, and is used to describe any wind speed instrument used in meteorology.

The most widely used Anemometer for wind-speed measurements is the revolving-cup electric anemometer. The revolving cups drive an electric generator. The output of the generator operates an electric meter that is calibrated in wind speed. Three-cup anemometers are currently used as the industry standard for wind resource assessment studies & practice. You may use Ultrasonic Anemometer if you don’t want movable parts.

The cup-type anemometer consists of 3 or 4 hemispherical cups mounted on horizontal arms, which were mounted on a vertical shaft. The airflow past the cups in any horizontal direction turned the shaft at a rate that was roughly proportional to the wind speed. Therefore, counting the turns of the shaft over a set time interval produced a value proportional to the average wind speed for a wide range of speeds.



Adafruit Anemometer

The Adafruit Anemometer Sensor is a Three-cup type anemometer that is capable of measuring wind speed up to 70m/s or 156mph. It is composed of a shell, the wind cup, and the circuit module.

Adafruit Anemometer

The sensor is supplied with a length of 3 core cables and three connections. A black wire to power and signal ground, a brown wire for power which can be anything from 7-24v DC, and a third blue wire that provides measurements via analog voltage. The output analog voltage will range from 0.4V (0 m/s wind) up to 2.0V (for 32.4m/s wind).


Specifications

  1. Voltage Required: 7-24v DC
  2. Output: 0.4V to 2V
  3. Testing Range: 0.5m/s to 50m/s
  4. Start wind speed: 0.2 m/s
  5. Resolution: 0.1m/s
  6. Accuracy: Worst case 1 meter/s
  7. Max Wind Speed: 70m/s
  8. Pin details: Pin 1 – Power (brown wire), Pin 2 – Ground (black wire), Pin 3 – Signal (blue wire)

Internal Circuitry of the Sensor

You can open the sensor by removing the knots. The internal circuitry has Photovoltaic modules, an industrial processor, the current generator which are integrated into the internal drive.

Anemometer Internal Circuit

The material of the circuit PCB is military-grade A. This ensures the stability of the parameters and the quality of the electrical properties. The internal Electronic components are all industrial chip which has extremely reliable electromagnetic interference resistance. The internal system can work normally in – 20 ℃ ~ + 50 ℃, humidity 35% ~ 85%.

The plug of the cable is a military plug. It has a good anticorrosive and prevents erosion performance that it can ensure the instrument used for a long time.



Measure Wind Speed using Anemometer & Arduino

Now let us interface the Adafruit Anemometer Sensor with Arduino & measure the wind speed. Check the schematic or circuit below.

arduino anemometer project

The Adafruit Anemometer works between 7-24V DC. So the voltage from the Arduino is not enough to power on the sensor. Hence I have to use MT3608 DC-to-DC Boost Converter Module to boost the 3.7V from Lithium-Ion Battery to 7.5V. To adjust the output voltage, connect the battery first to the input of the MT3608 Module and then rotate the potentiometer until the output voltage shows 7.5V on multimeter.

The Sensor VCC wire and the Arduino Vin pin are supplied with 7.5V from the output of the Boost Converter Module. The blue wire that is the analog output pin of the anemometer sensor is connected to the A0 of Arduino. Similarly the I2C Pin of OLED Display, i.e SDA & SCL is connected to A4 & A5 of Arduino. The OLED Display is supplied with 3.3V from Arduino 3.3V Pin.

anemometer sensor arduino Wind Speed


Project PCB Gerber File & PCB Ordering Online

If you don’t want to assemble the circuit on a breadboard and you want PCB for the project, then here is the PCB for you. I used EasyEDA to design the PCB. The PCB Board for Arduino Anemometer looks something like below.

<

The Gerber File for the PCB is given below. You can simply download the Gerber File and order the PCB from ALLPCB at 1$ only.

Download Gerber File: Arduino Anemometer PCB

You can use this Gerber file to order high quality PCB for this project. To do that visit the ALLPCB official website by clicking here: https://www.allpcb.com/.

You can now upload the Gerber File by choosing the Quote Now option. From these options, you can choose the Material Type, Dimensions, Quantity, Thickness, Solder Mask Color and other required parameters.

After filling all details, select your country and shipping method. Finally you can place the order.

You can assemble the components on the PCB Board.


Source Code/Program for Arduino Anemometer

Here is a simple Arduino Anemometer code written for Arduino IDE. The Arduino anemometer project code can be compiled and uploaded to the Arduino Board. You can either change the wind speed to m/s or mph.

The code requires SSD1306 & GFX OLED library for compilation. First download the following libraries and add it to the Arduino IDE.

  1. Download SSD1306 Library: https://github.com/adafruit/Adafruit_SSD1306
  2. Download Adafruit GFX Library: https://github.com/adafruit/Adafruit-GFX-Library



You can now copy the code and upload it to the Arduino Board.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
 
#define SCREEN_WIDTH 128  // OLED display width, in pixels
#define SCREEN_HEIGHT 64  // OLED display height, in pixels
#define OLED_RESET    4  // Reset pin # (or -1 if sharing reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
 
 
void setup()
{
  Serial.begin(9600);
  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C))
  {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;); // Don't proceed, loop forever
  }
  display.display();
  delay(100);
  display.clearDisplay();
 
  display.clearDisplay();
  display.setTextColor(WHITE);
  display.setTextSize(2);
  display.setCursor(0, 20);
  display.print("Anemometer");
  display.display();
  delay(3000);
}
 
void loop()
{
  float sensorValue = analogRead(A0);
  Serial.print("Analog Value =");
  Serial.println(sensorValue);
 
  float voltage = (sensorValue / 1023) * 5;
  Serial.print("Voltage =");
  Serial.print(voltage);
  Serial.println(" V");
 
  float wind_speed = mapfloat(voltage, 0.4, 2, 0, 32.4);
  float speed_mph = ((wind_speed *3600)/1609.344);
  Serial.print("Wind Speed =");
  Serial.print(wind_speed);
  Serial.println("m/s");
  Serial.print(speed_mph);
  Serial.println("mph");
 
  display.clearDisplay();
 
  display.setTextSize(1);
  display.setCursor(30, 0);
  display.println("Wind Speed");
 
//  display.setTextSize(2);
//  display.setCursor(25, 30);
//  display.print(wind_speed, 1);
//  display.setTextSize(1);
//  display.print(" m/s");
 
  display.setTextSize(2);
  display.setCursor(25, 30);
  display.print(speed_mph, 1);
  display.setTextSize(1);
  display.print(" mph");
 
  display.display();
 
  Serial.println(" ");
  delay(300);
}
 
float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
{
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}


Code Explanation

Here is a complete explanation of arduino anemometer code line by line.

1
2
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

First we include the library for OLED Display as it requires two libraries called Adafruit SSD1306 Library for SSD1306 OLED Driver and Adafruit GFX Library for Graphics Display.

1
2
3
4
#define SCREEN_WIDTH 128  // OLED display width, in pixels
#define SCREEN_HEIGHT 64  // OLED display height, in pixels
#define OLED_RESET    4  // Reset pin # (or -1 if sharing reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

Then we define OLED Display height, width, reset pin & create instances for OLED Display.

1
2
3
4
5
6
Serial.begin(9600);
  if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C))
  {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;); // Don't proceed, loop forever
  }

Under the setup section we initialized the Serial and OLED function. The I2C Address of the OLED Display is 0x3c. Some OLED Display has an address of 0x3D. Change the I2C Address in case OLED is not working.

1
2
float sensorValue = analogRead(A0);
float voltage = (sensorValue / 1023) * 5;

Then we are reading the sensor analog value and then converting the value into voltage.


1
float wind_speed = mapfloat(voltage, 0.4, 2, 0, 32.4);

Mapping the voltage to speedy is straightforward. The wind speed starts at 1m/s at 0.4V with a maximum of 32.4m/s at around 2. Arduino has a built-in map() function, but the map() does not work for floats, so we have a simple mapFloat() function.

1
2
3
4
float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
{
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

This functions is used to map the variable under a float.

1
float speed_mph = ((wind_speed *3600)/1609.344);

Using this line you can convert the wind speed from m/s to miles per hour (mph).

1
2
3
4
5
6
7
8
9
10
11
//  display.setTextSize(2);
//  display.setCursor(25, 30);
//  display.print(wind_speed, 1);
//  display.setTextSize(1);
//  display.print(" m/s");
 
  display.setTextSize(2);
  display.setCursor(25, 30);
  display.print(speed_mph, 1);
  display.setTextSize(1);
  display.print(" mph");

These line displays the wind speed in OLED Display. You can comment or uncomment the above lines on the basis of m/s or mph requirement.


Measuring Wind Speed & Testing the Device

Once you upload the Arduino Anemometer code to the Arduino Board, the OLED Display will start displaying the wind speed. When the anemometer cup is stable the OLED will show speed around 0.1m/s to 0.3m/s. The speed will vary or increase when the sensor is taken in a windy region. I used my home roof to check the wind speed.

Initialy I tried measuring the speed in m/s and got the result as shown in the image below. The speed variation is increases or decreases depending upon the blade rotation.

Then I used the industrial standard measurement and converted the m/s to miles per hour (mph). You can also use the mathematical calculation to convert the speed to a kilometer per hour (kph).

This is how you can make DIY Arduino Anemometer Project for measuring wind speed for Weather Station.



Video Tutorial & Guide

Wind Speed Measurement using Anemometer & Arduino || DIY Arduino Anemometer
Watch this video on YouTube.

You can also check the better version of this project using ESP32, where you can display the Wind Speed on TFT LCD Display with widgets.

Anemometer ESP32

Check it here: Wind Speed Display on TFT LCD

In case if you need a digital version of Anemometer, then you can check the NPN Pulse Output Anemometer which operates only at 5V.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleDIY 3.7V to 9V Boost Converter Circuit using MC34063
Next Article Raspberry Pi Pico Getting Started Tutorial with MicroPython

Related Posts

DC Energy Meter using Arduino

Build a DC Energy Meter using Arduino – 32V/5A

Updated:August 26, 20252K
Interfacing ADXL375 Accelerometer with Arduino

Interfacing ADXL375 Accelerometer with Arduino (±200g)

Updated:June 28, 2025
PZEM-004T Arduino Energy Meter

DIY AC Energy Meter using PZEM-004T & Arduino

Updated:March 6, 20258K
Interfacing BMI160 Accelerometer & Gyroscope with Arduino

Interfacing BMI160 Accelerometer & Gyroscope with Arduino

Updated:February 2, 20259K
Password Based Door Lock Security System Using Arduino & Keypad

Password Based Door Lock Security System Using Arduino & Keypad

Updated:February 2, 20252436K
Earthquake Detector Alarm with with Accelerometer & Arduino

Earthquake Detector Alarm with Accelerometer & Arduino

Updated:February 2, 2025661K
View 12 Comments

12 Comments

  1. wael on March 6, 2021 1:11 AM

    Could use this code with Arduino Mkr zero ?
    From what I have learned that I should connect Vin pin with Anemometer Vcc (brown wire) & 7-24v DC converter, Right?
    I have used another codes but the values from Arduino Mkr zero was different than what was in Arduino.

    Reply
    • Mr. Alam on March 7, 2021 7:27 PM

      The Arduino UNO/Nano/mini Board has 10-bit ADC whereas the Arduino Mkr Board has 12-Bit ADC. This is why you are getting two different values from two different board. To use the same code with Arduino Mkr Board, replace 1023 with 4096 in the code part. You will then get the same value.

      Reply
  2. Wael on March 7, 2021 10:23 PM

    Thank you for your ply.
    Is this a normal reading?
    I use a AC/DC adapter set on 9V.
    Analog Value =1.00
    Voltage =0.00 V
    Wind Speed =-8.08m/s
    -18.06mph
    Analog Value =1.00
    Voltage =0.00 V
    Wind Speed =-8.08m/s
    -18.06mph
    Analog Value =1.00
    Voltage =0.00 V
    Wind Speed =-8.08m/s
    -18.06mph
    Analog Value =0.00
    Voltage =0.00 V
    Wind Speed =-8.10m/s
    -18.12mph

    Have you used Sigfox technology before?
    I’m facing a problem of convert data to Hexadecimal.

    Reply
    • Mr. Alam on March 7, 2021 10:26 PM

      Sorry Sir, no idea about this anemometer. Different anemometer has different ways of measuring the wind speed. Some measures pulse count and some measures analog voltage whereas some measures frequency. You have to go through the manufacturer specifications and write your own code.

      Reply
  3. Pearl Jane Cachuela on March 9, 2021 10:04 PM

    Hello! Im new to arduino, and i tried this with arduino uno but then i get error while uploading the code. please help

    Reply
  4. weal5300 on May 19, 2021 12:50 AM

    Is this line correct ” float voltage = (sensorValue / 1023) * 5;”?
    How about this line:
    float voltage =sensorValue* (5/ 1023) ;

    Reply
  5. Johnny Wright on November 5, 2021 8:56 PM

    Hi…..wow the Wonderful World of Electronics has blossomed… been a long time for me..great Web Site.

    Can this great little Anemometer project be made to supply a NMEA 0183 VWR Sentence via some sort of conversion?

    It would be a super awesome project (for me) to get back into modern day electronics.

    Cheers & thanks

    Doog

    Reply
  6. Amir on April 9, 2022 1:59 PM

    Why it says like this ” No such file or directory #include ^~~~~~~~~~~~~~~~~~~~~~” after verify the coding?

    Reply
  7. Eamon on April 5, 2023 2:13 PM

    Are there any plans to add a logging function that stores measured wind parameters with a time stamp locally in memory so that they can be downloaded later via a serial interface to a laptop . This is necessary to gather wind data over extended periods of time to evaluate the wind resources at a potential site for a wind turbine for example .

    Reply
    • Admin on April 5, 2023 2:15 PM

      You can use a SD Card module to the arduino and add few lines of code to store data log in sd card.

      Reply
  8. Dana Bruce Simison on April 14, 2024 8:51 PM

    I wouldn’t trust the pcb design. I purchased pcb’s from another project of thiers and the pcb doesn’t work. I found an error in the design but they have yet to correct the error even after I informed them of it.

    Reply
  9. Seishu Komori on October 28, 2024 3:35 AM

    Can we add solar power instead of lithium battery?

    Reply

CommentsCancel reply

Latest Posts
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

May 31, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

May 10, 2026
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

May 2, 2026
A Guide to Sourcing Obsolete ICs for Vintage Projects

Beyond AliExpress: A Guide to Sourcing Obsolete ICs for Vintage Projects

April 21, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

April 27, 2026
Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

February 26, 2026
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

April 27, 2026
DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

February 1, 2026
Top Posts & Pages
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • IoT Based Drinking Water Quality Monitoring with ESP32
    IoT Based Drinking Water Quality Monitoring with ESP32
  • LD2410 Sensor with ESP32 - Human Presence Detection
    LD2410 Sensor with ESP32 - Human Presence Detection
  • ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
    ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
  • DIY IoT Water pH Meter using pH Sensor & ESP32
    DIY IoT Water pH Meter using pH Sensor & ESP32
  • Buck Converter: Basics, Working, Design & Application
    Buck Converter: Basics, Working, Design & Application
  • How to use Modbus RTU with ESP32 to read Sensor Data
    How to use Modbus RTU with ESP32 to read Sensor Data
Categories
  • Arduino Projects (197)
  • Articles (60)
    • Learn Electronics (19)
    • Product Review (15)
    • Tech Articles (28)
  • Electronics Circuits (46)
    • 555 Timer Projects (21)
    • Op-Amp Circuits (7)
    • Power Electronics (13)
  • IoT Projects (204)
    • ESP32 MicroPython (7)
    • ESP32 Projects (81)
    • ESP32-CAM Projects (15)
    • ESP8266 Projects (76)
    • LoRa/LoRaWAN Projects (22)
  • Microcontrollers (38)
    • AMB82-Mini IoT AI Camera (4)
    • BLE Projects (18)
    • STM32 Projects (19)
  • Raspberry Pi (93)
    • Raspberry Pi Pico Projects (57)
    • Raspberry Pi Pico W Projects (12)
    • Raspberry Pi Projects (24)
Follow Us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
About Us

“‘How to Electronics’ is a vibrant community for electronics enthusiasts and professionals. We deliver latest insights in areas such as Embedded Systems, Power Electronics, AI, IoT, and Robotics. Our goal is to stimulate innovation and provide practical solutions for students, organizations, and industries. Join us to transform learning into a joyful journey of discovery and innovation.

Copyright © How To Electronics. All rights reserved.
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Looks like you're using an ad blocker. Please allow ads on our site. We rely on advertising to help fund our site.