Sonic Anemometer

12,767

61

62

Introduction: Sonic Anemometer

About: Finding a simple solution to a problem.

Most of the sensors in a weather station now use miniature electronic components to measure the environment. Light, pressure, temperature and humidity can all be quantified with sensors costing a few cents. The one last remaining element is wind speed and direction. Over the last few centuries, the rotating cup anemometer has reigned supreme. Three or four cups spin in the breeze to give an indication of air speed, granted there have been improvements in detecting the spin speed but the basic principal remains the same.

Wind speed may also be measured by detecting the change in the speed of sound caused by the air flow. The earliest attempt I found of applying this method comes from this article in Electronics, 1950. There are now appearing on the market, at a cost of hundreds or thousands of dollars, ultrasonic anemometers that measure wind using similar principles. The challenge of this Instructable was to make a sonic anemometer using hobbyist components costing only a few dollars.

There have been many questions relating to the operation of this anemometer. As such, the expired patent which describes the theory is listed below.

Supplies

The main components needed to make the ultrasonic anemometer are:

4 transducers removed from HC-SR04 ultrasonic range finders

3 CD4046B phase lock loop ICs

1 Piece of strip board

Various resistors and capacitors, see circuit diagram

1 2N2222 transistor or similar

1 Arduino Uno or similar

Arduino IDE for flashing and monitoring wind

Wood to make anemometer body

Sundries like wire, solder, screws, wood etc.<

Step 1: Wind Speeds

Understanding the expected range of wind speeds is a good place to start. The Beaufort scale in the picture tells us that average wind speeds can reach over 30 m/s although short term gusts can be higher. As the velocity of sound is 343 m/s, we can expect changes of about 10% in speed due to high winds.

Step 2: Proposed Design

The design for this anemometer is based on 3 ultrasonic receivers symmetrically arranged around a transmitter transducer. Sound waves from the 40 kHz transmitter radiate outwards to the 3 receivers 25 mm away. Under still air conditions, the sound waves will reach all the receivers at the same time.
The speed of sound increases at higher temperatures which makes the sound waves spread out faster and so there will be fewer waves between the transducers. As this design relies on a fixed number of waves between the transducers, the north receiver is phase locked to the sender. Any change in temperature will alter the sender frequency to keep the wavelength the same.

Step 3: How Does It Work

In calm conditions with no draughts, all three receivers will be experiencing the same part of the sound wave front from the central transmitter. The pictures show what will happen with a north or west wind. A north wind will compress the sound waves on the north side of the sender and spread them out on the south side. However, the phase lock loop will keep the phase constant on the north receiver. Thus only the two southerly sensors will show a phase change related to the wind strength.
A similar situation happens for a westerly wind. The sound waves are compressed on the west side of the transmitter and expand out to the east. With a phase locked north sensor, we can estimate the wind speed from the difference between the east and west sensor phase.
By measuring the change in wavelength or phase at the E and W sensors, we can work out the north and west components of wind velocity. With a little arithmetic, we can then calculate the wind speed and heading.

Step 4: Construction

The body of the anemometer is made from two pieces of wood held apart with 3 mm bolts. A piece of 18 mm thick fibre board was used for the main body of the anemometer with 16 mm holes drilled for the sensors. The reflector plate was a piece of 4 mm plywood and fixed above the sensors with 3 mm nuts and bolts. Nothing rocket science, other materials could be used instead provided they are rigid and don’t bend in the wind. A hexagonal shape was used for the body because it is easier to cut than a circle! In fact, a circular design with rounded edges would present a much better aerodynamic profile to the wind... beyond my skill set.
A conical lid was added to protect the electronics from the weather and dissuade birds from using it as a perch.

Step 5: Transducers

As these sensors are run continuously, there is no need for any special dynamic performance. In fact, the sensors used in this project were unsoldered from the cheap and cheerful HC-SR04 range finder widely available. The 4 transducers are push fitted into the holes and connecting leads soldered on to the terminals. As the exact position may need a slight adjustment to tune the system, ream the holes with sand paper to give a firm but not tight fit. There needs to be about 10 mm separation between the two plates.

Step 6: Circuit Diagram

Three phase lock loop 4046 ICs are used to set the sender frequency to 40 kHz and measure the received signal from the sensors. One 4046 is used in the phase lock loop and the other two ICs measure the phase from the remaining two receivers. The phase detectors output a string of pulses where the mark space ratio is proportional to the phase shift. These pulses are averaged by the RC filter and the voltage measured by a microcontroller to find the wind speed and direction. The circuit must be powered from a stable regulated power supply because the phase detector output is power supply sensitive.

Step 7: Circuit Board

The electronics are built on a piece of strip board and mounted above the sensors. In this anemometer, the filtered output from the phase detectors was wired to a separate Arduino which measured the output and calculated the wind speed and direction.

Step 8: Setup

The setup requires a basic oscilloscope to tune up the anemometer. Temporarily wire two 10k resistors in series across the voltage supply and connect pin 9 of the phase lock loop IC to this half voltage point. Adjust the variable resistor to make the output on pin 4 run at 40 kHz.
Now we need to measure the signal on the receiver transducers and fine tune the frequency for maximum output corresponding to the resonance frequency of the sensors. The reflector plate spacing can also be adjusted for the highest signal, about 10 mm is a good starting point.
Once there is a good signal from all three sensors, the phase lock loop can be reinstated. Check the output from the phase detectors to see if the mark space ratio is symmetrical, if not, the system can be adjusted by altering the reflector spacing or the sensor depth in the fibre board.
As a final operational test, blow some air into the anemometer with a cold hair dryer and make sure the two phase detectors give a change in output voltage.

Step 9: Calibration

So far, we have made an instrument that gives two voltages according to the wind strength and direction. The next step is to convert these readings into meaningful measurements of wind speed. As most of us do not have access to a calibrated wind tunnel, we can use the local weather forecast to provide a reference for the actual wind speeds. Another alternative is to get a reference wind speed from a traditional rotating cup anemometer. Select a windy day to take the calibration readings in an unsheltered position.
We need 3 sets of readings. The first measurements are the E and W sensor voltages in still air. Next we take the anemometer outside with the N sensor pointing into the wind and take another set of readings. Finally, we turn the anemometer anti-clockwise 90 degrees and take calibration measurements for the east direction.
To a first approximation, we can treat the design as orthogonal where the north wind component is proportional to the difference between the still air and sensor voltages in the wind. The east wind component is proportional to the difference between the two sensor voltages. Scaling factors and voltage offsets can now be calculated from the calibration points.
The final wind speed can be worked out using Pythagorus on the N and E vectors. Wind direction can be estimated using the atan2 function.
These rather tedious voltage measurements and calculations can easily be handled by a small microcontroller such as an Arduino.

Step 10: Arduino Monitor

Measuring the two output voltages and converting them into wind speed and direction is a convenient job for a microcontroller such as the Arduino. The internal ADC in the Arduino can be used to read the anemometer output although a separate module like the ADS1115 would make a more accurate job of the conversion.
The next step is to remove offset voltages and scale the readings using the calibration points to give the N and W components of wind speed. Finally, the readings are combined using Pythagorus for the wind speed and the arctan2 function for direction. The sketch listed below will use the calibration readings and calculate wind speed and direction from the anemometer output voltages.
When running the sketch, the serial monitor will display the raw ADC output as well as the calculated wind speed and bearing. These raw readings are useful when taking the calibration points.
Finally, the anemometer needs siting in the wind with the N sensor pointing north.

Step 11: Conclusions

This ultrasonic anemometer may be constructed for a few dollars using components and materials easily available to the hobbyist. After comparing this design with other DIY ultrasonic anemometers described on the internet, I believe this version represents about the simplest way to sonically measure wind speed and heading. For those interested in this rather specialised subject, there is plenty of scope to optimise and improve the design. For example, weatherproof sensors could be used with extra electronics to make up for their reduced sensitivity. Another idea is to include a heater to prevent freezing in the winter.
I hope you enjoyed looking at this Instructable and may even feel inspired to make your own sonic anemometer 😊

Microcontroller Contest

Participated in the
Microcontroller Contest

Be the First to Share

    Recommendations

    • For the Home Contest

      For the Home Contest
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Make It Bridge

      Make It Bridge

    62 Comments

    0
    zikata
    zikata

    Question 17 days ago

    bonjour , merci pour le projet mnt j'ai réussi a règle la fréquence a 40kh , svp est ce que vous pouvez m'explique comment avec cette appareil on arrive a meusre la vitesse de vent
    le rôle de circuit électronique et l’Arduino .merci

    0
    zikata
    zikata

    Question 22 days ago

    Bonjour , je voudrais poser une question sur l’Etape 8 la création d’un signal à 40 kHZ , est ce que ya une autre méthode pour le faire svp parce que j’arrive pas a l’avoir ????

    0
    Itrium
    Itrium

    Answer 22 days ago

    The tx and rx form an oscillator in a PLL. The frequency is adjusted for maximum output. Any other configuration would require a complete redesign. Try and get thiscir uit to work…

    0
    subirbhaduri
    subirbhaduri

    6 weeks ago

    Hi. Amazing instructable! Thanks a lot.
    I am trying to recreate your instrument and reading through. But i wonder if the pulses and their reception couldn't be done directly from a microcontroller rather than the PLL circuit?

    0
    zikata
    zikata

    Reply 22 days ago

    Bonjour , Commentaire SVP comment vous avez réussirr avoir le signal de 40 khz???? Merci

    0
    Itrium
    Itrium

    Reply 6 weeks ago

    There is no fundamental reason why the change in phase could not be measured with a microcontroller. There are two big problems, the first being a lot of coding. Also, we need better than microsecond measurement resolution. This may need direct programming of the CPU rather than using a programming language which uses several clock cycles per instruction.
    A good project for a PhD student!

    0
    subirbhaduri
    subirbhaduri

    Reply 6 weeks ago

    wow thanks for the quick and very convincing answer. Yes, it seems better to build a dedicated PCB for this one rather than uC it.

    0
    subirbhaduri
    subirbhaduri

    5 weeks ago

    Hi again.
    I am now trying out this amazing project. All seems to work well. I have not tested it in wind yet. Just a note for others to note: For those using SMPS power supply like myself, please choose a high quality one, else all the noise will seep into the signals and mess things up. I used a 12V SMPS, then used a LM317 regulator to make a 5V DC supply. I had to play a lot with the capacitors to get a clean supply, however my 50Hz noise is still about 50 mV!!!!

    The instructions over here are very clear, so it was no problem following it.

    However, in the output I still get a high 5V, despite some wind. It seems I am also getting the 50Hz signal into it, which makes it hard to decode. Currently I am using 0.47uF caps on the outputs. Shall try to make them 2.2 uF and check.

    20230221_140809.jpg20230221_140820.jpg20230221_140903.jpg
    0
    Itrium
    Itrium

    Reply 5 weeks ago

    Hi, pleased to see that you are making good progress with this project. I agree any noise or drift from the PSU will appear in the output of the phase detector. Maybe I was lucky in using a lab power supply. I did think of clipping the signal output with a zener diode to remove noise but never got round to doing that. The other thought was to average the output signal in the software. The capacitor value is not critical, it is used to give an average output voltage.

    0
    bsee19057
    bsee19057

    7 weeks ago on Step 11

    Hi, Can anyone tell me why are we using especially the phase lock loop ICs, Like is there any alternate IC. What is there basic functioning.

    0
    zikata
    zikata

    Question 2 months ago

    Bonjour, je voudrais savoir pourquoi vous avez utiliser une résistance variable dans le montage son rôle svp ??? .

    0
    Itrium
    Itrium

    Answer 2 months ago

    Bonjour, La résistance variable règle la fréquence de l'oscillateur afin qu'elle corresponde à la fréquence de résonance des transducteurs à ultrasons.

    0
    davy3737
    davy3737

    Question 2 months ago on Step 4

    I live in Miami where the only time I really care about the wind speed is during a hurricane. I haven't seen a personal weather station that will handle 185 to 200 mph gusts. During hurricane Andrew, the national hurricane center here had all of its instruments and radar blown off the roof of their building so there was no official record of the wind.

    My question is how high a wind would this design measure? I have seen a custom design with three spikes sticking up (without a top) that was rated over 200 mph,

    0
    Itrium
    Itrium

    Answer 2 months ago

    Hi, this design measures the phase shift of the sound speed. The wind speed you are interested in would cause far more than a single cycle of phase shift. A bit like a car odometer starting from zero again after going round the clock.
    I think looking at the aircraft industry might give some ideas for measuring high wind speed, like the pitot tube.

    0
    alfredo.pavarino
    alfredo.pavarino

    4 months ago on Step 11

    interesting project, which I intend to replicate using instead of Arduino Nano put a LILYGO R T7S3V1.1 ESP32-S3,
    2 questions only:
    1) I see 2 electrolytic capacitors on the photo of the base but, on the wiring diagram the position of the same is not indicated, the polarization is missing.
    2) is it possible to power the circuit with only 3.3 V. / 3.7V.?
    Thanks in advance.
    Alfredo

    1
    Itrium
    Itrium

    Reply 4 months ago

    Hi, the 2 electrolytic capacitors are used to average the output from the phase detectors. My mistake for not using the correct symbol on the circuit diagram, the negative should be ground.
    The 4046 data sheet says the phase detectors should work with a 3V supply. The circuit should work with the ESP32 but you will probably have to tweak some of the time constants and the software to tune the system.

    0
    alfredo.pavarino
    alfredo.pavarino

    Reply 4 months ago

    Hello, thanks for the info, the software changes to the software I had already taken into account because if it works well I implement the card with other sensors.
    A thousand thanks.

    0
    giomek
    giomek

    Question 5 months ago

    Hello.
    I made the same design 3+1 sensors before 3 years ago, but I met with 'drift'. This drift has bigger value (about 5m/s). My question is: Has your meter the stable output in case of stable temperature? I mean if I put your sonic meter to cage with the same temperature without flow (speed equals to zero) for one or more days, wether result of your wind meter will stil zero speed.
    Thank you
    Libor

    0
    elpapapaco01
    elpapapaco01

    10 months ago

    i dont really get how windspeed can be calculated using phase change

    0
    Itrium
    Itrium

    Reply 10 months ago

    Hi, The speed of sound is given by the wavelength times frequency. With a fixed frequency, the wavelength will increase if the sound speed is assisted by the wind. This change in wavelength is the change in phase compared to the original sound speed. It might help to draw out a few a few sine waves under these different conditions.