EKF attitude bad, BN-880 unusable?

Hi again,

I’m currently trying to get a new board working, the Mamba F405 Mk2. So far everything (except analog current input, needs work) seems to be ok. I calibrated everything, artificial horizon and heading is ok. However I have the problem that I get “EKF attitude bad” and the groundspeed/GPS is jumping around like hell. Even if it says 3D dgps fix (with HDOP < 1). I can wait for half an hour, doesn’t help.

So far I’ve only used M8Ns in my other copters. Is it the BN-880 or what can I check to get this working? If nothing helps I think I can try a M8N from another one.

Best regards,
Sebastian

Is there a barometer on that board? Which firmware did you flash?

No barometer, no compass on board. Compass is external in the BN-880 and I want to add a BMP280.
Since there is no firmware yet for the Mamba F405 Mk2 I compiled it myself based on https://github.com/ArduPilot/ardupilot/pull/15392 with some fixes in the hwdef.dat

I see, thanks. But other than being cheap why do the work to use this board?

There was a problem with the IMU on SPI on another board, something to do with the clock speed. Wonder if its the same. @vierfuffzig would remember

Why not? There are other F405, so I tought it can’t be too hard…Haven’t done it before, but there is always a first time :wink:

SPI clock speed or board clock speed?

SPIDEV mpu6000 SPI1 DEVID1 MPU6000_CS MODE3 1MHZ 8MHZ

I really don’t remember I’m afraid, and I can’t remember the name of the board either. I would have thought SPI speed.

But people also say the BN-880 is rubbish I think, so might just be that.

Looking through the other hwdef it seems the other cominbations are 2/8MHz or 1/4 MHz. Maybe I try 1/4MHz. If that doesn’t help, I test with a M8N GPS.

@andyp1per was likely referring to this: https://github.com/ArduPilot/ardupilot/pull/15202

@Hamstersocke how do you cope with no baro? what‘s your GPA.delta saying? do you get stable attitude readings without your GPS attached?

got a flash log for us to look at?

on a sidenote i’m using BN180s with astonishingly good results. don‘t have an actual BN880, but imho, while it isn‘t exactly a high end hardware choice, it should just do the job. QC might be an issue though :wink:

Without baro? Apparently not good, so I added a BMP280 last night :wink: Looks much better now, might give it a try later. Here is a log from my last test, inside a building, on the bench, letting the motors run for some time: https://drive.google.com/file/d/1i6H949SSUyvE-ntYp4lsjlL460LTin7U/view?usp=sharing
And the param file:
2020-11-27 08-50-22.log.param (18.0 KB)

If you have any idea how to get the current monitoring working that would be great. The source of the hwdef.dat was: https://github.com/betaflight/unified-targets/blob/master/configs/default/DIAT-FURYF4OSD.config

And the hwdef.dat uses:
PC1 BAT_VOLT_SENS ADC1 SCALE(1)
PC2 RSSI_IN ADC1
PC3 BAT_CURR_SENS ADC1 SCALE(1)
define HAL_BATT_VOLT_PIN 11
define HAL_BATT_CURR_PIN 13
define HAL_BATT_VOLT_SCALE 12
define HAL_BATT_CURR_SCALE 18.2

While voltage works fine, current does not. But I’ve not yet measured the current voltage signal from the ESC board.

I’m going to switch the GPS module. While the first two flights in stabilize mode were fine, the third one in loiter was short and it landed without my intervention quite fast. Nothing broken but I think the cause was the GPS.
I see many GPS glitches. Here are the last messages before it “landed”

|12:22:22|GPS Glitch|,
|12:22:22|Vibration compensation ON|
|12:22:34|EKF3 IMU0 in-flight yaw alignment complete|
|12:22:41|EKF variance|
|12:22:41|16|2|EKF CHECK: EKF CHECK BAD VARIANCE|
|12:22:41|17|1|EKFINAV FAILSAFE: OCCURED OR FAILED TO INITILIASE|

seems there’s board variants with RSSI on PC3 and CURR on PC2 too:


might require checking your actual board version.

that google drive link is set to restricted access, can you set that to public?

1 Like

Thank you, didn’t see that. I’ll try changing the pins. The version is the MK2 one.

The link should now work. I’ve changed the BN-880 against a M8N. One LiPo in Loiter and no GPS glitches or any errors at all. The compass also calibrated better I think.

With the M8N I get 10 satellites, the BN-880 showed 17. Is it possible the glitches were coming from the BN switching between GPS and Galileo or something?

there’s your current pin working well. seems more like a setup / connection issue.

other than that i’m having issues to read something significant from your log, actually i don’t really think a short period of indoor hovering is a good basis for an indepth analysis. maybe someone more familiar with copter logs can chime in. that being said, i can’t spot anything pointing to a substantial malfunction of your GPS receiver.

I’ve been using the BN880 for a long time with good result together with iNav on a 5” quad. Moved to arducopter and a bigger bird and started to see problems. My view of the problem is that the compass together with vibrations in the bigger frame doesn’t match.
Have switched to a M9n gps with another compass and the problem seems to be solved.
The BN880 has moved back to the iNav 5” and works there without issues.

I flew with the changed GPS until the 16MB flash log was full, 95% in loiter:

https://drive.google.com/file/d/1YSbo8YLTRXJ3mfolPr0OKf-FnumnAKwQ/view?usp=sharing

Did not see one problem while flying. Maybe I try the BN-880 one day again.

@vierfuffzig Still trying to set/calibrate the current monitoring correctly. I’ve now the right pin, need to calculate the factor. Can’t do that on the bench, because without props I can’t really get a high current.