OpenMarine
IMU starange behavior - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: Pypilot (https://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: IMU starange behavior (/showthread.php?tid=5221)



IMU starange behavior - partyvi - 2024-03-03

Hi, does somebody have idea where to look.

I am working to get my ICM-20948 work on Rpi5

However I am not sure issue related to Rpi5

Periodically, EXACTLY once in a minute it turns over my boat :-) and get back to normal.

Nothing in pypilot log related to IMU

Video is here
https://photos.app.goo.gl/Zn4dJecmBaBuyoxw7
[Image: Zn4dJecmBaBuyoxw7]


RE: IMU starange behavior - seandepagnier - 2024-03-04

yikes. If you stop the pypilot service and run pypilot from the console directly is there any output?

Maybe another service is trying to access i2c? Do you have a pi4 or other pi to compare? Can you run 'pypilot_scope' and plot the sensors output to see if it is compass, accel, gyro or all?


RE: IMU starange behavior - partyvi - 2024-03-04

(2024-03-04, 05:26 AM)seandepagnier Wrote: yikes.    If you stop the pypilot service and run pypilot from the console directly is there any output?

Maybe another service is trying to access i2c?    Do you have a pi4 or other pi to compare?    Can you run 'pypilot_scope' and plot the sensors output to see if it is compass, accel, gyro or all?

On rpi5 
I tried to run as app, the same story. No suspicious output, all loos good in log. I tried to run pypilot_boatimu it has sensors data in output, data is “jumping” every minute there too.

I tried to run the same sensor on pi4.
After each system restart it does this turn over couple times on rpi4, then stops. 
[update] after several reboots stopped strange behavior on Rpi4, but when i come to rpi5 continue again


First moment I thought it is the sensor problem, but after it stopped to do turning it looks more like sw.


RE: IMU starange behavior - partyvi - 2024-03-05

I added debug output to boatIMU.py (line 484) and print raw data from IMUread() command, it looks like IMUread gives wrong data.

log is here:
https://drive.google.com/file/d/1_z9VfdoSyyAxHksu0ondCLzPqb5iaJwQ/view?usp=drive_link


Any ideas where to look?

PS. On rpi4 it did cople rotates, then set to normal, even after reboots, it still good.

(2024-03-05, 03:28 AM)partyvi Wrote: I added debug output to boatIMU.py (line 484) and print raw data from IMUread() command, it looks like IMUread gives wrong data.

log is here:
https://drive.google.com/file/d/1_z9VfdoSyyAxHksu0ondCLzPqb5iaJwQ/view?usp=drive_link


Any ideas where to look?

PS. On rpi4 it did cople rotates, then set to normal, even after reboots, it still good.

[UPDATE}
try other IMU - L3GD20H/LSM303DLHC

behaviour is EXACTLY the same, exactly once per minute boat doing kind of turn over.


RE: IMU starange behavior - partyvi - 2024-03-05

Boat turn over mystery resolved!!!!!

Issue was in OP plugins, by default they update time every 60 seconds.
And in the moment of time update boat did this turn over, looks like something wrong there.

I switched off "set system time" plug-in - problem with IMU get solved. (at least for now)
I will need to figure out how to set time after power off without internet, however RTC battery can be connected to Rpi5

syslog in the moment of turn over.
Mar 04 22:27:33 openplotter sudo[7507]: pi : PWD=/home/pi/.signalk ; USER=root ; COMMAND=/usr/bin/date --iso-8601 -u -s 2024-03-05T04:27:33.000Z
Mar 04 22:27:33 openplotter sudo[7506]: pi : PWD=/home/pi/.signalk ; USER=root ; COMMAND=/usr/bin/date
Mar 04 22:27:33 openplotter systemd-journald[332]: Time jumped backwards, rotating.
Mar 04 22:27:33 openplotter sudo[7507]: pam_unix(sudoConfusedession): session opened for user root(uid=0) by (uid=1000)
Mar 04 22:27:33 openplotter sudo[7506]: pam_unix(sudoConfusedession): session opened for user root(uid=0) by (uid=1000)
Mar 04 22:27:33 openplotter sudo[7506]: pam_unix(sudoConfusedession): session closed for user root
Mar 04 22:27:33 openplotter sudo[7507]: pam_unix(sudoConfusedession): session closed for user root


RE: IMU starange behavior - seandepagnier - 2024-03-05

why is this only on the pi5 though?