This device has four ultrasonic transducers arranged to send and receive signals bidirectionally, North-South and East-West. They transmit short bursts of 300 KHz ultrasonic waves. In the absence of any wind, the time of flight is equal in both forward and backward directions. When the wind blows, even slightly, the moving air carries the sound waves a little faster in one direction. By precisely measuring the time of flight in four directions, the speed and direction of the wind can be calculated.
For a light breeze, the time of flight difference might be less than a hundred nanoseconds. The signals from the transducers are captured using a 5 MSPS ADC. A matched filter performs cross-correlation followed by curve-fitting to produce a high precision time delay measurement, much better than one ADC sample period.
The custom PCB includes analog and digital circuitry, controlled by an STM32L431. A separate barometric / temperature / humidity sensor is included. A CAT-5 cable provides power and communications with an indoor PC using RS-422. An auxiliary STM8 microcontroller is optionally used to force the STM32 into bootloader or application mode, based on commands from the host. This ensures a robust firmware update, so the device cannot be bricked. The enclosure is 3D printed.
All of the signal processing (filtering, cross correlation, interpolation, and curve-fitting) is performed on the STM32, which has the ability to produce wind speed and direction measurements at about 1 Hz. For development purposes, a Qt desktop app was written to retrieve raw and processed data for plotting and analysis.
Initial results look promising. Future work includes calibration, characterizing performance across temperature, and improving accuracy in gusty conditions.