stanleyhuangyc / Freematics

Official source code repository for Freematics
https://freematics.com
428 stars 347 forks source link

Using the accelerometer #32

Open timurrrr opened 7 years ago

timurrrr commented 7 years ago

Hello!

Before getting a Freematics ONE v4 with MPU-9250 onboard, I was using a LSM6DS3 on a breadboard to record accelerations in my car. I performed some test recordings with both accelerometers side by side and noticed that the data I get from MPU-9250 is not as good as I can get from LSM6DS3.

First of all, I can't read accelerometer data from MPU-9250 more often than ~100Hz. With LSM6DS3 I can easily get 200HZ and possibly even 1000Hz. Getting higher-frequency data is crucial to have orientation calculated correctly.

Second, the data that comes from MPU-9250 has a lot more noise. As you can see on the screenshot, the noise amplitude is ~5x larger for MPU-9250 on average and it can be as high as 1g sometimes! I wonder if it has something to do with the i-ELOOP on my Mazda 6 – the noise seems to increase when I take highway exits. If it has, probably the power supply in the Freematics ONE doesn't have a good enough low-pass filter?

How to read the screenshots: Red = right/left, Green = accel/braking, Black = down/up. The bold graphs are averaged readings (0.2s window for R/G, 0.5s window for B). The horizontal time scales are different because I'm using ~200Hz for LSM6DS3 and ~100Hz for MPU-9250 (I'm not using an RTC, so the time readings may be off by a small factor).

Any tips how to get lower noise and higher frequency accelerometer data from the Freematics ONE v4? Any chance to get a less noisy / more responsive accelerometer in the next hardware revision?

LSM6DS3 vs MPU-9250, same trip: lsm6ds3 mpu-9250

LSM6DS3 vs MPU-9250, highway exit close-up: lsm6ds3 close-up mpu-9250 close-up