Cheerson CX-OF low cost optical flow sensor testing


This is the first flight test of Copter using Cheerson CX-OF optical flow sensor. What’s exciting about this sensor is that it is absolutely tiny, cheap at only about $20 and readily available.

ArduPilot actually already supported the Pixart PMW3900DH optical flow sensor that this Cheerson board is based on (the 2018/2019 SkyRocket Fury and Scout copters use it) but this Cheerson sensor has a serial interface (instead of SPI) which is far easier to use in a DIY project.

The code isn’t in master but if you’re interested in seeing the code it’s in this PR.

EDIT: this feature has been included in Copter-3.6.4 stable release.

Special thanks to the other developers on this thread who helped with this project.

11 Likes

Very interesting article, thank you!
The links underneath the article on the frontpage are not working (for me).

2 Likes

Tobias,

Txs! yes, the links don’t work from the front page sometimes. It’s something to do with the service we use to display the blogs. I’ll ping Jani to see if he knows of a fix but this has come up a few times :-(.

1 Like

Glad to see 3DR Iris :slight_smile: I’ve just ordered two of them and will report my experience.

2 Likes

Cool. Re the IRIS, I should probably replace my development copters with something more modern but they still work as test copters and I don’t feel like adding a bunch of plastic into a landfill or incinerator.

4 Likes

This is exciting stuff right here.
Awesome improvements!

If you need beta testers, I’m all ears! I have a few test platforms ready for a beating!

2 Likes

Nice!
I was trying the spi version of this sensor, but this will make it all easier. Thanks!

1 Like

@Nando,

By the way, @tridge tells me that the SPI version gives access to a feature that allows better performance when the vehicle is yawing. So if we do get an easy to use SPI version that could be interesting as well.

2 Likes

If i understand correctly, the camera itself doesn’t need any work done on it? No new firmware?

Just plug it in and configure as if it was a regular PX4FLOW?

About the SPI version, will it be supported and will i be able to use it on a Black Cube 2.1?

regards,

Corrado

1 Like

@anon67614380,

Yes, that’s right. No need to load any special firmware onto the camera itself. It’s easier to setup than the PX4Flow I think.

Re the SPI version, a couple of people have suggested this sensor may work but nobody has got it working yet (and I don’t have one yet). The Cube autopilot’s don’t have an exposed SPI port so I don’t think the SPI version can be easily attached to a cube. I’ve seen a prototype of a UAVCAN version of the sensor from Hex but it hasn’t been released yet and I don’t know when it will appear.

1 Like

So much to come in the futureplenty stuff now<randy you will never be idle with all that is happening and A happy and joyfull Xmas to you and your family

1 Like

Thanks for the infos, i think we will wait for the uavcan version from hex, maybe will just test the serial on the test machine.

regards,

Corrado

2 Likes

@rmackay9 awesome test, found out today that the pmw3901 sensor you mentioned is actually the same one that is on the Crazyflie flow deck.

2 Likes

@umgram1, thanks for that. So for other’s here is a link to the CrazyFlie 2.0v2 flow sensor. I suspect we could get it working as well if we can figure out the pin outs.

By the way, I’ve ordered the banggood CJMCU-3901 sensor which uses the spi interface.

2 Likes

@rmackay9 I’ve gotten my crazyflie in last week and have been using the bitcraze FW with the flow deck, and MAN does it just work well. So used to the very picky (in lower light conditions) px4flow. If I could use the crazyflie flow deck on a large quad and the TFmini lidar I’m already using for ALT, I think it would just put the old, sad, px4flow out for good. P.s. px4flow works great. In perfect lighting conditions.

1 Like

@rmackay9 also, bitcraze now makes a simple breakout version of the flow deck v2, pinout is straightforward for SPI seems like, with I2C for the onboard lidar. Here’s the link: Bitcraze Flow Deck V2 “breakout”

2 Likes

Graham,

Txs for that. Yes, the simple breakout version looks better. It’s a little more expensive than the banggood one but they’re all very reasonably priced.

1 Like

Hi Randy,I see you now have a article on the wiki so is it all up and running please,ive got a lidar fitted allready and cheerson will be here any day,and thank you for hard work

1 Like

@rmackay9 calibration complete, next step …flying :wink:

these are my gains

FLOW_ENABLE 1 0:Disabled 1:Enabled
FLOW_FXSCALER -20
FLOW_FYSCALER -30
2 Likes

@ppoirier,

Great! We could potentially update the scaling gains (at the risk of upsetting users who have already done the scaling). All the sensors are probably very close to the same and I can’t say that I spent a huge amount of time coming up with the default calibration.

1 Like