MatekSys Optical Flow 3901-L0X

The MatekSys optical flow 3901-L0X sensor is a lightweight optical flow sensor including a short range lidar which uses the MSP protocol to communicate with the autopilot. This can be used to improve horizontal position control especially in GPS denied environments.

../_images/mateksys-opticalflow-3901L0X.jpg

Warning

The lidar included with the sensor is very short range especially outdoors. We strongly recommend using a longer range lidar instead.

Where to Buy

The sensor is available from Matekesys resellers

Connection to Autopilot

../_images/mateksys-opticalflow-3901L0X-autopilot.jpg ../_images/mateksys-opticalflow-3901L0X-cubepilot.png
  • The flow sensor should be mounted on the underside of the copter with the camera lens pointing downwards. The small arrow near the camera lens should be pointing forwards

  • Connect the sensor to one of the autopilot’s serial ports (e.g. Serial2 / Telem2)

  • Set FLOW_TYPE = 7 (MSP)

  • Set FLOW_FXSCALER = -800

  • Set FLOW_FYSCALER = -800

  • Set SERIAL2_PROTOCOL = 32 (MSP) (assuming sensor is connected to Serial2)

  • Set SERIAL2_BAUD = 115 (115200 bps) (assuming sensor is connected to Serial2)

To use the onboard lidar (not recommended):

Additional Notes

  • As with all optical flow sensors, a range finder is required to use the sensor for autonomous modes including Loiter and RTL

  • FlowHold does not require the use of a rangefinder but performance is generally worse than Loiter mode and is not recommended

  • Performance can be improved by setting the sensors position parameters. For example if the sensor is mounted 2cm forward and 5cm below the frame’s center of rotation set FLOW_POS_X to 0.02 and FLOW_POS_Z to 0.05.

Testing and Setup

See Optical Flow Sensor Testing and Setup