2022 Developer Survey is open! Take survey.

Questions tagged [magnetometer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
99 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 "...
user avatar
1 vote
1 answer
57 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 ...
user avatar
-1 votes
2 answers
137 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 ...
user avatar
0 votes
1 answer
340 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, ...
user avatar
  • 123
0 votes
1 answer
210 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>...
user avatar
  • 209
0 votes
1 answer
131 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 ...
user avatar
  • 209
2 votes
1 answer
105 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 ...
user avatar
  • 209
1 vote
2 answers
686 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 ...
user avatar
  • 49
0 votes
2 answers
339 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 ...
user avatar
  • 117
2 votes
0 answers
156 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 ...
user avatar
2 votes
0 answers
269 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 ...
user avatar
1 vote
0 answers
1k 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 ...
user avatar
  • 157
0 votes
1 answer
1k 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 ...
user avatar
  • 183
1 vote
3 answers
484 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 ...
user avatar
0 votes
1 answer
207 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 ...
user avatar
0 votes
1 answer
57 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 <...
user avatar
1 vote
1 answer
597 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/...
user avatar
2 votes
0 answers
1k 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 ...
user avatar
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 ...
user avatar
2 votes
1 answer
416 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. ...
user avatar
-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 ...
user avatar
3 votes
1 answer
2k 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 ...
user avatar
  • 633
2 votes
2 answers
625 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 ...
user avatar
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 ...
user avatar
  • 113
2 votes
0 answers
3k 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 ...
user avatar
  • 131
2 votes
4 answers
5k 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 ...
user avatar
  • 131
8 votes
4 answers
22k views

Converting three axis magnetometer to Degrees

I do not know if here is the best place to post this question. 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 ...
user avatar
  • 195
1 vote
1 answer
170 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 ...
user avatar
  • 35
5 votes
2 answers
16k 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 ...
user avatar
2 votes
0 answers
542 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 ...
user avatar
  • 21