Questions tagged [magnetometer]
93 questions
13
votes
7 answers
Acceleration when device is on tilt
I'm currently working on device that uses always-on 3D accelerometer(using scale +-2g) and 3D gyroscope(using scale +-250g) -sensor.
I can read every possible vector (X,Y,Z) and their acceleration (g's) and angular rate (dps) and also the angle…

jumbojohn
- 131
- 1
- 5
12
votes
2 answers
Why do compass chips in cellphones require frequent calibration?
Most cell phones offer digital compass functionality which uses a 3-axis magnetometer chip for data. Phones (some more than others?) frequently require the user to "recalibrate", which involves rotating the phone in a "swirly" or other pattern to…

uhoh
- 3,399
- 2
- 23
- 63
11
votes
1 answer
AHRS algorithm under continuous linear accelerations
I have tried several algorithms to get pitch, roll and yaw under continuous linear accelerations and vibrations (smaller than 0.4g, frequency lower than 10HZ). None of them give good results because the readings either drift or are affected too much…

Timtianyang
- 521
- 2
- 6
- 16
6
votes
2 answers
Magnetometer (LIS3MDL) temperature reading changes with orientation
I have a LIS3MDL outputting what seem to be reasonable magnetic field strength values (see second image). However, I am confused why the temperature reading seems to be dependent on the orientation of the magnetometer when I performed the "figure…

abc
- 619
- 6
- 21
6
votes
1 answer
Accessing magnetometer results in MPU-9250
I am interfacing an MPU-9250 to an STM8S207 microcontroller.
The MPU-9250 is accessed via 400kHz I2C. I have no isses with getting measurement data from the temperature, gyro and accelerometer, but can not get the built-in AK8963 magnetometer…

maszoka
- 91
- 1
- 5
5
votes
4 answers
How is the degaussing feature in the HMC5883L 3-Axis Digital Compass chip correctly used?
edit/tl;dr: The set/reset strap driver is an H-bridge circuit to deliver 10 mA of DC current to a strap which temporarily produces about a 1.1 gauss magnetic field offset. A change in the measurement before and during this field offset can be used…

uhoh
- 3,399
- 2
- 23
- 63
4
votes
1 answer
Can a 3-axis magnetometer be tilt compensated when moving/accelerating?
I have a magnetometer, accelerometer and gyro which all go swimming (attached to a person.) Data is logged and I now have a sample of that data.
I want to calculate the magnetic heading the user was travelling in. However, all the documents I can…

Thomas O
- 31,546
- 57
- 182
- 320
4
votes
2 answers
Maintaining constant magnetic field strength with temperature
We use SmCo magnets to create a field strength of around 300mT. We choose this material, rather than NdFeB because the former has a much smaller change in field with temperature. For SmCo it is (apparently) around 0.03%/degC or roughly 1 part in…

Dirk Bruere
- 13,425
- 9
- 53
- 111
4
votes
1 answer
Mystery SOT-143 Part on Magnetometer
I'm trying to understand the operation of a single coil magnetometer (marketed as "fluxgate", but with only a single coil). I've backed out the schematic as shown. The coil is driven by a 17kHz oscillator (not shown other than as "oscillator").
I'm…

geo_leeman
- 85
- 6
4
votes
4 answers
How to connect multiple of the same device to an Arduino using I2C?
I want to use two of the same magnetometer (HMC5883L) with my Arduino, but I cannot figure the code for calling each of them separately.
I have read online that connecting multiple devices is completely doable, as long as you call their respective…

Kadin
- 217
- 1
- 4
- 10
3
votes
0 answers
Tilt Compensated Compass Calibration Issue
I implemented a tilt-compensated compass using an NXP semiconductor app note link: App Note and hard iron calibration algorithm using Article. I am using LIS3MDL magnetometer chip in my design.
I also have Honeywell HMR3300 and HMC6343 compass…

HumbleBumble
- 57
- 4
3
votes
3 answers
I2C pull-up resistors and voltage
I have a sensor that I'm trying to read via I2C, but I have some issues with the pull-up resistors and what voltage they would be set to.
My host computer is the Arduino Nano Every while my sensor is the HMC5883L magnetometer.
Below is a block…

BestQualityVacuum
- 456
- 7
- 32
3
votes
2 answers
Magnetometer thermal drift
I try to measure Earth's magnet field with LIS3MDL. This chip is operable in (-40..+85) deg. When the temperature is lower than -10 deg, the chip measures becomes wrong. The plot of raw measures after soft-iron and hard-iron compensation are in the…

maestro
- 179
- 7
3
votes
1 answer
Calibration of magnetometer for precise yaw
I'm using Sparkfun Razor IMU 9DOF sensor which incorporates accelerometer, gyroscope, and magnetometer, for giving the Euler's angles (yaw, pitch, and roll). I'm using the firmware at this link. It has Processing sketch for calibration of…

yode
- 31
- 2
3
votes
2 answers
Magnetometer tilt compensation without accelerometer
I need to use the magnetometer in a device to accurately determine how many degrees the user twists (rotates in x-y plane) it. I don't care about absolute orientation, just the angular delta. Of course the user can hold the device in any…

MilesK
- 51
- 7