Open Source Ultrasonic Anemometer

Weather stations are a popular project for experimenting with various environmental sensors, and for wind speed and direction the choice is usually a simple cup anemometer and wind vane. For [Jianjia Ma]’s QingStation, he decided to build another type of wind sensor: An ultrasonic anemometer.

Ultrasonic anemometers have no moving parts but come at the cost of significantly more electronic complexity. They work by measuring the time it takes for an ultrasonic audio pulse to be reflected the receiver across a known distance. Wind direction can be calculated by taking velocity readings from two ultrasonic sensor pairs perpendicular to each other and using a bit of simple trigonometry. For an ultrasonic anemometer to work properly, it requires a carefully designed analog amplifier on the receive side and a lot of signal processing to extract the correct signal from all the noise caused by secondary echoes, multi-pathing, and the environment. The design and experimentation process is well-documented. Since [Jianjia] does not have access to a wind tunnel for testing and calibration, he improvised by mounting the anemometer on his car’s roof and going for a drive. This yielded readings that were proportional to the car’s GPS speed, but a bit higher. This might due to a calculation error, or external factors like wind, or disturbed airflow from the test car or other traffic.

Other sensors include an optical rain sensor, light sensor, lighting sensor, and a BME280 for air pressure, humidity, and temperature. [Jianjia] plans to use the QingStation on an autonomous boat, so he also included an IMU, compass, GPS, and a microphone for environmental sounds. The fact that none of the sensors have moving parts is a major advantage for this use case, and we look forward to seeing the boat project. All the hardware and software are open-source and available on GitHub.

We covered another ultrasonic anemometer a few years ago, but it had a different sensor arrangement. IF you prefer simplicity, the more common cup anemometers can be built from a range of scrap materials, including old hard drive parts and plastic Easter eggs.

11 thoughts on “Open Source Ultrasonic Anemometer

    1. Copyright commons, Name the original autor, Not commercial.
      I dont see whats killing the “open source” here… Feel free to use it as long as you dont sell it afterwards and still name him somewhere.

    2. Source codes are under Apache-2.0. Only documentations and PCB are under CC. I can change them all in Apache 2.0 if CC-BY-NC is really concerning people. Yes, I am the author of QingStation.

  1. Any engineer with the brilliant foresight of using SCons is good to go for me. Rock on dude.

    Attempted to make an UA about 8 years ago (same reference design that this guy used) and was never successful as the two cited examples. As each unit seems to be a custom tweak, my failure was probably related to the many details involved in the construction and calibration and configuration of such an instrument.
    The UA signal conditioning circuit response does not make sense (am probably wrong because I just did two single-point calculations). Someone want to run this in spice for a bode plot?

    I cannot access top of the mast on two of my weather stations. For these I use hot-wire anemometers in tubes, where the vector math is similar to the UA system (which is where I got the idea of using air flow ‘vectors’). Resultant wind-speed vector accuracy is 1% when ambient is 60mph winds each summer/fall during ‘Santa Ana’ winds. RH is seldom > 50% for more than a few hours, and can be in the single digits for several days during Santa Ana wind events.

    What is purpose of the light sensor? Radiated solar power? Flux vs wavelength?

    CMSIS is a significant abstraction layer. My simple mind tends to avoid RTOSs and use scheduler stacks. You are a better engineer than me for being able to keep up with all of that stuff. Geez, kids these days..

  2. The air will be accelerated to a higher speed over the top of the car in accordance with Bernoulli’s equation. They need to be at least 4-5 times the height of the car to minimize the effect, but that would likely hit branches and electrical wires.

    1. His distance above the roof is fine. People test anemometers with cars all the time. That is well above the displaced air, and skin friction height. If it were lower, or farther towards the back of the vehicle, it could have problems. The displaced air does go farther up after the car passes. It won’t that close. Don’t put it 3″ above the back bumper. Don’t try to get accurate readings while following a tractor-trailer truck.

      The only issue that he’d run into is inaccuracies with the speedometer. The speedometer almost always reads a little faster than the actual speed. The easy fix is to use a GPS speedometer, and drive a distance on a straight flat empty (both directions) road, with the cruise control set.

      Air displaced by vehicles ahead of him, or driving the other way, can disturb the airflow. That’s why I said empty.

      I’ve been using my GPS’s speed now instead of the built-in speedometer speed. The only real problem there is that there is a little lag when accelerating and decelerating. That’s why I said a distance. Turns can also interfere with the GPS speed, but unless it’s a quick 90 degree turn, it won’t be a problem. … that’s why I said straight.

      If the GPS app and GPS receiver are fairly modern and accurate, he should be able to consider it calibrated to 0.1mph.

      According to, “≤0.006 m/sec over any 3-second interval, with 95% probability”. 0.006 m/s is 0.013 mph. Longer and straighter tests will increase the reliability of the measurement. I’d still just call it ±0.1 mph. Well, assuming the anemometer repeatedly and accurately shows the same ±0.1 mph. That kind of speed will be hard to match with the car’s cruise control anyways. But I don’t think anyone cares about 0.1mph for a PWS.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.