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
Bad IMU?
#1
I think my IMU is failing... 

Out for the race across the bay with Pypilot replacing my fluxgate compass that got fried when lightning hit the boat on the trailer to our port. 

We had a great start !!
https://photos.app.goo.gl/YuLzfTDcHdouZKwc9

and the Pypilot compass and GPS USB dongle were feeding the Signal K dashboard with Mag heading, COG, SOG and yaw pitch and roll. Everything is great, the Amazon Fire tablet running VNC is in a waterproof case strapped on top of the old Nexus instruments on the mast. We took 2nd in the Spin B fleet! 

I pulled the PI and the Fire from the boat took it home to recharge the batteries. Next day the pi and IMU and GPS all in its water proof case is remounted on the velcro dots on bulkhead and we set off for the next days racing. About halfway through the race the new compass starts swinging radically and is not useable at all. When we get in and the boat is back on the trailer and everyone is inside with something warm to drink, I pull up the SignalK Scope and get some screen shots from the Fire.

The boat is facing north and suddenly the compass shows we turned to 159 degrees. 
Screenshot_2020-02-02-15-58-47

11 seconds after that, the compass reads 150 degrees 
Screenshot_2020-02-02-15-58-58

The erratic readings continue and the compass calibration globe rotates wildly on all three axis ( partially covered in this pic. ) Finally settling back to 350 degrees. ( I may have locked the calibration in the last screen trying to stretch the window) 
Screenshot_2020-02-02-15-59-45

Is this the symptom of a bad IMU or is there something else going on. The weather in in the low 60s both days. 

Thx
Reply
#2
First of all, where did you get the IMU?

I am not sure if it is a bad imu bug it's difficult to tell from you screen shots.

Could you plot the raw sensors:
imu.accel imu.gyro imu.compass

Usually the gyro will be very high or wrong, and there is new code in pypilot to reset the imu if it detects this. I think it may come from a misaligned fifo. It might be possible to enhance the reliability of the driver by adding additional fields to the fifo to ensure the data is aligned. I am not sure if this is the issue for you ( all sensors wrong) or just the gyros are wrong.

If you restart pypilot does the problem go away for a while?
Reply
#3
(2020-02-04, 03:58 AM)seandepagnier Wrote: First of all, where did you get the IMU?

I am not sure if it is a bad imu bug it's difficult to tell from you screen shots.

Could you plot the raw sensors:
imu.accel   imu.gyro  imu.compass

Usually the gyro will be very high or wrong, and there is new code in pypilot to reset the imu if it detects this.   I think it may come from a misaligned fifo.   It might be possible to enhance the reliability of the driver by adding additional fields to the fifo to ensure the data is aligned.   I am not sure if this is the issue for you ( all sensors wrong)  or just the gyros are wrong.

If you restart pypilot does the problem go away for a while?

This is a IMU from spark fun ( https://www.sparkfun.com/products/13762 ). I"m not sure what caused this and after rebooting the PI during the race the problem may have gone away but came back later. I cant reproduce this on the bench. The plots are of the from imu.heel, imu.pitch imu.roll, I could not remember the what to plot. I'll get  imu.gyro  imu.compass next time. Hopefully while it is sitting on the bench this week instead of in the boat next week. I also have a older  Adifruit 9DOF that I'll try on a copy of this SD card to see if it behaves the same.
Reply
#4
Hi diyc235,

I had a similar problem and it results to be the fresh water pump or the attached pressure switch.
Not always but often it drives the imu mad, lossing all calibrations.

When all is runnig well make a copy of your pypilot.conf and when the problem shows copy the copy back after
sudo sv d pypilot and than do sudo sv u pypilot.
.
Hope this helps
Andreas
Reply
#5
I suggest first try using mpu9255. Be sure to look at imu.accel imu.gyro and imu.compass next time.
Reply
#6
I wired in my old Adifruit 9DOF ( https://www.adafruit.com/product/1714 )  from 2017 and started pypilot. It recognized the device right away. Starting the acceleration calibration I was  amazed at how jittery it was. The older Adafruit IMU, generates a lot of green dots just sitting on the bench, so I really don't want to use it after all. That brought up a question.

How do I clear the calibration between one IMU and another?
The reset/clear buttons on the GUI don't seem to work. So I ended up removing and reinstalling pypilot to clear the settings.

Also who sells a 9255 IMU? If my compass freaks out again I may want to try another one anyway. There are some on ebay for $4, but are they reliable ?
Reply
#7
Some sensors have much more noise than others, so your old sensor might have a lower quality accelerometer.

The reset button only changes the gui, but there is no real need to reset the calibration since a new calibration update will overwrite it.   You can edit pypilot.conf to do this.

the 9255 you found is probably reliable but 5-10% of the ones sold have bad sensors.   There are also many more out there with large accelerometer bias so beware of these too.
Reply
#8
(2020-02-06, 02:09 AM)seandepagnier Wrote: the 9255 you found is probably reliable but 5-10% of the ones sold have bad sensors. 

By "bad", do you mean the sensor just doesn't work, or is there some other common defect?

(2020-02-06, 02:09 AM)seandepagnier Wrote: There are also many more out there with large accelerometer bias so beware of these too.

How does this problem manifest itself?  (ie, how do we know that that's the problem?)

Thanks  Smile
Reply
#9
In 9255 I have seen sensors where one of the sensor axes does not change reading.

In other 9255: accelerometers with bias >1g where it would saturate in normal use at the normal +-2g range.
Reply
#10
(2020-02-04, 03:58 AM)seandepagnier Wrote: First of all, where did you get the IMU?

I am not sure if it is a bad imu bug it's difficult to tell from you screen shots.

Could you plot the raw sensors:
imu.accel   imu.gyro  imu.compass

Usually the gyro will be very high or wrong, and there is new code in pypilot to reset the imu if it detects this.   I think it may come from a misaligned fifo.   It might be possible to enhance the reliability of the driver by adding additional fields to the fifo to ensure the data is aligned.   I am not sure if this is the issue for you ( all sensors wrong)  or just the gyros are wrong.

If you restart pypilot does the problem go away for a while?
Hi Sean,

When did you commit that change to repair the misalignment?
Is it already in the last openplotter version?
Currently I have a problem with the mpu9250, after a couple of minutes (half an hour or so) there seems to be an oscillation, the compass is spinning all over the globe.

Would a mpu9255 be better?

I ll try to make a screenshot of the scope and check if the pull ups on the i2c lines.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)