Cheerson CX-OF low cost optical flow sensor testing

@rmackay9
Thanks Randy for confirming the issue. :slight_smile:

@firenitin, here’s the fix that should be included in the next beta release which should be out within a few days. Thanks again for the report.

2 Likes

Hi. I’m new to arducopter and I’m trying to build an optical flow enabled 3inch quad copter with arducopter. I’m using omnibus nano f4 v6 with cx-of compatible optical flow module, AC 4.0.1 rc2 but the optical flow enable option in mission planner is grey out. I was changed the parameters as the wiki said: FLOW_TYPE = 4, SERIAL1_PROTOCOL = 18 (I’m connecting the tx pin of the module to the v6’s rx1 pin), SERIAL1_BAUD = 19, EK2_FLOW_DELAY = 80, EK2_GPS_TYPE = 3 without any luck. Can you help me?

2 Likes

I fixed it by setting the AHRS_ORIENTATION to YAW180. That fixed my pitch reversed problem too. It’s weird.

1 Like

I would connect the CX OF optical flow to the TLM2 on OMNIBUS NANO V6 but i don’t found where is on in this FC. Thanks

I think this is the same:

I am testing the cx of clone that I have indicated above, connected to the RX 4 tlm2 pad on Omnibus nano v6. the problem is the copter in flow hold oscillates like bad settings PID pitch and roll. Sometimes, if I move it with the RC command it stabilizes for a while, then it starts swinging again. I have setting like in the wiki.

This is the problem

SOLVED : set FHLD_FILT_HZ 2

1 Like

Dear colleagues, can you please help me with my optical flow setup.
I use Pixracer + VL53L1X rangefinder + Cheerson CX-OF sensor, Arducopter 4.0.3 dev firmware.
I installed and calibrated it according to Arducopter Wiki, the calibration log looks consistent:

But since I try to fly in PosHold mode - copter does not hold the position.
Here is my calibration and test flight logs (1- calibration, 8,9 - test flights): https://yadi.sk/d/eKV0bfwJxzflzg

plus params I used to fly on EKF 2 and 3
2020_03_02 arducopter V4.0.3-dev OF PosHold EK3.param (17.7 KB) 2020_03_02 arducopter V4.0.3-dev OF PosHold EK2.param (17.7 KB)

I’d like to understand - why we should use rotation (not moving the copter above the ground) during calibration (described here https://ardupilot.org/copter/docs/common-px4flow-overview.html)?
Because during calibration we compare Optical Flow data to Gyro data as we rotate the copter, and it looks consistent (picture above).
But during the test flight - copter, actually, drifts away from the point it must hold - and OF and Gyro data are not as consistent as during test rotation. OF shows, that copter drifts away, but Gyro remains still:

2 Likes

Another OF module option:
https://www.aliexpress.com/item/33005508643.html

It has a fourth pin ‘Y’:

From Aliexpress page:

Special note about Y pin:
①This pin is the yaw mode selection port. It is active low and defaults to high (normal mode) at startup.
②When the drone is in yaw motion, it is recommended to pull down the Y pin to make the module enter yaw mode.
③When the sensor is not in yaw motion, pull the Y pin high to put the module into normal mode.
④If the module does not turn on yaw mode during yaw motion, it may cause jitter and drift. It can be improved after turning on the yaw mode.
⑤If the module is in yaw mode when the drone is not in yaw motion, the linearity of the module data may be deteriorated.
⑥ If you are not understand the above content, please ignore the Y pin,just think of it as nonexistent.

Do someone understand how could it be used with Ardupilot?

1 Like

:joy::joy:

So I guess they have implemented a rotation compensation method that we can use if needed. It might be fun to test if someone is keen to patch EKF-OF… :nerd_face:

2 Likes

I have exactly that module and I have not connected Y. When I am rotating yaw the quadcopter has drift. How could I use it?

I also read this in the mission planner’s messages section.

08/03/2020 19:15:33: EKF2 IMU0 is using optical flow
08/03/2020 19:15:33: EKF2 IMU0 has stopped aiding
08/03/2020 19:15:28: EKF2 IMU0 is using optical flow
08/03/2020 19:15:28: EKF2 IMU0 has stopped aiding

and so on … looped. Normal behavior?
Thank you

I have cheerson cx-of
i have problem
wifi controller always disconneted
can anybody help me please

hi all,

can anyone tell me if my output is correct? thanks! :slight_smile:

ThoneFlow-3901UY - Mount and Wiring
Protocol compatible with cx-of
Buy from Seeed: https://www.seeedstudio.com/ThoneFlow-3901U-UART-Serial-Version-PMW3901-Optical-Flow-Sensor-p-4040.html

2 Likes

Cool, I hope Seeedstufio will have a better availability than AliExpress

1 Like

it looks the same as aliexpress with the y pin for yaw mode. I can’t get good stability just with that sensor on my 3 "quad. I’m waiting for the VL53L1X to use it together with this sensor

1 Like

Hi Alberto,

Does the VL53L1X sensor works with the ArduCopter firmware?

Yes it does, but take note that thes type of sensors are for indoor use only as they easily get blinded by sunlight

Thanks. Can this be connected via UART? Or just I2C?
Kakute F7 has only 1 SDA/SCL port and it is intended for the GPS/Mag on my copter. I’m planning on buying the TFmini, but it’s too big and heavy for my micro Copter.

It is I2C so you connect many devices as I2C is a bus

with VL0 I get bad lidar health with VL1 I don’t know why I still have to get from aliexpress :slight_smile: however according to the wiki it should go