Article directory
25.6.2 Connecting to the autopilot
25.6.3 Additional instructions
Preface
The UPixels UPFlow Optical Flow Sensor is a lightweight, low-cost optical flow sensor that can be used to improve horizontal position control, especially in GPS -denied environments.
Copter-4.1 (and higher) supports this sensor.
25.6.1 Where to buy
The sensor is available from several retailers. Here are some links:
To my friends in China:
25.6.2 Connecting to the autopilot
1. When installing the flow sensor, the head of the villain should be facing forward and the camera should be facing downward, as shown in the picture above.
2. Connect the sensor's ground and TX pins to one of the autopilot 's serial ports. Note that the sensor's TX pin should be connected to the autopilot's RX pin. In the picture above, the sensor is connected to the Pixhawk 's Telem2 port.
3. Connect the VCC of the sensorto the 3.3V or 5V power supply.
4.Set FLOW_TYPE = 8 ._
5. If using Serial2/Telem2 , set SERIAL2_PROTOCOL = 18 ; if connecting to other serial ports, use the corresponding SERIALx_PROTOCOL parameters.
25.6.3 Additional instructions
As with the PX4Flow sensor , using this sensor's autonomous modes (including Loiter and RTL ) requires a rangefinder.
FlowHold does not require the use of a rangefinder.
Performance can be improved by setting sensors position parameters . For example, if the sensor is mounted 2cm forward and 5cm down from the center of rotation of the frame , set FLOW_POS_X to 0.02 and FLOW_POS_Z to 0.05 .
25.6.4 Testing and Setup
For setup guidelines, see Optical Flow Sensor Testing and Setup .
Please note that the recommended EK2_FLOW_DELAY or EK3_FLOW_DELAY value for this sensor is 10 .
25.5.5 Parameter description
1. FLOW_TYPE : Optical flow sensor type
NOTE: A reboot is required after making the change.
Values |
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2. FLOW_POS_X : X position offset
Note: This parameter is for advanced users.
The optical flow sensor focus is at the X position in the subject frame . Positive X is in front of the origin.
Increment |
Range |
Units |
---|---|---|
0.01 |
-5 to 5 |
meters |
3. FLOW_POS_Z : Z position offset
Note: This parameter is for advanced users.
The optical flow sensor focus is at the Z position in the subject frame . Positive Z means downward from the origin.
Increment |
Range |
Units |
---|---|---|
0.01 |
-5 to 5 |
meters |