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 » Measure Wind Speed & Direction with Ultrasonic Anemometer & Arduino
Arduino Projects

Measure Wind Speed & Direction with Ultrasonic Anemometer & Arduino

Mamtaz AlamBy Mamtaz AlamUpdated:September 3, 20231 Comment8 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
Ultrasonic Anemometer Arduino
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

Overview:

In this tutorial, we will interface an Ultrasonic Anemometer with Arduino to measure wind speed and direction.

An ultrasonic anemometer utilizes ultrasonic waves to measure both the speed and direction of wind. Unlike traditional mechanical anemometers, which rely on spinning cups or vanes to measure wind, ultrasonic anemometers have no moving parts. This feature makes them durable, reliable, and well-suited for a variety of challenging environments.

The term ‘anemometer‘ is derived from the Greek word ‘anemos,’ which means ‘wind.’ Ultrasonic anemometers are widely used in applications like meteorology, wind energy studies, navigation, and research. These instruments are particularly useful in settings that require high levels of accuracy and real-time data collection.

In this project, we will use a Renkeer Ultrasonic Anemometer that is especially designed for outdoor measurements. The sensor can measure wind speed ranging from 0 to 40 m/s and wind direction from 0 to 360° with high accuracy. The anemometer operates on a low-power chip, consuming only 0.12W, making it suitable for solar or battery-powered installations.

Ultrasonic Anemometer Arduino

For interfacing, we will employ the RS485 protocol. Similar to our previous tutorial on the Pyranometer Sensor, the RS485 Module will facilitate the transfer of data from the sensor to the Arduino board. The wind speed and direction data will then be displayed on a 16×2 LCD screen connected to the Arduino.




Bill of Materials

Following are the components that we need for Ultrasonic Anemometer data using an Arduino. The components can be purchased from given links.

S.N.ComponentsQuantityPurchase Link
1Arduino UNO Board1Amazon | AliExpress | SunFounder
2Ultrasonic Anemometer1Renkeer
316X2 I2C LCD Display1Amazon | AliExpress | SunFounder
4MAX485 Module1Amazon | AliExpress | SunFounder
512V Power Supply1Amazon | AliExpress | SunFounder
6Jumper Wires10Amazon | AliExpress | SunFounder
7Breadboard1Amazon | AliExpress | SunFounder

Ultrasonic Anemometer Sensor

An ultrasonic anemometer is a specialized instrument that measures wind speed and direction, quantifying them in meters per second (m/s) and degrees (°), respectively. The wind conditions can vary significantly over short distances due to factors such as time of day, geographical location, and obstacles like buildings or terrain.

Ultrasonic anemometers measure wind speed by detecting the difference in time taken for an ultrasonic pulse to travel in each direction between pairs of transducers caused by movement of the air. This method allows accurate measurement even at low wind speeds as there is no mechanical inertia to overcome.




Renkeer Ultrasonic Anemometer

The Renkeer Ultrasonic Anemometer is an innovative device engineered for the precise outdoor measurement of wind speed and direction. It stands out for its compact design, absence of movable parts, and high protection level, making it exceptionally durable and suitable for harsh environments.

Ultrasonic Anemometer

Internally, the anemometer uses low-power chips, keeping its power consumption to an efficient 0.12W. This makes it an ideal choice for solar or battery-powered installations, particularly in settings that require reliable, long-term data collection. The device’s technology ensures a compact structure, further complemented by optional modules for measuring temperature and air pressure. The anemometer offers a range of output signals including 420mA, 05V, 0~10V, and RS485, providing users with flexible interfacing options.

The shell of the anemometer is made from high-strength ABS material, which adds to its adaptability for use across different environmental conditions. With its combination of precision, durability, and affordability, the Renkeer Ultrasonic Anemometer is a valuable tool for anyone looking to accurately measure wind conditions.


Specifications of Renkeer Ultrasonic Anemometer

  • Power supply: 10-30V DC
  • Wind Speed Range: 0~40m/s
  • Wind Direction Range: 0~360°
  • Wind Speed Measurement Accuracy: ±0.5+2%FS(60%RH,25℃)
  • Wind Direction Measurement Accuracy: ±3°(60%RH,25℃)
  • Wind Speed Resolution: 0.01 m/s
  • Wind Direction Resolution: 1°
  • Working environment: -40~80℃, 0~95%RH
  • Wind resistance: 75 m/s
  • Response time: 1S
  • Protection level: IP65
  • Output signal: 4~20mA, 0~5V, 0~10V, RS485
  • Starting wind speed: 0.5m/s



Sensor Circuitary & Pinout

Here is the internal circuitary of the Ultrasonic Anemometer Sensor.

The Ultrasonic Anemometer works on RS485 Protocol and hence can communicate with easily with Arduino, ESP32 or any other microcontrollers using MAX485 Module.

Here are the 4 wires for the sensor.

  • Brown Wire:  VCC (10-30V)
  • Black Wire: GND
  • Yellow Wire: RS485-A
  • Blue Wire: RS485-B

Data Frame Format Definition & Communication Protocol

Data frame format definition

Using the Modbus-RTU communication protocol, the format is as follows:

  • Initial structure ≥ 4 bytes of time
  • Address code = 1 byte
  • Function code = 1 byte
  • Data area = N bytes
  • Error check = 16-bit CRC code
  • Time to end structure ≥ 4 bytes

Host query frame structure:

Address Code Function Code Register Start Address Register Length Check code Low Bit Check Code High Bit
1 byte 1 byte 2 bytes 2 bytes 1 byte 1 byte

Slave response frame structure:

Address Code Function Code Effective Bytes Data Area 1 Data Area 2 Data Area N Check Code Low Byte Check Code High Byte
1 byte 1 byte 1 byte 2 bytes 2 bytes 2 bytes 1 bytes 1 bytes



Read the Wind Speed and Direction Value

Inquiry frame:

Address Code Function Code Initial Address Data Length Check code Low Bit Check Code High Bit
0x01 0x03 0x00 0x00 0x00 0x02 0xC4 0x0B

Response frame:

Address Code Function Code Returns the number of valid bytes Real-time wind speed value Real-time wind direction value Check code low bit Check code high bit
0x01 0x03 0x04 0x00 0x7D 0x00 0x5A 0xEA 0x10

The Wind Speed and Direction from the response frame can be calculated as:

007D (hexadecimal) =125=> Wind Speed=1.25 m/s

005A (hexadecimal) =90=> Wind Direction=90°N


Interfacing Ultrasonic Anemometer with Arduino

Now lets interface the Ultrasonic Anemometer with Arduino & start measuring the Wind Speed and Direction.

Hardware Connection

Here is the schematic for the project.

Interfacing Ultrasonic Anemometer Arduino

The Ultrasonic Anemometer communicates with a Microcontroller using RS485 protocol. Hence we used MAX485 Module for this project. The MAX485 is a popular RS-485 transceiver chip commonly used for serial communication. When interfacing the MAX485 with an Arduino, you’ll typically be dealing with half-duplex communication, where data transmission and reception occur at different times.

Here is a connection mapping between MAX485 & Arduino.

  • VCC (MAX485) -> 5V (Arduino)
  • GND (MAX485) -> GND (Arduino)
  • RO (MAX485) -> 2 (Digital Pin of Arduino)
  • DI (MAX485) -> 3 (Digital Pin of Arduino)
  • RE (MAX485) -> 8 (Digital Pin of Arduino)
  • DE (MAX485) -> 7 (Digital Pin of Arduino)



Here is a connection mapping between MAX485 & Pyanometer Sensor.

  • VCC -> 12V (Anemometer)
  • GND  -> GND (Anemometer)
  • A (MAX485) -> Anemometer A Pin (Yellow Color)
  • B (MAX485) -> Anemometer B Pin (Blue Color)

Ultrasonic Anemometer Sensor Arduino Connection

You may use a breadboard for assembly and a jumper wires for connecting the sensor and RS485 Module with Arduino. The Ultrasonic Anemometer requires 12V for operation. You may use a 12V Battery or a 12V DC Power Supply.


Source Code/Program for Reading Wind Speed/Direction Value

After assembling the sensor as per the circuit diagram above, lets move to the coding part of this project. According to the above table the inquiry frame for getting the Sensor reading hexadecimal is as follows:

1
0x01, 0x03, 0x00, 0x00, 0x00, 0x02, 0xC4, 0x0B

The sensor communicates at a baudrate of 4800. We have set the same parameter in the code to get the required reading.

Copy the following code and paste it on your Arduino IDE.

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
#include <SoftwareSerial.h>
 
#define RE 8
#define DE 7
 
const byte anemometer[] = {0x01, 0x03, 0x00, 0x00, 0x00, 0x02, 0xC4, 0x0B};
byte values[9];
SoftwareSerial mod(2, 3);
 
void setup()
{
  Serial.begin(9600);
  mod.begin(4800);
  pinMode(RE, OUTPUT);
  pinMode(DE, OUTPUT);
  delay(1000);
}
 
void loop()
{
  // Transmit the request to the sensor
  digitalWrite(DE, HIGH);
  digitalWrite(RE, HIGH);
  delay(10);
  
  mod.write(anemometer, sizeof(anemometer));
  
  digitalWrite(DE, LOW);
  digitalWrite(RE, LOW);
  delay(10);
 
  // Wait until we have the expected number of bytes or timeout
  unsigned long startTime = millis();
  while (mod.available() < 9 && millis() - startTime < 1000)
  {
    delay(1);
  }
 
  if (mod.available() >= 9)
  {
    // Read the response
    byte index = 0;
    while (mod.available() && index < 9)
    {
      values[index] = mod.read();
      Serial.print(values[index], HEX);
      Serial.print(" ");
      index++;
    }
    Serial.println();
 
    // Parse the Wind Speed value
    int Wind_Speed_Int = int(values[3] << 8 | values[4]);
    float Wind_Speed_m_s = Wind_Speed_Int / 100.0;
    float Wind_Speed_kph = Wind_Speed_m_s * 3.6; // Conversion to km/h
 
    Serial.print("Wind Speed: ");
    Serial.print(Wind_Speed_kph);
    Serial.println(" km/h");
 
    // Parse the Wind Direction value
    int Wind_Direction = int(values[5] << 8 | values[6]);
    Serial.print("Wind Direction: ");
    Serial.print(Wind_Direction);
    Serial.println(" degrees");
  }
  else
  {
    Serial.println("Sensor timeout or incomplete frame");
  }
 
  delay(1000);
}




Testing & Results

To upload the code to the Arduino Nano Board, select Arduino Nano from Board list. Then Select the COM Port. Finally click on the upload button to upload the code.

Once code is uploaded, open the Serial Monitor and you will see following readings.

The wind speed and direction, both will appear zero when no wind is blowing.

When the wind blows, the wind speed values in Km/H and Wind Direction in degrees is displayed.

The wind speed and direction measured by an ultrasonic anemometer are influenced by a variety of factors. These include time of day, as wind patterns can shift from morning to evening, and geographical elements like the presence of hills, valleys, or man-made structures that can channel or obstruct wind flow.


Interfacing Ultrasonic Anemometer with Arduino & LCD Display

Now lets interface the Ultrasonic Anemometer with Arduino and 16×2 I2C LCD Display and observe the Wind Speed and Direction Value on LCD.

Hardware Connection

Here is the connection diagram for adding an extra LCD connection.

Ultrasonic Anemometer Wind Speed Direction Arduino

The sensor and RS485 connections remains same as above. Only the connection for LCD changes as follows:

  • VCC (LCD) -> 5V (Arduino)
  • GND (LCD) -> GND (Arduino)
  • SDA (LCD) -> A4 (Arduino)
  • SCL (LCD) -> A5 (Arduino)

Ultrasonic Anemometer LCD Wind Speed Direction Arduino



Source Code/Program Displaying Wind Speed/Direction Value on LCD

The code requires I2C LCD Library for compilation. Therefore download the library and add it to the Arduino library folder.

Now copy the following code and paste it to the Arduino IDE.

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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#include <SoftwareSerial.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display
 
#define RE 8
#define DE 7
 
const byte anemometer[] = {0x01, 0x03, 0x00, 0x00, 0x00, 0x02, 0xC4, 0x0B};
byte values[9];
SoftwareSerial mod(2, 3);
 
 
void setup()
{
  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  mod.begin(4800);
  pinMode(RE, OUTPUT);
  pinMode(DE, OUTPUT);
  lcd.setCursor(2, 0);
  lcd.print("Wind Speed");
  lcd.setCursor(2, 1);
  lcd.print("Measurement");
  delay(3000);
}
 
 
void loop()
{
  // Transmit the request to the sensor
  digitalWrite(DE, HIGH);
  digitalWrite(RE, HIGH);
  delay(10);
 
  mod.write(anemometer, sizeof(anemometer));
 
  digitalWrite(DE, LOW);
  digitalWrite(RE, LOW);
  delay(10);
 
  // Wait until we have the expected number of bytes or timeout
  unsigned long startTime = millis();
  while (mod.available() < 9 && millis() - startTime < 1000)
  {
    delay(1);
  }
 
  if (mod.available() >= 9)
  {
    // Read the response
    byte index = 0;
    while (mod.available() && index < 9)
    {
      values[index] = mod.read();
      Serial.print(values[index], HEX);
      Serial.print(" ");
      index++;
    }
    Serial.println();
 
    // Parse the Wind Speed value
    int Wind_Speed_Int = int(values[3] << 8 | values[4]);
    float Wind_Speed_m_s = Wind_Speed_Int / 100.0;
    float Wind_Speed_kph = Wind_Speed_m_s * 3.6; // Conversion to km/h
 
    Serial.print("Wind Speed: ");
    Serial.print(Wind_Speed_kph);
    Serial.println(" km/h");
 
    // Parse the Wind Direction value
    int Wind_Direction = int(values[5] << 8 | values[6]);
    Serial.print("Wind Direction: ");
    Serial.print(Wind_Direction);
    Serial.println(" degrees");
 
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("Speed:");
    lcd.print(Wind_Speed_kph);
    lcd.print(" kph");
    lcd.setCursor(0, 1);
    lcd.print("Dir:");
    lcd.print(Wind_Direction);
    lcd.print(" deg.");
    delay(1000);
  }
  else
  {
    Serial.println("Sensor timeout or incomplete frame");
  }
}


Testing & Results

Upload the code to the Arduino Nano Board. The Arduino code is now ready to give the Wind Speed and Direction reading on LCD Display.

Wind Speed Direction Measurement



The Wind Speed and direction varies depending upon the Wind blowing speed.

Additionally, the geographical region itself can contribute to the overall wind conditions, with certain areas more prone to consistent winds and others to variable gusts.


Video Tutorial & Guide

Measuring Wind Speed & Direction with Ultrasonic Anemometer & Arduino
Watch this video on YouTube.


Conclusion

In conclusion, this tutorial provided a comprehensive guide on interfacing a Renkeer Ultrasonic Anemometer with an Arduino to measure wind speed and direction. Utilizing the RS485 protocol, we successfully transferred the sensor’s data to the Arduino and displayed it on a 16×2 LCD screen.

The advantages of using an ultrasonic anemometer over traditional mechanical options were evident in its durability, reliability, and adaptability to various environmental conditions. Its low power consumption of 0.12W also made it ideal for solar or battery-powered setups. With its high-accuracy measurements ranging from 0 to 40 m/s for wind speed and 0 to 360° for wind direction, the Renkeer Ultrasonic Anemometer proved to be an excellent choice for anyone looking to study or monitor wind conditions accurately.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleShape Based Object Tracking with OpenCV on Raspberry Pi
Next Article Age & Gender Classification with OpenCV & Deep Learning on Raspberry Pi

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 1 Comment

1 Comment

  1. Peter Štefánik on January 22, 2024 4:04 AM

    Hi there! I got a question regarding the ultrasonic anemometer. I also got one myself from the renkee but mine have 6 wires instead of 4 i suppose that they are Data + and – for the wind speed and data + and – for direction. Do you have any idea how to inteface this type of anemometer with the Arduino?
    Thanks and Regards
    Peter

    Reply

CommentsCancel reply

Latest Posts
ESP32 Fingerprint Attendance System with Live Web Dashboard

ESP32 Fingerprint Attendance System with Live Web Dashboard

June 21, 2026
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

June 14, 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
Top Posts & Pages
  • ESP32 Fingerprint Attendance System with Live Web Dashboard
    ESP32 Fingerprint Attendance System with Live Web Dashboard
  • ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
    ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
  • LD2410 Sensor with ESP32 - Human Presence Detection
    LD2410 Sensor with ESP32 - Human Presence Detection
  • 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
  • Silicon Controlled Rectifier (SCR): Construction, Working & Applications
    Silicon Controlled Rectifier (SCR): Construction, Working & Applications
  • How to use ADS1115 16-Bit ADC Module with Arduino
    How to use ADS1115 16-Bit ADC Module with Arduino
  • IoT Based Patient Health Monitoring on ESP32 Web Server
    IoT Based Patient Health Monitoring on ESP32 Web Server
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 (205)
    • ESP32 MicroPython (7)
    • ESP32 Projects (82)
    • 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.