Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with magnetometer since using INAV #3398

Closed
elektrofreakz opened this issue Jun 19, 2018 · 15 comments
Closed

Problems with magnetometer since using INAV #3398

elektrofreakz opened this issue Jun 19, 2018 · 15 comments
Labels

Comments

@elektrofreakz
Copy link

Board and Version

Omnibus F4 V3 from ebay seller
Inav 1.9.3

INAV/OMNIBUSF4V3 1.9.1 Apr 21 2018 / 13:13:58 (03a5c19)

Behavior

When using the heading hold mode on inav the quad starts spinning around. I never had this problem with this magnetometer in cleanflight, it has started since using INAV
GPS hold and altitude hold work fine. I use them together to get my drone as stable as possible for photography. When i undo the heading hold function it stops spinning.

I checked my magnetometer function by looking in the sensors tab from INAV and spinning the motors. It does not cause any interference. Magnetometer is a build in from an Ublox M8N module. And is mounted +- 10Cm above quad. Frame is a 3D printed MHQ2.

Also did multiple calibrations but did not help. Only going back to cleanflight solves this?

Blackbox logs/Config (.ZIP) where problem occurs

pastebin CLI dump:
https://pastebin.com/hukweiaD

@rb1205
Copy link
Contributor

rb1205 commented Jun 22, 2018

Probably related to #3288, however I've got mag issues with 1.9+ as well on my sp3 evo integrated sensor, so much that I downgraded to 1.8. You might want to downgrade to 1.8 as well until #3413 is released.

@elektrofreakz
Copy link
Author

According to my compass chip in the M8N it's a L8832122 AKA HMC5883L. So cant imagine thats the problem, but i will try downgrading to 1.8 and test my setup!

dsc_0013

@elektrofreakz
Copy link
Author

elektrofreakz commented Jun 22, 2018

still turning around with INAV1.8. But now can't calibrate the compass with the calibrate button. INAV recognizes the compass as a HMC5883. I tried manually setting the correct value's (from previous dump) via CLI commands. After doing this the red cross behind the compass line in the setup tab went away,. But it is still turning around. It's more steady with GPS and compass off. The calibrate problem is the same with the accelerometer. Had to set the variables in CLI manually

@rb1205
Copy link
Contributor

rb1205 commented Jun 23, 2018

The GUI calibrate buttons are a recent addition, might not work on 1.8. Use the stick command to trigger it.

@elektrofreakz
Copy link
Author

elektrofreakz commented Jun 25, 2018

Did the stick command and saved settings, will try flying the craft tomorrow. Also noticed now that when i tilt the craft forward, the model in the setup screen turns around. When i check the INAV docs it says that i should recalibrate my compass?

If heading value is correct when copter is level but drifts when you tilt the model, then your should re-calibrate the compass.

Did this multiple times, but keeps drifting when tilted. Can this be the strange turning around that i am experiencing? I ordered a new compass just in case. I have the compass now at CW 180 degrees configured.

@shellixyz
Copy link
Collaborator

@elektrofreakz It probably means your magnetometer alignment setting is not correct (the magnetometer is upside down in the GPS module).

@fiam
Copy link
Member

fiam commented Jun 25, 2018

@elektrofreakz Don't fly until you have that sorted out. Enabling any navigation modes with an improperly setup compass it's going to end up badly.

@elektrofreakz
Copy link
Author

Yeah, i know lol. Had to rebuild the whole craft because i tried to fly with not enough GPS satellites and returning home mode.

Got it now on CW 180 FLIP. It looks like this should be the right setting. The heading is also reading almost 0 degrees when the craft nose is pointing north. It doesnt react as extreme as before. But still when i tilt the craft forward it turns around 20 degrees to the right. When i tilt it backwards its does the same but to the left

@elektrofreakz
Copy link
Author

elektrofreakz commented Jun 26, 2018

Had a small testflight, and it seems to be stable. Had no issues with turning around in flight.
https://www.youtube.com/watch?v=OiM7a3SCJSw&feature=youtu.be

@teckel12
Copy link
Contributor

@elektrofreakz You stated "But still when i tilt the craft forward it turns around 20 degrees to the right. When i tilt it backwards its does the same but to the left". This is a classic indication that you don't have the correct orientation for your compass. It may fly, but in other situations it could be catastrophic. I can all but guarantee that your compass orientation is incorrect.

@elektrofreakz
Copy link
Author

elektrofreakz commented Jun 27, 2018

Yes, i tried all different MAG positions, and recalibrate the MAG sensor. But with CW 0 flip it's the most stable. Cant say its completely stable but it's better then nothing. Only issue is that with the cw 0 flip the heading is 180 deg off. So north is not facing north.. When i set it on cw 180 flip, the heading is correct but it starts spinning around like a mad man when the craft is tilted.

@teckel12
Copy link
Contributor

@elektrofreakz Sounds like a magnatometer alignment problem still, try set align_mag = CW270FLIP and then calibrate outside.

@elektrofreakz
Copy link
Author

elektrofreakz commented Jul 2, 2018

Fixed! Got an other GPS and magnetometer. Got the SE100 now. With HMC5883
got the magnetometer on CW270 flip.
Tried the old one on those settings but could not get it right. Also, the GPS on the SE100 is better :)

https://youtu.be/S1Hf1dx2XvY

@stale
Copy link

stale bot commented Aug 31, 2018

This issue / pull request has been automatically marked as stale because it has not had any activity in 60 days. The resources of the INAV team are limited, and so we are asking for your help.
This issue / pull request will be closed if no further activity occurs within two weeks.

@stale stale bot added the Inactive label Aug 31, 2018
@stale
Copy link

stale bot commented Sep 14, 2018

Automatically closing as inactive.

@stale stale bot closed this as completed Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants