Px4Flow: Trouble getting any response over I2C

I know this topic has been reviewed previously. I have been reading the wiki and what guidance I can find but so far, No Joy.

Some background:
Original 3dr Pixhawk
Copter 3.5.5 Y6 Stable set up working well without the PX4Flow.

Board flashed with Px4flow-kit-06Dec2014 via Mission Planner and again with QGC.
Board connected to computer via USB flashed and focused lens. Able to view data output via QGC with the direct USB connection to the board.

Lidar Lite V2 (blue label) connected to Pixhawk via PWM. Data reports as expected. After connecting the PX4Flow, I now get a startup message “check range finder.” At startup Lidar is 0.16 meter and typically passed the prearm check without lifting, as Im having trouble, I now lift the drone at startup. The message continues anyway, but the data is still consistent.

The PX4Flow board is powered from the same bec that powers the lider when working on battery, otherwise powered from the servo bus when the pixhawk is powered from the USB.

Regardless, of the power source, or the start up order, I can enable the PX4Flow in Mission Planner, but I cannot get any reading ever on opt_m_x, opt_m_y, opt_x, opyt_y, or opt_qua. At startup I get the message “bad optical flow health.”

I have been studying this issue for weeks, even purchased an additional px4flow board, but the results have always the same. First board did not include the sonar sensor, now I’m working with the Holybro board with the sonar sensor. I see just now the advice to remove or disconnect the Maybox sonar? I can try that but my rangefinder data looks ok.

Dataflash log usb power:


ScreenShot-NSH-stop-startI know this topic has been reviewed previously. I have been reading the wiki and what guidance I can find but so far, No Joy.

Some background:
Original 3dr Pixhawk
Copter 3.5.5 Y6 Stable set up working well without the PX4Flow.

Board flashed with Px4flow-kit-06Dec2014 via Mission Planner and again with QGC.
Board connected to computer via USB flashed and focused lens. Able to view data output via QGC with the direct USB connection to the board.

Lidar Lite V2 (blue label) connected to Pixhawk via PWM. Data reports as expected. After connecting the PX4Flow, I now get a startup message “check range finder.” At startup Lidar is 0.16 meter and typically passed the prearm check without lifting, as Im having trouble, I now lift the drone at startup. The message continues anyway, but the data is still consistent.

The PX4Flow board is powered from the same bec that powers the lider when working on battery, otherwise powered from the servo bus when the pixhawk is powered from the USB.

Regardless, of the power source, or the start up order, I can enable the PX4Flow in Mission Planner, but I cannot get any reading ever on opt_m_x, opt_m_y, opt_x, opyt_y, or opt_qua. At startup I get the message “bad optical flow health.”

I have been studying this issue for weeks, even purchased an additional px4flow board, but the results have always the same. First board did not include the sonar sensor, now I’m working with the Holybro board with the sonar sensor. I see just now the advice to remove or disconnect the Maybox sonar? I can try that but my rangefinder data looks ok.

dataflash log usb:
I know this topic has been reviewed previously. I have been reading the wiki and what guidance I can find but so far, No Joy.

Some background:
Original 3dr Pixhawk
Copter 3.5.5 Y6 Stable set up working well without the PX4Flow.

Board flashed with Px4flow-kit-06Dec2014 via Mission Planner and again with QGC.
Board connected to computer via USB flashed and focused lens. Able to view data output via QGC with the direct USB connection to the board.

Lidar Lite V2 (blue label) connected to Pixhawk via PWM. Data reports as expected. After connecting the PX4Flow, I now get a startup message “check range finder.” At startup Lidar is 0.16 meter and typically passed the prearm check without lifting, as Im having trouble, I now lift the drone at startup. The message continues anyway, but the data is still consistent.

The PX4Flow board is powered from the same bec that powers the lider when working on battery, otherwise powered from the servo bus when the pixhawk is powered from the USB.

Regardless, of the power source, or the start up order, I can enable the PX4Flow in Mission Planner, but I cannot get any reading ever on opt_m_x, opt_m_y, opt_x, opyt_y, or opt_qua. At startup I get the message “bad optical flow health.”

I have been studying this issue for weeks, even purchased an additional px4flow board, but the results have always the same. First board did not include the sonar sensor, now I’m working with the Holybro board with the sonar sensor. I see just now the advice to remove or disconnect the Maybox sonar? I can try that but my rangefinder data looks ok.

Thank You for any advice.

Dataflash log, USB

Dataflash log battery

ScreenShot-NSH-stop-start

Hello

You confirm Px4Flow connected to I2C with common ground between UBEC-Px4Flow-PixHawk ?

Thanks for the quick reply,
I would say yes, the common ground was something I watched. More specific, the pixhawk pwoer is supplied from a dedicated bec. a second bec powers the servo rail, 5.2v. The servo rail provides power to the Lidar and the PX4flow. Then the ground from the servo rail is connected to the I2c ground. I always keep the grounds separate from each bec, this is the only time this seemed necessary. Anyway, that look like a common ground?

Yes the servorail is common gnd with i2c
So you have working rangefinder, Px4flow with right firmware connected to I2C, Px4flow enabled in parameters, you can read the distance but you have bad opticalflow error?

Yes, and no data on the Opt…

Is your I2C port is ok? == can you read external compass from gps ?
Or from sny other I2C device?

Yes, I have the I2c splitter with the compass and external led attached, I have switched the order around and the other devices dont notice and continue operating correctly, opt flow remains the same. I have removed all this and just plugged the px4flow alone, directly into the pixhawk. did not result in and px4 data but tons of messages on the missing devices.

Humm everything looks ok
The only unknown is the rangefinder on pwm, I have a V3 on I2C, but pwm should be ok

Yea, I just went to PWM for the Lidar, a little trouble setting it up but nothing unusual.
Do you think I need to remove the Maxbotics sonar from the px4 board?

the previous px4 board, (with no sonar) I had soldered a jumper to change the address to 0x43, I changed the parameter for the OF address to 1 from the default of zero, no joy. anyway with the current board I just left the address as the default, and changed the PH parameter back to 0. Currently using the nsh shell I have been using 0x42 with the px4io start command. can you confirm thats the right address?

Ok, so I’m now getting data from the px4flow. Two things I did that changed my condition. #1: I mounted the sensor to the frame and verified the orientation is correct. . Up till today I had the px4flow board on the table, plugged into the pixhawk, it occurred to me that the motion sensors and gyro would be sending very bad data. Also, #2: I went back to powering the px4flow board from the I2c bus. I figured this may have an effect on the startup timing.

I’m not done, but at least I have a data back to the pixhawk usb or battery.

Thank you to ppoirier for listening, the solution is nearly always a cable or connector!

1 Like

The startup timing is very crucial when working with px4flow, it need to be powered up before the autopilot.
When I turn on my system (the I2C bus getting his voltage from the Pixhawk servo rail) it randomly recognize the px4flow.
I solved this by giving the px4flow voltage via USB and then power up my copter with battery then disconnect the USB.

I think has been adressed in latest ArduPilot releases

Galdalali, Yes, this now seems to be my new current issue as my px4 starts up consistently when the pixhawk is powered via USB, but as you say, when powering via battery it is not at all reliable. It worked the first few times for me on battery, but not any more.

Tonight I will try your routine of powering the px4 via usb, then plugging in the batteries, then disconnecting the usb. Are you using copter 3.5? This issue was apparently solved for some in this firmware revision.

Harry Courter

Good News!
I would be willing to try 3.6 beta if you think its adequately stable.

My beast is big, 14 lbs, so I’m just a bit nervous with anything new.

Harry Courter

So tonight I can confirm a consistent start up of the px4flow and good data via usb, AND if I unplug my storm 32 gimbal controller (with mavlink communication on a serial channel) then I can start up with battery, however, with the storm 32 plugged in, px4flow will not start up.
Two items I’m considering: installing 3.6 beta just to see if I get any different response. and/or, perhaps I’ll try to return to the direct power source for the px4flow. Any thoughts?

Look at his:

If you have upgraded to Copter 3.5.3 21-Sep-2017 and still get this problem, please report back to @rmackay9

ppoirier:
I have been using 3.5.5 thru this process, and I see, this px4flow start up problem should not be happening as per revisions in 3.4 and again in 3.5. That’s why I figured the storm 32 board might be adding a new issue during startup. I’m happy to have rmackay9 review, I’ll need to locate an appropriate dataflash log.

So, I uploaded 3.6 beta, and so far, no more startup troubles. I don’t know if this is actually related, but today it seems to work. I will continue to look for trouble, or success!

3.6 looks like an awesome revision. Significant advancements. I cant wait to try it out, but I don’t like to be first.

1 Like

I’m working with 3.6-beta

galdalali:
Last night I confirmed that if I start the PH with usb the px4 starts consistently, but a “normal” startup from battery will not. I was working with 3.5.5 but updated firmware to 3.6 hoping for a new result. However, the status remains the same, px4 starting consistently only when started first with the usb.

3.6 looks like it will be a big advancement regardless. Are you flying with 3.6? Can you provide your impressions?

Harry Courter