# 1. Cyphal/DroneCAN Airspeed node

RaccoonLab Airspeed node is a wrapper under MS4525DO (opens new window) airspeed sensor that provides Cyphal or DroneCAN interface. It reads differential pressure and temperature from the sensor via I2C and publishes them via CAN bus. The is compatible with PX4 and Ardupilot-based autopilots and supports both Cyphal and DroneCAN interfaces. The node is highly recommended for light unmanned aerial (UAV) such as plane and VTOL for measuring airspeed.

For interface related details please refer the corresponded section:

For hardware related details please refer to hardware page.

airspeed

# 1.1. Main function

This node measures differential pressure and temperature with high rate (100 Hz by default) and publishes averaged data with a low rate (10 Hz should be enough for PX4 Autopilot otherwise it will anyway perform average filter). Publication and measurement rates might be configured using node parameters, but it is recommended to use default values.

According to MS4525DO datasheet (opens new window), the sensor has the following range of measured data:

  • differential pressure is from -1 psi to +1 psi or from -6894.757 pa to +6894.757 pa.
  • temperature is from -50 to +150 Celcius or from 223 to 423 Kelvin.

If we consider temperature ~288 Kelvin and pressure 101325 Pa according to the ISA model differential pressure interval above should be enough for up to 100 m/sec airspeed that is suitable for a wide area of small VTOL application.

# 1.2. Auxiliary functions

1.2.1. Circuit status

It sends 2 uavcan.equipment.power.CircuitStatus (opens new window) messages with measured 5V and Vin.

The first message has circuit_id=NODE_ID*10 + 0 and following 2 significant fields:

  1. voltage - is the 5V voltage
  2. error_flags - might have ERROR_FLAG_OVERVOLTAGE or ERROR_FLAG_UNDERVOLTAGE or non of them

The second message has circuit_id=NODE_ID*10 + 1 and following 2 significant fields:

  1. voltage - is the Vin voltage
  2. error_flags - ERROR_FLAG_UNDERVOLTAGE or non of them. There is no ERROR_FLAG_OVERVOLTAGE flag because the expected max Vin voltage is unknown.

1.2.2 Calibration

Each differential pressure device has an offset in his measurement and requires a calibration before usage.

There are 2 ways how can you do a calibration:

  1. Normally, an autopilot may perfrorm his own calibration of this device. For example, PX4 stores SENS_DPRES_OFF calibration parameter in flash adds his value to each measurement from a differential pressure device before converting it to an airspeed. This way might be preffered for a normal user.
  2. Alternativelly, for example, if your autopilot doesn't support such calibration, you may perform internal calibration on the node side using uavcan parameters (see 5.2. Calibration). This also might be the only possible solution in case if your autopilot doesn't support individual calibration for each differential pressure sensor (PX4 stores a single parameter for all differential pressure devices).

Calibration on the node side

In general, calibration is done using 2 parameters:

  • airspeed_calibration_offset is used for storing an offset in flash memory
  • airspeed_calib_request is used for sending a request to start an automaticall calibration.

By setting airspeed_calib_request parameter to 1 the node goes into the calibration mode for 10 seconds where it summarizes all measured differential pressures and in the end divides the sum by the number of measurements. The negative resulted averaged value is written into the airspeed_calibration_offset parameter. This offset is added to the differential pressure of each measurement. During the calibration process, the node has INITIALIZATION mode. After the initialization process, the node doesn't save parameters to the flash memory, you need to do it manually. As an alternative, you may always manually set airspeed_calibration_offset parameter.

1.2.3. Enable/disable

This function allows you to start and stop publishing via UAVCAN in real-time without physical disconnect.

1.2.4. Software version

GetNodeInfo response contains a software version that allows you to differentiate one firmware from another. See Node Properties window in uavcan gui tool.

1.2.5. Hardware version

Not implemented yet.

1.2.6. Hardware unique ID

GetNodeInfo response contains hardware unique ID that allows you to differentiate one board from another. See Node Properties window in uavcan gui tool.

1.2.7. Led indication

There is an internal led that may allow you to understand possible problems. It blinks from 1 to 10 times within 4 seconds. By counting a number of blinks you can define the current status of the node.

Number of blinks Uavcan health Description
1 OK Everything is ok.
2 OK There is no RawCommand at least for the last 0.5 seconds (it's ok, just in case).
3 WARNING This node can't see any other nodes in UAVCAN network, check your cables.
4 ERROR There is a problem with circuit voltage, look at the circuit status message to get details. It may happen when you power it from SWD since it has only 3.3 V, otherwise, be careful with the power supply. This check might be turned off using params.
5 CRITICAL There is a problem with the periphery initialization level. Probably you load the wrong firmware.

# 1.3. Software update

The node doesn't yet support software upload via CAN yet. But the next generation of the device will be. We will be using a Kocherga bootloader (opens new window) in the future. At the moment the only way to upload the software is to use a programmer. See the programmer usage section (opens new window) for details.