MicoAir MTF-01 Optical Flow Sensor¶
The is a lightweight 2 in 1 optical flow sensor including a short range lidar which uses the serial MAVLink protocol to communicate with the autopilot. This can be used to improve horizontal position control especially in GPS denied or indoor environments.
Where to Buy¶
The sensor is available from Aliexpress and other resellers
Sensor Setup¶
Use MicoAir’s MicoAssistant software using an FTDI adapter (USB to serial) to set its output protocol to “mav-apm”.
Note
With firmware versions 4.5.0 or above, MTF-01 may not be recognized by Ardupilot unless you use MicoAssistant to modify its “mav_id” to 200(any value other than 1) and configure whichever serial port’s SERIALx_OPTIONS its connected to on the autopilot from “0” to “1024”(“Don’t forward mavlink to/from” option).
Connection to Autopilot¶
The flow sensor should be mounted on the underside of the copter with the camera lens pointing downwards.
Connect the sensor to the autopilots’ serial port
Mounting Orientation¶
MicoAir specifies a different default sensor orientation for ArduPilot/PX4 than for INAV/FMT: the orientation ArduPilot assumes with FLOW_ORIENT_YAW = 0 is rotated 180 degrees from the INAV/FMT one.
If the sensor is mounted in the INAV/FMT orientation instead, which is how many third party mounting diagrams show it, set FLOW_ORIENT_YAW = 18000 to rotate the sensor’s axes by 180 degrees to match.
Warning
An incorrect FLOW_ORIENT_YAW inverts the flow feedback, which produces a positive feedback loop and can lead to a flyaway. Always confirm the orientation using the flow versus attitude check described in Optical Flow setup before attempting a flight relying on optical flow.
Parameters¶
For the following we will assume it will be connected to Serial1 port of the autopilot. Any serial port can be used, however.
Set SERIAL1_BAUD = 115
Set SERIAL1_PROTOCOL = 1 (MAVLink1)
Set FLOW_TYPE = 5 (MAVLink)
Set RNGFND1_TYPE = 10 (MAVLink)
Reboot autopilot to see rangefinder parameters
Set RNGFND1_MAX = 8 to set range finder’s maximum range to 8m
Set RNGFND1_MIN = 0.01
Set RNGFND1_ORIENT = 25 (Downward)
Once the sensor is active you should be able to observe the optical flow and range sensor data on the Mission Planner’s “Status” page. The “opt_qua” and “rangefinder1” should have some value.
Optical Flow Use and Calibration¶
Be sure to follow the setup and calibration instructions and parameters for Optical Flow setup and how to switch between outdoor(GPS) and indoor (Optical Flow) positioning.