Arduino B.Tech/Diploma Intermediate

Measure Wind Speed & Direction with Ultrasonic Anemometer & Arduino

Measuring Wind Speed in km/h & direction in degree using Ultrasonic Anemometer Sensor & Arduino to display speed & direction in LCD Display

  • Suitable forB.Tech/Diploma Arduino students
  • Build time1-2 weeks
  • LevelIntermediate
  • Available atAjvika Labs, Kakinada

About this project

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

to
40 m/s
and
wind direction
from

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.
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.
Components
Quantity
Purchase Link

Arduino UNO Board

Amazon
AliExpress
SunFounder

Ultrasonic Anemometer

Renkeer

16X2 I2C LCD Display

Amazon
AliExpress
SunFounder

MAX485 Module

Amazon
AliExpress
SunFounder

12V Power Supply

Amazon
AliExpress
SunFounder

Jumper Wires

Amazon
AliExpress
SunFounder

Breadboard

Amazon
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.
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.
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)
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:

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.

Technologies used

ESP32ArduinoBLELCDI2CSPIArduino IDE

Hardware components

  • ESP32
  • Arduino

Software & tools

  • Arduino IDE

What you get

  • Working project / hardware kit, tested before delivery
  • Complete source code with explanation
  • Project demo and guidance for your viva
  • Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed. Payment is in two parts: • 50% advance to start the project • Remaining 50% before delivery Note: • Documentation and PPT are not included by default • If you need documentation/PPT, it can be arranged for extra time and cost We'll confirm the exact timeline and cost with you after reviewing your requirements.