Wind Vanes – What They Tell Us And How To Use Them

2024.12.18

Leave a message

Hello everyone, today we will be looking at various meteorological instruments that professionals and amateurs use to measure the weather. Weather affects all of us, right? What we are actually going to talk about is the weather vane, which measures the direction of the wind.


About the weather vane. Which way is the wind blowing? You know, sometimes that's important to know because you can see when a storm is coming or you want to know how to put up flags and things like that. It's a really cool little instrument. We're going to talk about how this works. Okay, so we're going to talk about how this works.

Then finally we’re going to talk about some of the other ways you can measure wind speed in addition to using just a wind vane.

So let’s launch right into this. This is a wind vane. It looks very much like the wind vanes that have been on top of barns for many, many, many years. The wind blows and because of the string of this flat back here, it will eventually stabilize on which direction the wind is blowing. You mount it so north is pointing north. There’s a little N on this somewhere and you mount it up there and then your computer has to read it, and that’s where we’re going to start talking about the way this works.

This is a picture that shows you how a wind vane works, but I need to explain it a little bit. How it works is that there are 8 little switches inside the wind vane. As the wind vane moves around a little magnet inside the wind vane (very similar to an anemometer), it will go through each of these 8 switches. What it does is it switches different resistances. Now we don't have to talk about things like resistors and capacitors. Resistors oppose the flow of electricity, but when current passes through a resistor, a voltage is created.

What you do as that little magnet goes around in there and stabilizes on something. It connects a couple of resistors together, one or more resistant together here and that creates a certain voltage and the resistors are set up in such a fashion that everyone of 16 directions has a different resistance value, so as it turns around here, it changes based on the location. Since we have it connected to a known voltage, 5 volts or 3.3 volts coming off your computer, we can tell by looking at the voltage in a voltage divider effectively measuring the current, we can tell which resistor has been clicked. Now that creates a voltage. Now what is the voltage?

So we have two things in the computer world. We have digital, which are 1’s and 0’s and analog voltages, which vary between 0 and 5 volts in this case, or 0 and 3.3 volts if you hook it up to a Raspberry Pi, but generally it is between 0 and the power supply value. I’m just going to say 5 volts for the rest of this talk just to understand in some cases you’d have 3.3 volts on it. So the voltage varies between 0 and 5 volts and depending on what resistor you have connected, the voltage will vary between 0 and 5 volts. So by looking at the voltage and comparing it to a table, we can actually determine which direction our wind vane is pointing. If I had a Ohm Meter hooked up to this right now, you could actually see the resistance.

So what does this look like for computers? From a technical point of view, everything is analog, but for digital engineers, for the way we play with computers, we abstract them into 1s and 0s, all voltages are either 1 or 0, and you stay away from voltages in the middle where it could be one or the other. That's how digital works. Remember, computers deal in 1s and 0s.

So what we have to do, we have to convert this voltage into a digital value. And we do that by using the magic of an analog to digital converter. It converts an analog signal to digital numbers. Now on the Arduino, which has an analog to digital converter built in, which we’ll look at in a moment, has 10 bits of accuracy. That’s 1024 values. So you read this 1024 bit value and scaled it between 0.0V and 5V  (0 = 0.0V and 1023 is 5V).

Each one of the wind directions follows this little table here, which I’m not going to bother with, but it’s in the specification for the Weather Rack and we can take that information and by knowing what voltage is there, we can convert it to wind direction. So all pretty simple. Once we have it in the computer, we know what the wind direction is. So let’s talk just a little bit about what a system like that looks like. Here we have the wind vane and we get a voltage off there, we know what that voltage is and we actually measure that by using the  ADC, the analog to digital converter.

And then it goes to our computer. So we measure the voltage on the Wind Vane, then it  goes in the ADC and then the analog to digital converter converts from analog to digital 1’s and 0’s and sends it to the computer and then we can interpret that as what the wind direction is by looking at those values.

Well, you know, you can measure wind direction with a wind sock and you can rotate that around and you could actually look at that. You can have a big propeller on the front of this and get wind speed. And wind direction out of one particular instrument.

We choose to use an anemometer, which is a separate instrument. You can also do it in a couple of cool other ways. One of those real cool other ways is to use a bunch of ultrasonics. You have the ultrasonic transmitters in a circle. And by looking at the doppler effect, you can actually tell, well the wind’s coming from this way. Remember, you’re a little computers really fast and can measure the speed of sound very easily. So little shifts in the speed of sound can tell you the direction through that.

That's really cool. So let's summarize what we've been talking about. You found the weather vane. We know how it works, there's a little switch here, connected to a resistor, the resistor, and then it's read by an analog-to-digital converter, converted into the digital domain inside the computer. We determine that by looking at a table,That's it for today's talk on weather instruments. That's how a weather vane works.