Optical FLow 3901-L0X
STM32L051 has substituted for STM32F051 on 3901-L0X because of MCU STM32F051 shortage.
Setting up Optic Flow in INAV PDF manual by digitalentity
- Optical Flow: PMW3901
- Lidar: ST VL53L0X (max. range 2 m)
- Interface UART
- Protocol: MSP
- Working Range: 8cm~200cm
- Field of view: 42 degree(PMW3901), 27 degree(VL53L0X)
- Minimum Illumination >60Lux
- Input voltage: 4.5~5.5V
- Power Consumption: 40mA
- Size: 36*12mm (F051 version), 2g
- Size: 36*13mm (L051 version) 2g
- Module 3901-L0X, 1pc
- Make sure Optical Flow lens to ground >2cm for opflow initialization while FC starting up.
- Maximum range of VL53L0X is 2m, Altitude hold 0~2m @ throttle 0~100% if VL53L0X is enabled.
- Any unused UART of FC supports it
- Sonar connection (Trig & Echo) has not been implemented
- If your flight controller doesn’t have a barometer detected, you won’t be able to select “NAV ALTHOLD” in modes tab.
ArduPilot wiki: Optical Flow Sensor Testing and Setup
- SERIALn_PROTOCOL = 32, “n” is serial number of UART in ArduPilot hwdef, not the FC UART number. On some flight controllers, serial1 is not equal to UART1, Pls checkout FC manual to get corresponding serial number for each UART.
- SERIAL_BAUD = 115
- RNGFND_TYPE = 32
- FLOW_TYPE = 7
- FLOW_FXSCALER & FLOW_FYSCALER are both around -800
Communication between 3901-L0X module and Flight controller via UART MSP V2 protocol supported by INAV and ArduPilot.
There is no detailed datasheet of MSP V2 protocol.
Pls refer the code in INAV and ArduPilot Github