MTF-01
Optical Flow & 8m Range Sensor 2IN1
MTF-01 Optical Flow&Range Sensor
2IN1 sensor,multiple protocol built in,highly suitable for Ardupilot/PX4/INAV
Specifications
- Output Mode: UART 115200
- Output Interface: LVTTL (3.3V)
- Protocol: Micolink/Mavlink/MSP
- Output Rate: 100Hz
- Firmware Supported: Ardupilot/PX4/INAV/FMT
- TOF Range: 8m@90% reflectance/600Lux; 5m@90% reflectance/60KLux;
- Center Wavelength: 850nm
- Emitting Half Angle: 3 °
- Dead Zone: 2cm
- Ranging Accuracy: 4cm(<2m@90% reflectance);2%(>2m@90% reflectance)
- Optical Flow FOV: 42 °
- Max Speed Measurement: 7m/s@1m height
- Ambient Light Demand of Optical Flow: >60Lux
- Optical Flow Working Distance: >8cm
- Light source: LED
- Power Consumption: 500mW
- Supply voltage: 5V
Physical
- Mounting: 24.3 x 12mm, Φ2.5mm
- Dimensions: 29.3 x 17 x 14.5 mm
- Weight: 4.5g
- 3D Model
- Case(STL)
- GEPRC Cinebot30 OPTICAL FLOW & LIDAR SENSOR MTF-01 holder
Micolink
The micolink is a lightweight protocol customized by MicoAir Tech, prepared for developers who are ready to write their own code to read sensor data.
MicoAssitant software can used for configure protocol or other parameter of MTF-01.
When you don’t have a USB-TTL module, you may refer to this tutorial:
Configure MTF-01 Sensor By Using Ardupilot’s Serial Passthrough Function
Protocols
MTF-01 module integrated with multiple protocols,include:
- Micolink — a custom protocol, can support FMT
- MSP — support INAV
- Mavlink_APM — the mavlink protocol that can support Ardupilot
- Mavlink_PX4 — the mavlink protocol that can support PX4
Set up protocol by using MicoAssistant
- Step1 : Connect the MTF-01 to PC by using the USB to TTL module.
- Step2: Open the windwos device manager and check if the USB module has been recognized.
- Step3: Open the MicoAssistant software, select the correct COM in the upper right corner, baudrate should be 115200, and then the connection icon.
- Step4: If the MTF-01 has been successfully connected, the software will recognize it, and will output some messages and display the firmware version in the lower right corner. Then you can click the “SETUP”(gear) icons to open the setup page, it will happens nothing if there is any wrong with the connection, and you should check the previous
- Steps5: Select the protocol you want to use in the setup page, and then click the write button, the output protocol of the module will be successfully modified, and the software message box should display a message that the setting is successful.
Attention
The MicoAssistant software may crash in some language versions of Windows systems. You can try using the “no_chart” version.
Setup Tutorial For Ardupilot(4.1.x-4.4.x)
Attention:
With firmware version 4.5.0 or above, MTF-01 may not be recognized by Ardupilot. You can use MicoAssistant to modify “mav_id” to 200(any value other than 1) and configure SERIALn_OPTIONS as 1024(enable “Don’t forward mavlink to/from” option) on Mission Planner.
Step 1:
Configure the MTF-01 output protocol as “mav_apm”, by using MicoAssitant.
Step 2:
Connect the MTF-01 module to the serial port of the flight controller, such as Telem2 on pixhawk.
Step 3:
Configure these parameters in the Mission Planner
SERIALn_BAUD 115
SERIALn_OPTIONS 1024
SERIALn_PROTOCOL 1
FLOW_TYPE 5
RNGFND1_TYPE 10
n depends on which serial port the MTF-01 connected, for example, n=2 when it connect to Telem2.
Step 4:
After that, we need to reboot the flight controller or just refresh the parameters in Mission Planner.
And then these parameters need to be configured.
RNGFND1_MAX_CM 800
RNGFND1_MIN_CM 1
RNGFND1_ORIENT 25
When you complete the above steps, 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.
Step 5:
After the flight controller has recognized MTF-01, we need to perform some configurations so that the sensor data can be used in EKF fusion.
If you just need to use optical flow to fly indoors and don’t consider using GPS outdoors, then you only need to configure EK3_SRC1.
AHRS_EKF_TYPE 3
EK3_SRC_OPTIONS 0
EK3_SRC1_POSXY 0
EK3_SRC1_POSZ 2
EK3_SRC1_VELXY 5
EK3_SRC1_VELZ 0
EK3_SRC1_YAW 1
But if you need to take into account both indoor and outdoor environments, then you may need to use a method that can switch the EK3 data source. Keep the EK3_SRC1 as default, and set EK3_SRC2 as follows.
AHRS_EKF_TYPE 3
EK3_SRC_OPTIONS 0
EK3_SRC2_POSXY 0
EK3_SRC2_POSZ 2
EK3_SRC2_VELXY 5
EK3_SRC2_VELZ 0
EK3_SRC2_YAW 1
Then set the RC6 channel to switch using optical flow as EKF3 source.RC6_OPTION 90
Now you can use RC6 channel to switch between using SRC1 or SRC2 as the data source of EK3.
When the RC6 value is in the low position, SRC1(GPS) will be used, and in the middle position, SRC2(Optical flow)will be use.
Step 6:
When all settings are completed, switch to loiter mode, unlock and take off.
Sometimes the flight controller may not be allowed to unlock in Loiter mode when the sensor is too close to the ground. You can unlock it in Althold mode and then switch to Loiter mode after taking off.
Setup Tutorial For INAV
Setup Optic Flow&Lidar(MTF-01) For INAV6 To Make Drones Hover And Fly Indoors Better (youtube.com)
Note: INAV 7.1.1 may have some bugs that can not work properly with the sensor. You need to upgrade to version 7.1.2 which have been tested well.
Setup Tutorial For PX4
PX4(1.11.x – 1.13.x):
MAV_1_CONFIG TELEMn
(n depends on which serial port you connect to)
Reboot the flight controller
MAV_1_MODE Normal
SER_TELn_BAUD 115200 8N1
SENS_FLOW_ROT No rotation
EKF2_AID_MASK use optical flow
EKF2_RNG_AID Range aid enable
EKF2_HGT_MODE Range sensor
PX4(1.14 )
MAV_1_CONFIG TELEMn
(n depends on which serial port you connect to)
Reboot the flight controller
MAV_1_MODE Normal
SER_TELn_BAUD 115200 8N1
EKF2_OF_CTRL Enabled
EKF2_RNG_CTRL Enabled
EKF2_HGT_REF Range sensor
Reboot the flight controller
SENS_FLOW_ROT No rotation