HMC5883L with external magnet

GY-273 HMC5883L Compass A. I'm waiting for my chip to arrive and will attach it to a RasPi. B.  My question is: if I align my chip to "N" then rotate a magnet round the chip - i.e. a weathervane - thoughts on how that might work? C. Can my magnet, if too strong/close, damage my chip? Thanks

Topic by liderbug   |  last reply


How to make the GY-87 work probably ?

Hey, This my first question and ... action here with this new account :) My problem is I'm making a quad-copter, which needs some balance and no problem of adding some features like alt. measurement and so. I bought a GY-87 10DOF chip which combines 5 sensors :- MPU6050 Gyroscope MPU6050 Accelerometer BMP085 Barometer BMP085 Temperature sensor HMC5883L Magnometer I don't know yet how to make the quad-copter balance using the chip but I'm focusing now on making the chip work at all. After 7 hours of searching I could get a messy code using KALMAN filter to get the gyro and accel angels which worked fine eccept that the code combines the Z axis with the compass reading and I need to understand how to make every reading separate, which get us to the secong problem, the compass is stuck at 50.3 degrees, after reading i found that i must enable the I2C cuz both of the MPU and the HMC uses the same bus ways, I added a delay (100) ms to let the HMC get it's reading, i could make it work till I realized that the reading is not from 0- 360, it's between 200 and ... maybe 342 ! although making the BMP work was difficult a bit.. now my questions are :- -Understand how the gyro code works or at least add the Z axis of the the gyro not the compass -How to make the compass work probably Files:- https://drive.google.com/open?id=0BxGMyrtCX-KJVHB5S1luZ3VLeGM Libs:- https://drive.google.com/open?id=0BxGMyrtCX-KJcXZ6VlZmejRDR2c

Question by Mavrick23