Wind sensor arduino

Once we have confirmed all the other sensors are working okay we now hookup the last sensor which is the Davis anemometer. This device has two sensors. The wind direction is measured using a potentiometer that changes it's resistance depending on the direction. We connect this to an analog input on the Arduino. The wind speed is detected by the cups opening and closing a reed switch. A small magnet on the wind cups passes this reed switch once per revolution.

The output of this reed switch is connected to a digital input on the Arduino. The number of revolutions is counted for a time period which is then converted to wind speed.

The time duration we use is 2. Part 1 Hookup and wind direction calibration. Part 2 How to measure wind speed. Part 3 Software to determine wind speed and direction. To get the wind speed we need to count the number of revolutions over a certain time period. We then apply a formula to calculate the wind speed in miles per hour.

We have used the time period of 2. We are going to use a timer interrupt which triggers every 0.

wind sensor arduino

We use the timerCount variable to count up to 2. We calculate the wind speed in the interrupt handler routine as it time critical. You need to be careful around timing critical calculations in the main loop and when you are using commands such as Serial. If you have multiple Serial.If you are interested in creating a DIY Arduino wind speed meter or anemometer to monitor the wind strength in your location, you might be interested in this quick tutorial I have put together to create a very basic Arduino wind speed meter, that my family use on a daily basis to capture wind meter readings in mph and record the fastest speed since the last reset.

Although they provide a quick and easy way to start monitoring wind speed, most of the installations monitored other variables such as rainfall, which at the moment we are not interested in. So I decided to create a simple DIY Arduino wind speed monitor that we could tweak over time and eventually upgrade to a Raspberry Pi and send the data to a website wirelessly.

The first stage of this project however was to create the basic DIY Arduino wind speed monitor to check that the parts functioned as required and write the code. After receipt of the Maplin Anemometer it soon became obvious that you get what you pay for, and the quality of the anemometer would not have lasted long in the conditions in our coastal location.

As you can see from the image above the Adafruit anemometer is supplied with a length of 3 core cable and three connections. A black wire to power and signal ground, a brown wire for power which can be anything from v DC depending on your needs and availability, and a third blue wire that provides measurements via analog voltage.

After the initial setup was wired together and the family were staring at the screen for some time to catch a glimpse at the fastest wind speed. I made another alteration to the code that now recorded the highest wind speed since the last reset of the Arduino Uno, and positioned this in the lower right hand side of the LCD as the max wind speed, while still showing the real time wind speed on the left of the screen.

I mounted the DIY anemometer on one of our fences away from any buildings to try and provide it with enough space to be able to get a clean wind speed reading and connected it to the Arduino Uno which was positioned inside the house using a 15 m length of cable. The Arduino Uno is powered by a mains 12v adapter and now provides us and visitors with hours of fun trying to guess how fast the speed will be during the night or when any storms hit us during the day.

Grab the latest Arduino Wind Speed code here. If so, set wind speed to zero. I have embedded the code above which you are free to use and please if you do see any more tweaks that can be made please let me know in the comments below.

The Arduino wind speed monitor has been created to provide a rough estimate of the wind speed and should not be used for any important meteorological calculations. In the next stage of the project I hope to develop the system even further during my spare time and upgrade the Arduino Uno to a Raspberry Piwhich will then be capable of transmitting the wind speed data to a website for logging. As soon as this is completed that stage of the build I will keep you updated and add a link to it here once complete.

Below is a list of components you will require to complete this easy to build Arduino wind speed meter. As questions about the build please leave them in the comments below and I will do my best to answer them.I wanted a better wind vane, one that displays graphically on a compass rose and has a real time display, not the usual display delayed by 2 to 3 minutes like the WMR You can't really get an idea of wind conditions and gusts with a consumer weather station.

The reason those displays are delayed is that they are trying to save battery power and the related solar panel cost by transmitting infrequently. This unit is powered by the display unit.

I tried to keep costs lower than my previous wireless wind vane by using PVC sprinkler pipe rather than copper pipe. Also, by designing a wired system, that eliminates the wireless transmitter and receiver, instead using cheaper RS transceivers.

Wired systems can operate over greater distances and at greater speed without data dropouts that would be very annoying in the display unit. Be sure to use best practices for anything that might conduct electricity in a storm. Did you use this instructable in your classroom?

Add a Teacher Note to share how you incorporated it into your lesson. Adapter link.

wind sensor arduino

Arduino Pro Mini 5v, 16 Mhz for vane and Anemometer link. SN RS transceiver link. Davis replacement wind vane cups link. Hall sensor for Anemometer link.

Arduino Weather Station Project - Davis Anemometer

Teensy 3. The vane sensor requires an inexpensive small Arduino to convert the Hall direction data to Serial baud for transmission via the RS chip. The Arduino also uses an interrupt routine to count revolutions of the wind cups a different hall sensor outputsee the test1 sketch. The x color display is great, but unfortunately needs a bit more computing speed than the Uno an Uno will work with the display, but the direction arrow flickers.

Therefore, a Teensy 3. Good bearings are key to the proper operation of both the vane and the anemometer. The vane bearings should have the metal bearing shields removed for less friction; clean out the grease with WD, then lubricate with a very light oil like the Liquid Bearings brand. Luckily, the bearings edges are camphered so they will tend to push the tubing larger.

Find a deep socket or similar to press the bearings in without pressing against the inner bearing race. For the anemometer bearings I used 2 miniature ceramic RC car bearings and fit them into a brass tube with a method similar to that used for the larger vane bearings.

The Hall sensor should be positioned so that the sensor lettering faces the rotating magnet. The hall device leads can be epoxied to the bearing assembly. Cut the allthread to about 12" in length, and attach the diametrically magnetized magnet.

You can make it easier to align the magnet on the rod by epoxying a bit of wood to the allthread as a platform. Next, form a bit of tinfoil around the magnet, then epoxy just the tinfoil to the wood part. Finally, epoxy the magnet into the formed tinfoil, the foil prevents the magnet from moving to one side or the other due to magnetic attraction to the allthread. Install the sensor by epoxying a piece of shish kabob skewer across the bottom of the MLX adapter, then epoxy the skewer with sensor in the PVC just above the access hole.

For the display unit, cut a hole in a soap dish to fit the display and hot glue in place. Use a female header attached to a strip of perfboard, and wire per the circuit diagram.

Epoxy the Ethernet receptacle to the bottom of the soap dish, and wire to the power and RS board. Install a USB battery bank or just a 5 volt power adapter jack and power switch. Testing was initially done with a Arduino Uno for the display, and was found to be too slow to make a real time arrow display for wind direction, so a Teensy 3.

Testing included using a Bluetooth wireless interface. Unfortunately, the wireless connection didn't work well at the higher data rate required for real time, too many data glitches at baud. Also wireless wasted far too much power, even using Bluetooth 4.This three part tutorial covers the interfacing of the Davis Anemometer to the Arduino.

In the first part we cover the detection of the wind direction. In Part 2 we go through how to measure the wind speed. In the final part we update the software to measure both wind speed and direction and provide some other functionality. For product details including circuit diagrams then click here. There are two connections to the Arduino. The Wind speed circuit is connected to a digital pin Pin 2 in this case and the wind direction circuit is connected to an analog pin Ananlog Pin 4.

The wind speed circuit is a switch that is activated once revolution of the wind cups. In this hookup we are using a 4. This will pull the pin 2 to 5V when the switch is open. If we don't use a pullup resistor the circuit voltage could float and cause false triggers on the input.

When the mercury switch on the wind cups close then the pin 2 will be pulled to GND for a short duration while the magnet passes the switch. We use this pulse on pin 2 of the Arduino to detect every time the wind cups goes through one revolution.

In Part 2 of this tutorial we go into more detail on measuring the wind speed. The wind vane has a 20k linear potentiometer attached to it.

wind sensor arduino

The output from the wind direction circuit is connected to a analog pin on the Arduino. As we move the wind vane around we should get a reading between 0 and The Arduino has a 10 bit A to D converter which gives us the range of 0 to This would also correspond to a voltage of 0 to 5V.

In the software we need to convert the 0 to to a 0 to range to give us the wind direction. The potentiometer in the wind vane has a dead band that will result in the value 0 on the analog pin. The diagram below shows the dead band for the Davis anemometer we were using for testing.

In this image we are looking down over the top of the wind vane. The anemometer is resting on the cups. The wind vane is calibrated from the factory to be 0 when the vane is lined up along the length of the support bar pointing away from the mounting bracket.

We can use this sketch to read the output from the wind vane. The sketch reads the analog pin value. We then convert the 0 to range to a direction value that ranges from 0 to We use the map command to translate the two value ranges.

Using an Anemometer and Arduino to Measure Wind Speed

We are using the offset value of 0 on line 5 as we are have the support arm pointing to magnetic north. We discuss the calibration of the wind vane below. The output from the sketch is the vane output value 0 - in the first column and the translated direction value 0 - in the second column.

At this stage the vane output value of 0 will correspond to a direction value of 0. Likewise the vane output value of will display as in the direction column. The simplest way to set up the anemometer for wind direction calibration is to have the mounting arm pointing directly to north on the compass.The three type wind speed sensor is an instrument which can measure the wind speed.

It is composed of shell, the wind cup and circuit module. Photovoltaic modules, industrial microcomputer processor, the current generator, electric current and so on are integrated in the internal drive. The materials of sensor shell and wind cup is the aluminium alloy which use the special mold precision casting technology,the size of the tolerance is very small, the precision of the surface is very high,and internal circuit has been protection processing,the sensor has high strength, weather resistance, corrosion resistance and waterproof.

The plug of the cable is a military plug,it has a good anticorrosive and prevent erosion performance that it can ensure the instrument used for a long time,at the same time,In the case of using relevant specifications which ensure the accuracy of the wind speed acquisition. This product can be widely used in engineering machinery crane, crawler crane, door crane, tower crane, etc.

DFROBOT brings you the anemometer sensors, its wind speed were judged by adopting the output voltage signal 0 to 5 vusers can easily read the level of wind speed by our instruction and sample code. Please make the external power DC V and the wiring to Arudino in same ground, i.

In the diagram, it was not indicated out.Pages: [1] 2. Wind Speed and Direction Sensor. Hello people! I am new to the arduino world and i am thinking of making my first serious project. A small weather station. What i have difficulties to find is a proper and not too expensive sensor to measure wind speed and direction.

Any suggestion will be highly appreciated! Thanks for your time. Re: Wind Speed and Direction Sensor. Is there any ready affordable anemometer in the market or the only solution is a DIY one?

Quote from: manos on Sep 13,pm. Quote from: johnwasser on Sep 13,pm. Wind speed sensor 1 unit 2. Wind direction sensor 1 unit 3. Rain gauge sensor 1 unit 4. Be careful buying el cheapo anemometers off the net. Many will not come with any calibration data which means that you wont know what the relationship between spin rate and the wind speed actually is.

Quote from: johnwasser on Sep 15,am. Quote from: mauried on Sep 15,am. Or any other sensor with rj45 cable?Add the following snippet to your HTML:.

Anemometer or a wind speed measuring device is a common weather station instrument. It was costly online, so I built one! Project tutorial by Achindra Bhatnagar. The other day, I was discussing an IoT project with a talented student group. We were running through a bunch of sensors that they can use in their project. Too much for a college project.

Thus, if electrical energy can turn a DC motor, mechanical energy should generate electricity. I need to capture wind energy to turn my dc motor and that should generate electricity which I can check using an Arduino, translate to a scale and use. LED lights up! Now that I have a basic proof of concept. I started working on the final product. Following pictures capture various stages.

I took 4 identical plastic scoop spoons from my Wife and pasted two together. Then I pasted this twin spoons perpendicular to each other on the two ends of the motor shaft. This formed the core assembly of my anemometer. Next, I mounted this assembly on a long pencil and fixed it on a small pencil stand. I made arrangements to mount my Arduino board on this stand. I wrote the following Arduino code to read analog data from A0 and plot it on a graph.

I printed sensor value to serial console and launched Arduino's graph plotter to see results. Please log in or sign up to comment. Project tutorial by Francesco Guerri.

wind sensor arduino

Project tutorial by Ingeimaks Ingeimaks. I've always wondered if there were any real differences between temperature and humidity sensors, especially DHT11 and DHT