In this Interesting Arduino Project, You will learn how to measure Wind speed by interfacing Adafruit Anemometer with Arduino and display the speed of the wind on LCD display module or OLED display. Generally when some NEWS channels shows the weather forecast update, you can notice that they show some device which has semi spherical cups rotates according to the speed of wind which is called Anemometer and there is an arrow on its top which moves according to the wind direction it is called wind vane.
Through this article we will explain what is Anemometer, how Anemometer works, types of Anemometers and how to interface it with Arduino and a working program code to calculate and display the wind speed on serial monitor and LCD Display module.
Table of Contents
Required Components:
Below are the all required components which are used in building wind speed measuring system project or Arduino Anemometer project.
Product Name | Quantity | ||
---|---|---|---|
Arduino Microcontroller | 1 | https://amzn.to/3H4cKxZ | https://amzn.to/3638aTS |
Adafruit Anemometer | 1 | Adafruit link | |
LCD 16X2 module with or without I2C adapter | 1 | https://amzn.to/3BNSRup | https://amzn.to/363ki7F |
9V power supply (Battery or Adapter). | 1 | https://amzn.to/3jmc9OR | https://amzn.to/3KpOKIo |
Few Connecting Wires | https://amzn.to/3H2BV4e | https://amzn.to/3J0WVu2 |
What is an Anemometer? and how they work
The anemometer, also known as an anemograph, is a meteorological instrument whose task is to measure the average speed of wind. Not only wind it has the ability to measure the speed or velocity of any gas flow through atmosphere, Closed vents or even through pipes. It has various applications in various fields where air is the parameter in their work or activity.
Anemometers measure the instantaneous speed of the wind, but the gusts of wind distort the measurement, so that the most accurate measurement is the average value of measurements taken at 10-minute intervals.
Types of Anemometers:
- Rotating Cup Anemometers
- Hot Wire Anemometer
- Ultrasonic Anemometer
- Thrust Anemometer
There are few different types of anemometers from those the rotating cup anemometers are used as an industry standard, whose principle and build gives stability and ease of use even in high speed winds. Even in rotating cup model there are types, when winds flows across the cups, they rotate according to the speed. So, some will measure the speed by counting the number of rotations of the cups while other will generate certain voltage proportional to the speed of the wind.
Adafruit Anemometer:
It is a Rotating cup Anemometer which is based on hall effect principle and contain a hall effect sensor which generates analog voltage when the cups rotate. By measuring the Analog voltage which is linear to the wind flow across the device we can calculate the actual wind speed. It can measure the wind speeds upto 32.4 meters/ second which are high velocity winds .
This device works with 7v to 24v DC supply, It is rugged and has high quality material all over its body to sustain and withstand from harsh weather conditions for long time. Even its plug pins are made from anti corrosive materials and protected in a metal enclosure.
Its output analog voltage ranges from 0.4V at 0 meters/sec to 2V at 32.4 meters/sec.
Pinout diagram:
Even though the plug has 4 pins inside but from the above pinout image you can notice there are only 3 wires. Brown wire for VCC power, Black wire for GND and Blue wire for Data or Output. You can connect and use it with most of the microcontrollers which has pins to read analog input voltage.
Related article: Air Quality monitor using Arduino for indoor and outdoor pollution monitor
Technical specifications:
- Input voltage range: 7-24v DC
- Analog Output Voltage: 0.4V to 2V
- Testing Range: 0.5meters/sec to 50 meters/sec
- Measuring Range: 0meters/sec to 32.4 meters/sec
- When no wind: 0.2 m/s
- Resolution: 0.1m/s
- Accuracy: Worst case 1 meter/s
For more details refer Anemometer Datasheet: link (use translator)
Circuit diagram interfacing Anemometer with Arduino to display on LCD display
Connect all the required components according to the below circuit diagram to measure the speed of wind on Arduino LCD display.
Arduino Nano is Powered from a 9V battery or an adapter by connecting +ve wire to VIN and -ve wire of supply to GND pin of Arduino. For this project you an use Arduino UNO board also
As you can see from the above circuit diagram 16X2 LCD display is powered from Arduino 5V and GND pins. And for I2C connection SDA and SCL of LCD are connected to A4 and A5 of Arduino Respectively. For more details on connecting LCD display read this article: Interfacing LCD Display with Arduino in detail
The Anemometer Brown wire is connected 9V and Black wire is connected to GND. Blue wire which is Data is connected to Arduino pin A0.
To interface this setup with OLED display instead of LCD refer this Article: Interfacing OLED display with Arduino
Program code for Arduino Anemometer:
Now its time to upload the code. connect Arduino to a PC where Arduino IDE is installed. Choose the board as Arduino NANO or which ever you use and select the correct port from the Tools menu. Install required libraries from the built in Library manager or you can download the latest version from the below links
Required Libraries:
- Download LiquidCrystal_I2C – Link
Next copy the below code and paste it in IDE workspace and press upload button. That’s it the code will be uploaded.
// Tested and compiled with no errors // measuring wind speed using Arduino Anemometer and LCD display // source - www.circuitschools.com #include <LiquidCrystal_I2C.h> // initialize the LCD library with I2C address and LCD size LiquidCrystal_I2C lcd (0x27, 16,2); void setup() { Serial.begin(9600); Serial.println ("Arduino Anemometer"); // Initialize the LCD connected lcd. init (); // Turn on the backlight on LCD. lcd. backlight (); lcd.print ("CIRCUITSCHOOLS.."); lcd. setCursor (0, 1); lcd.print ("ANEMOMETER"); lcd.clear(); delay(3000); } void loop() { float sensorValue = analogRead(A0); Serial.print("Analog Value ="); Serial.println(sensorValue); float voltage = (sensorValue / 1024) * 5; //Arduino ADC resolution 0-1023 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"); lcd. setCursor (0, 0); lcd.print ("Wind Speed"); //Here cursor is placed on second line lcd. setCursor (0, 1); lcd.print (wind_speed); lcd.print ("m/s"); 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; }
Output:
After uploading the code you can see the Analog value, Analog voltage, wind speed in meters/sec and meters/hr on serial monitor.
Wind speed in Meters/second is displayed on 16X2 LCD display with I2c adapter.
From the below table the you can observe how the wind speed is classified from its calm(minimum) to hurricane levels(maximum). Our DIY Arduino Anemometer can measure up to strong temporary winds.
Wind speed scale
|
||
Wind speeds at 10 m height
|
||
m/s
|
knots
|
wind classification
|
0.0-0.4
|
0.0-0.9
|
Calm |
0.4-1.8
|
0.9-3.5
|
Light |
1.8-3.6
|
3.5-7.0
|
|
3.6-5.8
|
7-11
|
|
5.8-8.5
|
11-17
|
Moderate |
8.5-11
|
17-22
|
Cool |
11-14
|
22-28
|
Strong |
14-17
|
28-34
|
|
17-21
|
34-41
|
Temporary |
21-25
|
41-48
|
|
25-29
|
48-56
|
strong temporary |
29-34
|
56-65
|
|
>34
|
>65
|
hurricane |
Applications of Anemometer
- Agriculture: verification of the conditions for spray irrigation of crops or burning of stubble.
- Aviation: balloon flight, glider, hang glider, ultralight, parachute, paragliding.
- Civil engineering: construction site safety, working conditions, safe crane operation, wind stress measurement.
- Training: Measurements and experiments with air flow, evaluation of outdoor conditions for the practice of school sports, environmental studies.
- Fire extinguishing: indication of the danger of fire propagation.
- Heating and ventilation: air flow measurements, verification of the state of the filters.
- Hobbies: model airplanes, model boats, kite flying.
- Industry: airflow measurements, pollution control.
- Outdoor activities: archery, cycling, shooting, fishing, golf, sailing, athletics, camping, hiking, mountaineering.
- Works abroad: evaluation of conditions.
- Science: aerodynamics, environmental science, meteorology.
If you like this project please subscribe to our YouTube Channel “Circuit Schools“ to encourage us to publish more interesting projects. If you have any doubts write to us from below comment section.