This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tilt compensation compass (mpu9250/6500)
#1
As I am (trying) to move away from the Moitessier, I am stumped by the behavior of my MPU. 

It's a MPU 9250/6400 that I connected to the GPIO pins. When level I get proper readings.

I know tilt-compensation is a thing, but I naively assumed this was handled by PyPilot.
Sadly, this is very much not the case: At 30 degrees tilt (heel) the compass is off by more than 45 degrees. 
Both the accelerometers and the compass have been calibrated using PyPilot. 
Needless to say my Moitessier does not have this problem.

If this is a hardware thing, please advice me which MPU I should buy (including a link if at all possible) as specs are not always as clear as I'd like..

Thank you for your hints!
Reply
#2
(2021-07-27, 02:51 PM)fishy Wrote: As I am (trying) to move away from the Moitessier, I am stumped by the behavior of my MPU. 

It's a MPU 9250/6400 that I connected to the GPIO pins. When level I get proper readings.

I know tilt-compensation is a thing, but I naively assumed this was handled by PyPilot.
Sadly, this is very much not the case: At 30 degrees tilt (heel) the compass is off by more than 45 degrees. 
Both the accelerometers and the compass have been calibrated using PyPilot. 
Needless to say my Moitessier does not have this problem.

If this is a hardware thing, please advice me which MPU I should buy (including a link if at all possible) as specs are not always as clear as I'd like..

Thank you for your hints!

Hi
Firstly I cannot help in fixing your issue per se but what I can give you is a summary of my experience and perhaps some hope!

I use one of these https://www.waveshare.com/product/module...nsor-c.htm

It uses an MPU 9255, I have calibrated it in pypilot and can say that the compass heading it transmits does not vary hugely even with large angles of pitch and roll. I assume therefore that pypilot is indeed making some sort of correction for tilt and doing it very effectively. 

I will try to do some more tests as the ones I've done so far have been quite rough and ready

Good luck
Reply
#3
Hi Baltika,

Thanks for the feedback, I will look at that MPU. Happy to hear you have got it working, but I'd love to hear the results of your tests!
Reply
#4
Hi Baltika,

Thanks for the feedback, I will look at that MPU. Happy to hear you have got it working, but I'd love to hear the results of your tests![/quote]

Let me say first of all that the test I've carried out is not very scientific so beware when inferring conclusions. I simply held the IMU in my hand and manipulated it. That alone is bound to induce so errors as it is impossible for me to hold it in a fixed heading while twisting it. I moved the IMU + and - to around 40° of roll and pitch. When roll only is involved the heading remained pretty consistent (given that I was holding it in my hands) suggesting that some sort of compensation for that motion was happening. However when pitch is involved there is a clear indication that the heading does deviate significantly.

I would have liked to have been able to carry out something a little more rigorous but at the moment I can't I'm afraid. I offer my results fully in the knowledge that they are error prone but please don't beat me up about that.

[quote=fishy pid='20180' dateline='1627539999']    
Reply
#5
I found something quite confusing last night:

If I hold the sensor 'right side up' (as I see it) and calibrate, the broad side of the sensor board is pointing forward (x-axis), and tilt compensation seems to work reasonably OK.
If I flip the thing so its upside down, the narrow side becomes the forward pointing side, and tilt compensation gets wacky, really bad tilting to starboard, ok-ish tilting to port.

What gives with the 90 degree rotation of the x-axis? This seems to indicate that tilt compensation is less well performed when pitching (as opposed to heeling).Understandable, as heel is normally much stringer than trim but still- huh???

Anyone with a better understanding of PyPilot that can elaborate? Thanks again!
Reply
#6
You must level the sensors in pypilot calibration to get reasonable tilt compensation

as for different tilt compensations. Consider that it is not pitch vs roll but north/south vs east/west. The magnetic field is mostly vertical

It could be you have bad sensors. Often with these, one or more axes does not work. I just threw about 50 mpu9255 away because the z gyro did not work. Sometimes the x or y gyro does not, sometimes some accelerometer axes do not work.
Reply
#7
Fully agree with @seandepagnier. There was at least one prior discussion on the quality issues of these type of sensors.
https://forum.openmarine.net/showthread....a#pid19394
Reply
#8
(2021-08-04, 08:11 AM)seandepagnier Wrote: You must level the sensors in pypilot calibration to get reasonable tilt compensation

as for different tilt compensations.   Consider that it is not pitch vs roll but north/south vs east/west.   The magnetic field is mostly vertical

It could be you have bad sensors.   Often with these, one or more axes does not work.   I just threw about 50 mpu9255 away because the z gyro did not work.   Sometimes the x or y gyro does not, sometimes some accelerometer axes do not work.

50?!? That sounds like pretty bad quality control. I'm on my 3rd..
Is tehre a type / brand / store where the odds are a bit better than 1/50 of scoring a functioning sensor? Like I said before, I see a _very_ wide spread of prices, for what appears to be the same little board. And no discernable way (for the layman) to tell good from bad... I saw that PyPilot now sells these- are they quality controlled / tested?
Reply
#9
yes I perform quality control for the ones on pypilot.org

As I said, I can order 50 and all 50 are good (this is extreme luck) or sometimes maybe 48 are good. Maybe only 10 are good. Then I often get all 50 bad ones. I wish I knew how to only order good ones.
Reply
#10
(2021-08-08, 11:40 AM)seandepagnier Wrote: yes I perform quality control for the ones on pypilot.org

Ah, now that's a service worth paying for!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)