SparkNavi Documentation

MTF-01 Optical Flow Setup

MicoAir MTF-01 integrates optical flow + laser rangefinder in one module, enabling position hold in GPS-denied environments (indoor, under bridges, beneath canopy). This guide covers integration with SparkNavi Blue.

Hardware Wiring#

Connect MTF-01 to the SparkNavi Blue TELEM2 port (UART communication).

TELEM2 pinout:

PinSignalDescription
1+5VPeripheral power
2TXUART send (to MTF-01 RX)
3RXUART receive (from MTF-01 TX)
4CTSFlow control (unused here)
5RTSFlow control (unused here)
6GNDGround
MTF-01 module

micoAssistant Pre-Setup#

⚠️ Important: when using ArduPilot 4.5.0 or newer, ArduPilot may not recognize the MTF-01 with default MAV_ID.

Use micoAssistant to connect to MTF-01 first and adjust:

1. Set Communication Protocol

In the RangeSensor settings dialog, set Protocol to Mav_APM (or PX4 if you use PX4 firmware).

micoAssistant RangeSensor settings

2. Modify MAV_ID

Change MAV_ID (shown as Sys id) to 200 (any value other than the default 1; 200 is common).

3. Other Settings

FieldValueDescription
Protocol

Mav_APM

ArduPilot firmware
Optical flow direction

0°

Mounting rotation
TOF_ID

0

Rangefinder ID
Measurement frequency

100Hz

Laser update rate
RNG_ORIENT

DOWN

Pointing down
Interface type

UART

Serial mode
Optical flow scaler

100

Flow gain — adjust by airframe size
Sys id

200

MAV_ID (non-default)

Click Modify Settings to write to MTF-01.

ArduPilot SERIAL2 Configuration#

In Mission Planner Config → Full Parameter List:

ParameterValueDescription
SERIAL2_PROTOCOL1 (MAVLink1)TELEM2 protocol
SERIAL2_BAUD115 (115200)TELEM2 baud rate
SERIAL2_OPTIONS0Keep default 0 on ArduPilot 4.6.3+ ; older versions may need 1024 (Don't forward MAVLink to/from)
SERIAL2 settings

⚠️ Version notes: - ArduPilot 4.6.3 and newer: SERIAL2_OPTIONS stays at 0 - ArduPilot 4.5.x – 4.6.2: SERIAL2_OPTIONS may need 1024 (check "Don't forward mavlink to/from")

Distance Sensor (RNGFND1) Setup#

After rebooting, these parameters become available:

ParameterValueDescription
RNGFND1_TYPE10 (MAVLink)Rangefinder type
RNGFND1_ORIENT25 (Downward)Mounting orientation
RNGFND1_MIN_CM5Minimum effective range (cm)
RNGFND1_MAX_CM1200Maximum effective range (cm)

RNGFND1_ORIENT = 25 corresponds to "Downward" per the official parameter docs.

Optical Flow (OPTFLOW) Setup#

ParameterValueDescription
FLOW_TYPE5 (PX4Flow)Optical flow type (MAVLink)
FLOW_FXSCALER0X-axis gain (start at 0, tune in flight)
FLOW_FYSCALER0Y-axis gain
FLOW_ORIENT_YAW0Mounting yaw rotation (degrees)

Verification#

After setup and reboot, in Mission Planner Status page:

  • sonarrange: live rangefinder reading (changes with altitude)
  • flow_x / flow_y: optical flow velocity

On the ground, moving the flight controller laterally should change flow_x / flow_y; raising or lowering the FC should change sonarrange.

Further Reading#