LSM303DLHC Tilt compensation problems with Uno

An area to discuss AVR and Arduino specific problems and examples

Moderator: Benj

Post Reply
viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

LSM303DLHC Tilt compensation problems with Uno

Post by viktor_au »

Ebay module: Chinese LSM303DLHC e-Compass 3 axis Accelerometer and 3 axis Magnetometer.
Module connections: Vin (5v), Gnd, SDA->SDA (A4 on 'classic' Arduinos), SCL->SCL (A5 on 'classic' Arduinos), Int1 to Uno board A0. Note: Int2 is not connected.
Without using the tilt compensation the azimuth value is more stable but does change with module in off-level position.
With tilt compensation formulas (some from this forum and some from the internet) the azimuth value is noisy and not stable.
Is it the Chinese module? Is it the code? Any suggestions with a different tilt-compensated sensor (supported in FC7)?
Will appreciate any help.
Attachments
Uno_LSM303_tilt_1.fcfx
(43.68 KiB) Downloaded 239 times

viktor_au
Posts: 342
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 43 times
Been thanked: 60 times
Contact:

Re: LSM303DLHC Tilt compensation problems with Uno

Post by viktor_au »

Probably this is the answer:
Because of drift and noise components at low angular rates, MEMS-based gyroscopes are typically not used directly in the calculation of heading...
https://www.sensorsmag.com/components/c ... on-effects

Post Reply