Pitch and roll wrong, flight controller orientation

Dear All,

It seems that my flight controller accelerometer is somehow rotated while I do have the arrow pointed forward on my BLITZ F745 AIO.

My mission planner HUD looks like this when the quad is level:
image
When I roll left, i.e.: right motors are higher then left I see this:
image
When I pitch forward (DIVE) I see this:
image

Anybody have a suggestion on what I can try to correct this? Orcourse when I arm with props the quad flips out.

Kind regards,
CarbonV

It is hard to say as your PARAM file is missing
Maybe the ahrs-orientation-board-orientation
is not set correct.
Did you follow carefully all steps of https://ardupilot.org/copter/docs/initial-setup.html
Also this: https://ardupilot.org/copter/docs/common-mounting-the-flight-controller.html
Can you show how you mounted your FC to the drone?

Dear Juergen,

I have uploaded my PARAM file here:
PARAMF745AIO.param (19.0 KB)
All steps were followed, I’ve tried multiple of the AHRS-ORIENTATION settings but none make it so the drone behaves as expected.
I hope this photo clearly shows that the arrow is pointing in the correct direction:

Kind regards,
CarbonV

I am not sure, but I think your FC is upside down. I tried to find the Gyro chip on the layout on IFLIGHT page. On the side facing up on your drone are only the motordriver but not a chip which will be a gyro.
Also I tried on my board to set AHRS-ORIENTATION to 8 (roll 180) and get a picture upside down on HUD

Hi Juergen,

I’ve tried to find the Gyro chip but I just cannot seem to locate it on the board. with roll 180 the picture indeed flips around showing air above ground but then roll becomes pitch and pitch becomes roll. I’ve not found a combination that works and I’m out of ideas.

If I am right that the gyro is placed on the other side as shown on your picture above than also your FC ist turned probably 45° as on the Iflight pictures all chips on that side are aligned with the board edge.
Can you provide a high resolution picture from the FC from the downside?

1 Like

Hi Juergen,

Sorry for the late reply, here I have a high resolution image of the FC, the arrow is on the other(ESC) side. I think the gyro is indeed 45degree slanted but as far as I know that’s “backed in” to the software, at least in betaflight. Maybe this has gone wrong on ardupilot?

Kind regards,
CarbonV

It seems that this are two direct connected boards. so there is probably an unseen layer between the two modules. So at the moment I am not able to clearly identify the IMU chip.

This is what is baked in:
IMU BMI270 SPI:bmi270 ROTATION_ROLL_180_YAW_135
IMU Invensensev3 SPI:icm42688 ROTATION_ROLL_180_YAW_315

@Juergen-Fahlbusch The board on top is just a PCB direct connected to the ESC PCB there are no components in between. The gyro should be the ICM42688 and you can see it on the edge of the top PCB on the right side of the picture. It is upside down with respect to the arrow on the other side of the board. I do not know however what the gyro assumes is it’s forward position.

@dkemxr Is that baked into Betaflight or ArduPilot? Where can I find those lines so I can compare them to betaflight? There seems to be no orientation that I can turn my board where the HUD in mission planner is actually behaving correctly.

Thanks!

Kind regards,
CarbonV

HWDEF

When I compare this with Betaflight config.h It should only be a Yaw rotation of 135 and no roll or 315 yaw rotation, which seems like a typo actually. This all regardless of gyro type. That also seems to match with what’s wrong with my board. Can I somehow fix this in ardupilot? The Roll180 can easily be reversed with the settings but the yaw 315 I can’t seem to fix.

Kind regards,
CarbonV

It’s happened many times that manufactures release new board revisions with different hardware/configurations. Not sure if that’s the case here perhaps @andyp1per can chime in.

Try this build:

BlitzF745AIO-test.apj (787.3 KB)

Hi Yuri,

Thanks I will try I normally only use the “FC_with_bl.hex file”. I was however just able to build that myself. I’ll update asap if I get either yours or my own build working.

Kind regards,
CarbonV

You should only need to flash the “with_bl” file once. Thereafter, Mission Planner will flash your board through its interface using the apj file.

But here’s the .hex if you want:
BlitzF745AIO-test_bl.zip (989.7 KB)

2 Likes

@Yuri_Rage The APJ definitly worked and now my orientation is correct. However, my FC is mounted upside down so for a normal config I assume you have to have it so roll is not at 180 somehow. Unless I am missing something.

I set the hwdef orientation per this comment. Are you telling me that’s incorrect?

It works for me but it should be only yaw 135 and there should be no roll rotation by default so this:
IMU BMI270 SPI:bmi270 ROTATION_YAW_135
IMU Invensensev3 SPI:icm42688 ROTATION_YAW_135

That’s literally what I have in the hwdef for the build attached in this topic.