Optical Flow Sensor Connection and Configuration Guide


I. Connection

1. Crossflight Flight Controller Connection Instructions (UART1 for example; match configuration for other serial ports)

① Installation and Direction

Mount the left optical flow sensor on the airframe with its lens side facing the ground. Align the blue arrow on the sensor with the arrow mark on the Crossflight flight controller (or align the head of the character icon inside the red circle on the optical flow board with the flight controller’s arrow). After fixing, connect the marked yellow wire to the flight controller’s serial port per corresponding wire colors.

2. PIXHAWK Flight Controller Connection Instructions (UART1 for example; match configuration for other serial ports)

① Installation and Direction

Mount the left optical flow sensor on the airframe with its lens side facing the ground. Align the blue arrow on the sensor with the arrow mark on the PIXHAWK flight controller (or align the head of the character icon inside the red circle on the optical flow board with the flight controller’s arrow). After fixing, connect the marked yellow wire to the flight controller’s serial port per corresponding wire colors.

3. Minipix Flight Controller Connection Instructions (UART1 for example; match configuration for other serial ports)

① Installation and Direction

Mount the left optical flow sensor on the airframe with its lens side facing the ground. Align the blue arrow on the sensor with the arrow mark on the Minipix flight controller (or align the head of the character icon inside the red circle on the optical flow board with the flight controller’s arrow). After fixing, connect the marked yellow wire to the flight controller’s serial port per corresponding wire colors.

4. Crossrace Flight Controller Connection Instructions (UART1 for example; match configuration for other serial ports)

① Installation and Direction

Mount the left optical flow sensor on the airframe with its lens side facing the ground. Align the blue arrow on the sensor with the arrow mark on the Crossrace flight controller (or align the head of the character icon inside the red circle on the optical flow board with the flight controller’s arrow). After fixing, connect the marked yellow wire to the flight controller’s serial port per corresponding wire colors.

II. Ground Station Parameter Configuration

  1. Connect the flight controller to Mission Planner ground station via Type‑C or USB, select the correct port number and baud rate at the top right corner. After successful connection, open the Configuration/Tuning page.
  2. Click Full Parameter List, scroll down or search target parameters in the search box for modification.
  3. Flight Controller Optical Flow Data Fusion Configuration
  4. Set EK3_SRC_OPTIONS to 0 (use optical flow only without fusing other speed data), EK3_SRC1_POSXY to 0 (disable GPS as primary horizontal position source and use optical flow only), EK3_SRC1_POSZ to 1 (set barometer as primary vertical position source), EK3_SRC1_VELXY to 5 (obtain primary horizontal speed from optical flow), EK3_SRC1_VELZ to 0 (no vertical speed sensor), EK3_SRC1_YAW to 1 (set compass as yaw source).
  5. Optical Flow and Rangefinder Parameter Configuration
  6. Set FLOW_TYPE to 5 (optical flow adopts MAVLink protocol), FLOW_ORIENT_YAW to 18000 (this setting adds a unified 180-degree deflection based on aligned icon head and FC mark to prevent hovering failure caused by wrong installation direction; modify referring to official manual if actual mounting is inconsistent).


Set RNGFND1_TYPE to 10 (rangefinder uses MAVLink protocol).

Set RNGFND1_GNDCLEAR (expected ground clearance value of rangefinder) to 10 (adjust the value according to actual installation), RNGFND1_MAX_CM (maximum effective ranging distance) to 400, RNGFND1_MIN_CM (minimum effective ranging distance) to 4, RNGFND1_ORIENT (rangefinder pointing downward) to 25.

Set SERIAL1_BAUD to 115 (configure UART1 baud rate as 115200), SERIAL1_PROTOCOL to 1 (configure UART1 to communicate with optical flow via MAVLink protocol; UART1 is for reference only, configure based on actual connected serial port).

After all settings, click Write Parameters on the right side. Click OK after parameter write success prompt pops up, unplug data cable and repower the flight controller, reconnect flight controller on ground station. Enter Status page; real-time data update of opt_m_x, opt_m_y, opt_qua and rangefinder1 means normal connection.