I've just installed my old APM/IMU/Magnetometer from my Arducopter into my Skywalker and installed the latest APM code.
During testing I found that the AH wasn't displaying heading, and I've checked the hardware setup screen and confirmed that compass is enabled with declination set.
I've then gone to CLI and tried to run compass test, and it reports that the compass of off.
I then goto setup and give the command compass on
It reports initialisation failed.
I'm sure it was working on my Arducopter.
Thanks Andrew, I'll give that a try.
I put the compass test code on my APM and I was getting compass data, a I moved the magnetometer the values changed.
btw, I added a lot of error checking to the compass initialisation code quite recently, and it is quite possible that it is this error checking that is causing you problems. So I am very interested in exactly what is causing the init failure for you.
I had a similar problem for about ten days and eventually i gave up and ordered a new one from udrones, but by accident i started to play with the connector and then it started working. I guess mine was the connector on the IMU board
Hi, I need a help regarding to my mag sensor. I connected the Mag sensor to IMU sheild based on method 2 given on the website. I am pretty sure about the wiring and I have uploaded the arduplane code v 2.3 through adruino IDE.
I've then gone to CLI and tried to run the compass test from setup, and it reports that the compass initilaization failed. I cannot enable the compass, seems the board does not recognize the mag device. Any idea how can i debug this. thanks
I am using HMC5883L sensor and it does not have that faulty 200 resistor (called 204). I also uploaded the AP_Compass_test and trying to observe the compass response through the arduino IDE serial monitor, but still I get compass failed. Any solution please.
Kasra: get a RMA from the store you bought it from and return it for a replacement.
Hi Chris: finally I have received my replaced HMC5883L mag sensor, but again I am facing the same problem.
I am trying to setup the Compass in CLI mode but the compass initialization fails. I cannot enable the compass. This was the second mag sensor board which I hooked up on my APM 1.4 and I am facing the same issue.
Does my GPS need to be locked in order to setup the compass??
Do I have a problem with the I2C data bus port on my APM ? though all of the other sensors (baro, GPS, IMU, Speed,...) are working perfect.
I have also checked the voltages on HMC5883L mag sensor board. This is what I read:
1.Voltage between Vcc and GND is 4.87v
2.Voltage between SDA (data bus) and GND is 4.67v. But once I go to CLI mode this voltage drops to zero.
3.voltage between SCL (Clock) and GND is always zero
Based on these info can you help me how can I debug this. Thanks
Kasra: are you soldering it on or using a cable?
I am Soldering it.
I wonder if in the soldering you've melted some traces on the IMU shield. Is it possible to unsolder it and try adding a cable to connect it via the I2C connector instead?
Thanks chris, I will give that a try and come back with feedback.