Skip to content

Latest commit

 

History

History
128 lines (74 loc) · 6.76 KB

README.md

File metadata and controls

128 lines (74 loc) · 6.76 KB

An Air/Ground Speed Sensor (Logger) Using Pitot Tube and GPS

(C) 2023 ekspla

Abstract

An air/ground speed measurement system with logging functionality was easily built with a Pitot tube 1 and a GPS receiver using micropython 2. The system allows us to measure the air and the ground speeds almost simultaneously at 5 Hz and more in various outdoor activities. As a demonstration of this system, a correlation map of the air and the ground speeds of drafting in cycling 3 is shown.

Materials

  • SoC: BlackPill (ARM Cortex-M4F, STM32F411CEU6, 8 MB SPI flash), WeAct Studio 4.

RTC clock (LSE) adjusted to 32.768 kHz using a pair of additional ~5 pF C0G capacitors, pin headers of PC14/15 removed, a coin-cell (CR2032) attatched to VBAT.

A universal counter and this code 5 were used to measure/adjust the LSE frequency.

Micropython 1.20.0 2 installed via ST-LINK 6. The port (board definitions) to build the micropython firmware was obtained from github 7 , 8.

  • Pitot tube: A cheap pitot tube for UAVs (drones), Aliexpress 9.

A home built GoPro (GP) 10 compatible mount for the tube and the differential pressure sensor (see below).

  • Differential pressure sensor: D6F-PH5050, OMRON 11, +/- 500 Pa, I2C.

d6f_ph.py 12

Similar sensors such as MS5525 (TE Connectivity) and SDP810 (Sensirion) may be used with their appropriate drivers.

  • GPS receiver: u-blox NEO-M8N 13, UART, 115200 bps.

    Update rates were set at 0.5, 5, and 5 Hz for GNRMC, GNVTG and GNGGA sentences, respectively.

micropyGPS.py 14, a forked/modified version of inmcm/micropyGPS 15

  • A display to show the air/ground speed in real time (optional): A cheap HD44780 (16x2 character) type LCD, I2C.

lcd_api.py, dhylands 16

  • SD Card (optional, SPI): Used for logging data, FAT format.

sdcard.py, micropython-lib 17

  • Environmental sensor, BMP280 from BOSH Sensortec 18, (optional, I2C): Used for air density calibration, as well as for calculating altitudes.

A modified version of Adafruit 19 driver; normal mode, oversampling (Px16, Tx2), and w/o IIR filter.

Note that this sensor should be protected against direct sunlight and air stream. A tiny piece of black open-cell foam (sponge) may suffice.

Assembling

Most part of the micropython codes were precompiled using mpy-cross 20 before installation. The assembled units of SoC/GPS/display and air speed sensor are shown in the photos (see below). The procedure to calculate air speed from differential pressure of Pitot tube is shown in elesewhere. A link to Wikipedia 1

PHOTO_DISPLAY_UNITPHOTO_SENSOR_AND_PITOTPHOTO_SENSOR_UNIT

In the following experiments, the air speed sensor unit shown in the 3rd photo (GP mount, consisting of the Pitot tube and the differential pressure sensor) was mounted in front of a bicycle. Update and logging rates were set at 5 Hz (200 ms interval), though the system can handle > 10 Hz.

Calibration

Air speed was calibrated by using Pitot coefficient and an offset of differential pressure. Its accuracy was tested in a foggy morning around dawn (no wind / no sunlight). See almost perfect fit in the correlation map below. The tiny deviation from the diagonal line in 10-20 km/h range may be caused by headwinds of oncoming cars.

FIG1

A Demonstrative Result -- Visualizing the Effect of Drafting in Cycling --

A pair of bicycles were used for this experiment in a day of almost no wind outdoor.
The air speed sensor was attached in front of the trailer's bicycle after the leader's bicycle following in line. The distances between them were kept 1.0-1.5 m at ground speeds below 40 km/h, while a bit longer distances at above these speeds for safety reasons.
The effect of drafting is easily seen in the figure; the measurement points in the correlation map start to deviate from the diagonal line by increasing the ground speed at above 10 km/h.

FIG2

It should be noted that this data was easily taken by a single experiment of 16 min, while most of the data in literatures consists of at least a couple of experiment, i.e. one with and the other without the leader's bicycle. Ref.

Concluding Remarks

An affordable priced (for the hobbiest) system to simultaneously measure the air and the ground speeds outdoor was easily built. As a demostrative example, a mesurement of drafting effect 3 in cycling outdoor is shown.

This system can be modified to show the effect of wind direction outdoor as well, by using multiple air speed sensors (possibly three, each at an angle of 120 deg.) and vectorial math.

References

Pitot Tube

Drafting (Aerodynamics)