Cheerson CX-OF Optical Flow¶
The Cheerson CX-OF optical flow sensor is a lightweight and low cost optical flow sensor which can be used to improve horizontal position control especially in GPS denied environments.
Support for this sensor is available in Copter-3.6.4 (and higher)
Where to Buy¶
The sensor is available from various retailers incluing Banggood.com and AliExpress. More retailers can be found by searching for “CX-OF spare parts”.
These alternatives have also been shown to work:
These alternatives may work but this has not been confirmed:
This similar flow sensor is not supported (yet):
Connection to Flight Controller¶
- The flow sensor should be mounted on the underside of the copter with the camera lens pointing downwards. The side of the sensor with the “V2.0” label should be towards the front of the vehicle. The image above is incorrect because the flight controller’s arrow is pointing down while the sensor’s “V2.0” label is close to the top.
- Connect the sensor’s TX and VSS (aka GND) pins to one of the flight controller’s serial ports. In the image above the sensor is connected to a Pixhawk’s Telem2 port
- Connect the sensor’s VDD (aka VCC or 3.3V) to a 3.3V power source. In the above diagram the Pixhawk’s Switch port is used but another alternative would be the SPKT/DSM port’s power pin
- Set FLOW_ENABLE = 1
- Set SERIAL2_PROTOCOL = 18 if using Serial2/Telem2, if connected to another serial port use the corresponding SERIALx_PROTOCOL parameter
- Set EK2_FLOW_DELAY = 80
- Optionally set EK2_GPS_TYPE = 3 to force the EKF to only use the optical flow sensor and not use the GPS
Additional Notes¶
- As with the PX4Flow sensor 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
- The sensor has been successfully tested to altitudes of about 40m
- Uncheck the ARMING_CHECK parameter’s “Parameters” bit to remove the need to manually lift the vehicle to 1m once before takeoff (this pre-arm check is designed to ensure the range finder is working)