Configure MTF-01 Sensor By Using Ardupilot’s Serial Passthrough Function

Configure MTF-01 Sensor By Using Ardupilot’s Serial Passthrough Function

When using the MicoAir MTF-01 optical flow sensor, you may need to configure this sensor first on the MicoAssistant software and a USB-TTL module should used for it.

 

In case you can’t find a TTL module around you, there is still another way that might do the job.

 

Ardupilot has a function call “Serial Passthrough” that allows the autopilot to route serial protocol messages between serial ports on the autopilot including the USB port. Then we can use this function to complete the configuration of the MTF-01 sensor without a USB-TTL module.

 

Preparation

 

 

Step1

First connect the MTF-01 sensor to the Telem1/Serial1 port of the flight controller, as shown in the figure below.

Configure MTF-01 Sensor By Using Ardupilot's Serial Passthrough Function

Step2

Connect the flight controller to the PC via USB, open the Mission Planner and connect the flight controller.

Find SERIAL1 in the “Full Parameter List”, and set

  • SERIAL1_BAUD = 115
  • SERIAL1_PROTOCOL = 1
  • SERIAL1_OPTIONS = 1024 (Don’t forward mavlink to/from)
Configure MTF-01 Sensor By Using Ardupilot's Serial Passthrough Function

Click “Write Params” on the right, then reboot the flight controller

Configure MTF-01 Sensor By Using Ardupilot's Serial Passthrough Function

Step3

Reconnect the flight controller on Mission Planner again . In the “Full Parameter List”, and set

  • SERIAL_PASS2 = 1 (enable passthrough on Serial1)
  • SERIAL_PASSTIMO = 30 (gives you enough time to connect with the MicoAssistant)

Click “Write Params” , after a few seconds, the flight controller will enter serial passthrough mode. And note that The flight controller cannot be rebooted at this time, otherwise it will exit serial passthrough mode after restarting.

Configure MTF-01 Sensor By Using Ardupilot's Serial Passthrough Function

Step4

Press the “Disconnect” button on the Mission Planner but leave the USB cable from the PC to the flight controller connected

Configure MTF-01 Sensor By Using Ardupilot's Serial Passthrough Function

Then open the MicoAssistant software, select the port number of the flight controller, such as COM12 here, select 115200 for the baudrate, and click the connection icon.

If everything goes well, the MicoAssistant will recognize the MTF-01 sensor and show the sensor data.

Configure MTF-01 Sensor By Using Ardupilot's Serial Passthrough Function

Click the settings icon on the right to bring up the configuration page.

You can modify the output protocol of the MTF-01 here. When using on Ardupilot, you should select “Mav_APM“, then click “WRITE” to write the parameters to the sensor.

Configure MTF-01 Sensor By Using Ardupilot's Serial Passthrough Function

Leave a Comment

Your email address will not be published. Required fields are marked *