PX4Flow indoor issues (lighting?)

I use the latest 3.6 ChibiOS with v2.3 PX4Flow from banggood (no sonar).
I followed the PX4Flow guide and use the px4flow-klt-06dec2014.px4 firmware.
I also have a working tfmini range finder for althold.

I can’t get OF position hold working indoors.
I have it working no problems outside, on every surface i’ve tried (No GPS on quad).
In the office with very bright led/florescent white light I can’t make it work.
I tried many patterns, carpet, patterned bright deck, putting patterns on the floor and all doesn’t work.
Finally I found a windowed office and narrowed the issue down to lighting,
that office has wall to wall carpeting and a window,
With the window open i have poshold with OF working great
When the window is closed with office bright light the OF fail to hold position.
I’m attaching pictures from the OF with the windows open and closed.

Is there a difference in PX4Flow quality/versions from different vendors?
Is there a way to increase the brightness of the OF for it to work with office light? I see the picture flickers sometime to a brighter picture.

Open window:

Closed window:

3 Likes

Nice investigation. The problem is that florescent lights have an update rate of about 50 to 60hz. This means that the OF sensor gets the occasional completely black image and it loses it’s velocity estimate.

Copter-3.6 includes a driver for Pixart optical flow sensors which have a much higher update rate and may not suffer from this problem. The 2018 skyrocket drones use this sensor but nobody has yet confirmed a source for this sensor nor tested that it works with other flight controllers. We think that one of these sensors might work in case you want to give it a try:

Note that I think you’ll need a flight controller with an exposed SPI port. The Pixhawk1 has this but many others do not.

may I know how to use it?