ultrasonic wind sensor

I have completed an ultrasonic anemometer for my weather station.


Download UltrasonicAnemometer.zip from


This project is a prototype of a non-trival design. As such I expect there will be significant improvements which can be made to both the circuit and the code.

If you do find improvements please share them with the community on this forum.

First modification.

The sensors provides a perfect pearch for birds. Small ones are ok
but larger birds interfere with the transducers. It looks like a very large tof and that means large wind!

I tied a fine wire between north and south and one between east and west.

This has solved the problem sofar.

Doesn't relative humidity alter ultrasonic absorption?

Do you have to correct for that?

Yes you are right adsorbtion of sound at 40 khz does increase with humidity.

See the table - Attenuation of sound in air (dB/ km) from:


This will change the amplitude of the received signal. This is only one of many ways the amplitude of the signal can be changed. The most significant is turbulence in the air.

My design does not depend on the amplitude of the received signal. I get the difference in tof along a path and this cancels the amplitude difference. This does lead to another complication which I have explained in the pdf file.

What could effect the design is change of speed due to humidity variations.

See the table - Speed of sound in air (m /s) in the above site.

The variation is much smaller than for temperature change.

It may add an error of about 1% so I neglect humidity in the design.

Thats really interesting< i’ll have to check it out further. I’m on an Offshore construction ship and we use two ultrasonic wind sensors not unlike this made by Gill in the UK.
B :slight_smile:

I have had a good look at the Gill sensors.

Really professional and really expensive.

I could not find even a hint on their internal operation.

There really is a shortage of useful information on how they get such good specs.

The Gill sensors are very highly rated and we use them in critical dynamic positioning systems. I agree , I went to the site looking for lots of info but I guess they are keeping that under their hat. As an aside we had an industry warning that says they "may " be compromised in very heavy rain. Given the extreme rain I 've seen in the south china sea in the last few weeks , they have yet to faulter. Cheers B


I just had a look at your project report. Very interesting thanks for posting.

The following questions and observations are a bit woolly in my head, so sorry if they appear a bit dumb.

I think I understand the idea of measuring the phase shift, to see how much the signal has been 'boosted' along by the wind, can you do this on 2 axes, to get the direction as well?

Also, as an alternative to phase shift, is that kind of just measuring what is really a frequency shift? doppler style due to the wind?

If so, could you measure the frequency at the receiver rather than the phase shift?

They are not woolly.

When I first looked at the design I thought the same about doppler. After some research I found:


I will quote from his site:

You might have noticed that you aren't measuring the Doppler shift of the sound burst. A common misconception about using a sonic anemometer is that you can measure the wind speed by measuring the Doppler frequency shift of the ultrasonic signal.

Recall the high school physics experiment relating to train whistles changing pitch as they approach and recede from a stationary listener. Of course this is true, but in the sonic anemometer setup, both the listener and the train whistle appear to be moving at the same speed. So, it's more like listening to the train whistle while you're on a car in the back of the train (i.e., the pitch doesn't change) even though the train may be moving at great speed.

The Doppler signal in a sonic anemometer measures the change in wind speed, which can give an indication of the wind speed's stability at the moment it's measured. You can use this to measure turbulence and fluctuations in wind speed. Of course, this involves being able to measure the changes in the received signal's frequency. You can use a fast Fourier transform (FFT) to look at the purity of the spectrum.

Phaseshift on a waveform is equilivant to a time delay - The concept of "group delay" is related to phase shift of the wave.

Yes the tof is measured on north-south then east-west direction. From that the actual wind speed and direction is calculated.

Thanks for replying, I get it now.

Is the difference between your unit and the commercial Gill units, perhaps just that they have access to a wind tunnel and can do some final calibration after the maths?

Unfortunately I do not know the difference between mine and the commercial units.

I have trawled the net but I can't get even the slightest hint on the internal operation of the commercial units. They keep all their details commercial in confidence.

It maybe that they use cross correlation which seems to be some sort of gold standard.

I will be happy with mine if it compares well with the WMR100. I run a log of each. Sofar mine is much more accurate at the low speeds where egg cups are poor. At the higher speed there is good agreement.

A wind tunnel would be nice. I no longer have access to such facilities.

I am using a visual basic program to monitor the operation of the anemometer.

The arduino is programmed with the monitor sketch. It sends all the necessary data to the visual basic program. The following is sent from the anemometer about every 3 seconds:

T= 25.04 z= -19000 N= 4633 S= 4754 e= 89 w= -2.59....z= 25467 E= 3929 W= 3848 e= -95 w= 3.47.....Aw= 4 Dw= 126

T.... is the current temperature. z.... is north-south phase shift -- this is not displayed N....is the north time of flight S....is the south time of flight e....is the north-south transducer error w....is the north-south wind -- this is not displayed .... z....is east-west phase shift -- this is not displayed E.... is the east time of flight W....is the west time of flight e....is the east-west transducer error Aw....is the actual wind -- this is not displayed Dw....is the wind direction -- this is not displayed

I have found this very useful to road test the anemometer operation.

If you have visual basic you can download monitor.zip from:


Operation results:

After 3 months of continuous operation I am happy to move from monitor to full operation. I cannot give accuracy in terms of % as I do not have access to a wind tunnel. I can only compare it with my WMR-100 weather station and there is very good correlation. Below 5kph the ultrasonic is much more accurate because of the limitations of the eggcup sensors. It has been through rain and strong wind gusts and always gives accurate results. For my amateur requirements the sensor is a success.

Hardware changes:

The body of the anemometer is pvc and a good conductor of heat. Cooling when there is moisture in the body will result in condensation. Over a period this can lead to failure of the electronics. The solution is to ensure that the body is completely sealed from the air. To be sure I have also used a 100 g sachet of moisture absorbing pellets in the base.

Software changes:

There are a couple of small changes. One major change is in the running error calculation. The phase shift is always an exact and robust measure of tof. So every 300 sample average is used to update the error. Before I only used the values close to a zero and this was not often enough in a real world wind situation.

download UltraMods.zip from: