How to connect APM Airspeed Sensor (Pitot Tube) to INAV
Recently released INAV 1.7.2 introduced new hardware support: analog airspeed sensors. I've written new but it is new only to INAV. Analog airspeed sensors aka APM Pitot Tubes aka Ardupilot Airspeed Meter and one the market for years. And they are cheap. By cheap, I mean below $30. And until recently they were usable only in APM world.
Hardware
The hardware we are interested in, are Pitot tubes based on MPXV7002 differential pressure sensor.
Those are 5V devices. All INAV flight controllers are 3.3V devices and that creates a small problem. 3.3V analog to digital converters cannot be used to measure 5V signal.
To overcome this problem, a 1:2 voltage divider will be required. You will need two resistors with the same resistance. Anything from 1kOhm to 1MOhm will do. It is really up to you. I used 100kOhm resistors and it worked fine.
INAV already expects 1:2 voltage divider is used, so you do not need to set anything else.
Software
Before connecting the airspeed sensor, you also have to find a free ADC converter. Most boards have 3 analog-to-digital converters: Vbat, Current and RSSI.
- Vbat is not a good choice. Even if it is not used (rare case), it has its own voltage divider that would break measurements
- Current is our first candidate
- RSSI is the second one
Since most of my airplanes have current meters, I use a RSSI channel. To prepare APM Airspeed Sensor to use RSSI ADC channel, goto CLI and:
get adc_channel
and note channel assigned to RSSI pin. In my case it was channel 3set rssi_adc_channel=0
- disable RSSI ADCset airspeed_adc_channel=3
- map ADC channel 3 to airspeed sensorset pitot_hardware=ADC
- enable analog pitot tubesave
Steps 4 and 5 can also be done via Configuration tab in Configurator, but other have to be performed in CLI.
Usefulness
In the latest official release of INAV: 1.7.2 Pitot tube usefulness is somehow limited: airspeed can only be saved in Blackbox logs. Also, a list of boards supporting to function is short: Airbot F4, AirHeroF3, KFC32F3, Omnibus F4 and OpenPilot Revolution.
But, next release (INAV 1.8 or 1.7.3) will:
- Enable analog airspeed sensor on more boards
- Display current airspeed in OSD (only boards with build in OSD)
- Perhaps even closed loop speed control will be added, but this is absolutely not confirmed yet
I'm Paweł Spychalski and I do things. Mainly software development, FPV drones and amateur cinematography. Here are my YouTube channels: