Questions tagged [magnetometer]
The magnetometer tag has no usage guidance.
33 questions
2
votes
1
answer
1k
views
Why am I getting wrong compass heading using magnetometer readings?
I have been trying to calculate the compass heading using the magnetometer in an MPU9250 sensor. But the result is not making sense to me. I am completely new in this and do not have much ...
0
votes
1
answer
785
views
How to calibrate MMC5603 magnetometer
I just got a MMC5603 magnetometer from Adafruit however the measurements are unreliable. For example when I convert it to a heading it goes from 200° to 180° and then back to 200° if I move it ...
1
vote
1
answer
205
views
Quaternion values from Arduino 9-axis motion shield seem very wrong
I am currently usinga BNO055 sensor fitted on the Arduino Nine-axis motion shield to measure ocean wave heights and periods. To do this, I'd like to use the quaternions provided, however I have a ...
1
vote
0
answers
408
views
HMC5883L Magnetometer X, Z values constant, only Y value Changes
I have a HMC5883L module connected to an Arduino Mega 2560 via +5, GND, SCL, SDA. The Arduino code is from the MagMaster-master example, as follows:
#include "Wire.h"
#include "...
1
vote
1
answer
73
views
Setup/Debug affordable 9DOF IMU
I bought a 9 DOF IMU from AliExpress (pictures below), asking because this seems to be somewhat of a common issue (and I'm a bleeding noob). I tried setting up this board using example codes from ...
-1
votes
2
answers
324
views
LSM303 unable to compensate tilt
I am working on a tilt compensated compass with the LSM303DLHC. I manage to calibrate the magnetic and accelero part. I managed to calculate pitch and roll. But when it comes to calculate tilt ...
0
votes
1
answer
646
views
MPU-9250 compass always returns to zero
I am trying to build a 9-DOF IMU using the MPU-9250 chip which contains a gyro, accelerometer and compass. I have successfully realized 6-DOF sensor fusion using the DMP chip and Sparkfun's library, ...
0
votes
1
answer
471
views
Tilt Compensated Compass Using HMC5983 gives inconsistent output
I've been trying to build a tilt compensated compass for an autonomous Arduino car I'm building. I'm having issues with the consistency of my data.
This is the code I'm using.
#include <Wire.h>...
0
votes
1
answer
197
views
Compass heading not varying linearly
I am using an HMC-5983 magnetometer compass on my arduino uno to find the heading of a car I'm building.But my compass readings aren't varying linearly.For example when I physically turn my compass by ...
2
votes
1
answer
162
views
FIXING BUG when Using Wire library to obtain compass heading
I am using the HMC-5983 magnetometer module to obtain the compass heading of a autonomous car I am building using the arduino platform.I'musing the
Z axis and X axis to obtain the heading.
However ...
1
vote
2
answers
1k
views
Adafruit_LSM303 tilt compensated compass
I am having troubles with tilt compensating my compass.
I am using the LSM303DLHC accelerometer/compass in combination together with the Adafruit_LSM303_U.h.
I was able to get my compass to the ...
0
votes
2
answers
452
views
LSM9DS1 breakout - How to increase speed
With regards to the Adafruit LSM9DS1 breakout:
enter link description here
And using the Library:
enter link description here
I am trying to increase the sample rate, or speed of this chip.
I am ...
2
votes
1
answer
207
views
Can't get MMC3416xPJ to work
I needed a magnetometer with a high Output Data Rate (ODR). This is because I wanted to measure AC magnetic fields of around 20-80 Hz. So I decided to go with the MMC3416xPJ prototyping board which ...
2
votes
0
answers
357
views
Code stuck on mag.getEvent(&event); in HMC5833L Compass
Last week I created some code in which I can run a Ublox GPS NEO-6 and a magnetometer HMC5883L together. Which at the time worked brilliantly.
Yesterday I have attempted to run the code again, with ...
1
vote
0
answers
2k
views
QMC5883L automatic calibration
I have a QMC5883L magnetometer, and a pretty basic sketch which just prints the values from X, Y and Z axis to the serial monitor.
I want to use it in an application to detect changes in the ...
0
votes
1
answer
2k
views
How to read the raw data from GY-85 module?
This module has 3 sensors. Gyroscope, Accelerometer and Magnetometer.
I think I'm reading the raw data in the wrong way.
For example, for the magnetometer HMC5883L, I'm using this code which I ...
1
vote
3
answers
885
views
How to filter or eliminate earths magnetic field readings around 3D Magnetic sensor?
Im using the SparkFun MAG3110 3D sensor:
https://www.sparkfun.com/products/12670
My application is essentially to make a contactless "magnetic joystick" using a local magnet for accurate and constant ...
0
votes
1
answer
301
views
Passing reference to hardware between methods in custom class
I'm a C++ / Arduino newbie, trying to build a custom library for the first time. I created a unit called CDSensors.cpp, which has two methods, SetupSensor and ReadSensors. The sensor is a SparkFun ...
0
votes
1
answer
66
views
adafruit LSM9DS0 Library - ok with Uno but compile error with LinkitOne?
I'm calling an adafruit Flora LSM9DS0 magnetometer using the Adafruit library with the following sketch:
#include <Wire.h>
#include <SPI.h>
#include <...
1
vote
1
answer
817
views
Does the position in which you mount an IMU matter?
Forgive me, I'm sure this is a total noob question, but I have never seen it actually addressed in any example or demo.
When using something like a MinIMU-9 board (https://www.pololu.com/product/...
2
votes
0
answers
2k
views
Arduino GY273 HMC5883L Constant Value
I have a GY-273 which has HMC5883L chip (I guess). I am trying to get data. I find a few codes and library (I don't have enough information about HMC5883L) but always all serial port screen there are ...
2
votes
2
answers
3k
views
Issue with code for SDA/SCL TC9548A Multiplexer and HMC5883L sensors
This is my first time posting on this forum, so I hope my question is appropriate here. My team is working with the Adafruit TCA9548A 1-to-8 I2C Multiplexer Breakout board to try and read from six ...
2
votes
1
answer
580
views
HMC5883L - Tilt compensation without Accelerometer
Trying to get an HMC5883L to compensate for being installed in 90 degrees. Doesn't seem to me that it'll need too complex math or accelerometer. But I have no idea how to do the compensation for it. ...
-1
votes
1
answer
3k
views
MPU-9250 IMU on SPI, external sensor or magnetometer using I2C master
I'm trying (for sport...) to use an MPU-9250 in SPI mode as it should be faster, and wasn't able to talk to the embedded magnetometer in my code.
I've gone through the documentation (RM-MPU-9250A-00 ...
3
votes
1
answer
3k
views
3.3v inductive proximity sensors
I'm using an ESP8266 so I'm limited to 3.3v. I've found a number of inductive proximity sensors but they require 5v or more. Does a 3.3v sensor exist?
I recently dropped some tiny screws on dark ...
2
votes
2
answers
680
views
Problems reading I2C sensor when using a Xbee module
I'm developing a project where I can control a RC boat with GPS and a magnetometer. How ever, I was developing everything connected to my computer and worked pretty well. When I was going to make some ...
1
vote
1
answer
2k
views
Where can I find magnetic declination lookup table?
Is there a way to get approximate value of magnetic declination from GPS coordinates?
My Arduino-based device has a Magnetometer and a GPS, and uses magnetic declination in calculations. I would like ...
2
votes
0
answers
4k
views
Two MPU 9250 connected to one arduino (Code of the MPU6050 edited for MPU9250)
I have done a lot of tries to make my two IMU work with my arduino. I'm also done with many research about it and I found this code:
// I2C device class (I2Cdev) demonstration Arduino sketch for ...
2
votes
4
answers
6k
views
How to use Multiple MPU9250 to Arduino Lilypad [duplicate]
Is it possible to connect more than one or to be specific 5 MPU9250 into 1 Arduino lilypad? How will I set the addresses, and where should I put the pins for SDA and SCL? I hope someone out there ...
12
votes
4
answers
37k
views
Converting three-axis magnetometer values to degrees
I have a 9-DOF sensor (MPU-9150) and I want to use its magnetometer to retrieve the rotation angle, from 0 to 359. However, its library returns three values: x, y and z.
I do not know how to transform ...
1
vote
1
answer
178
views
Will it work ? MPU6050 Gyro etc. etc. module
Will this code read the values properly ?
Using MPU6050.h.
#include <MPU6050.h>
#include <Wire.h>
void setup() {
Serial.begin(115200);
Wire.begin();
MPU6050.initialize();
}
void ...
5
votes
2
answers
22k
views
What is the difference between Accelerometer, Gyro, and Magnetometer Sensor?
I'm starting in the arduino world and I'm building an autonomous smart vehicle.
So, after some weeks building and adjusting the vehicle, I got to a point in this project that I want to log it's ...
2
votes
0
answers
574
views
Combining & averaging magnetometer values
I am trying to measure a users 'hand steadiness' in order to control a video game character in UNITY3D. I am using a MinIMU-9 Gyro/Accelerometer/Compass linked with Arduino. I can measure pitch/roll ...