As a followup to a conversation in this thread: http://www.diydrones.com/profiles/blogs/3dr-gps-mag-back-in-stock
I have successfully used this $15 sparkfun HMC5883L breakout board: https://www.sparkfun.com/products/10530
as an external compass on my APM 2.5.
Used the instructions here: http://copter.ardupilot.com/wiki/common-external-magnetometer-for-improved-performance/
The process is even simpler than those instructions, since the sparkfun board is already wired for 3.3V. Just connect four wires and cut a jumper on he APM to disable the onboard compass.
I wasn't able to source the correct cable from sparkfun, but got one that was 1mm OC instead of the 1.25 OC that the APM uses on the i2c port. A little very minor pin bending and hot glue to hold it in seemed to do the trick.
The HMC583L is the same sensor that's on the APM and on the 3DR external compass/GPS module.
You need to be a member of diydrones to add comments!
Comments
I can confirm that both this and this work great with the APM. Both were around USD$2 shipped.
You can also use jDrones custom APM2.6 HMC compass that comes with all wires etc and documentation. It is Plug-N-Play solution.
You can find it from here. And we are working to make covers for it.
@Scott
Sorry I see the difference now. That's the old style cable for the APM 2.0. which I put mine on. I didn't realize the 2.5 had a different style connector.
@Scott, The reason for moving the compass is not unique to any flight controller.
Magnetometers sense near DC magnetic fields.
The reason for moving it is to get it away from the large DC magnetic field generated by your DC power wiring, power distribution board and batteries.
Several things can be done to reduce this field such as twisting power and ground leads together and moving as much of the Power stuff (batteries and wiring) as far from the controller / magnetometer as possible.
And using a 4 in one ESC can really help because it drastically decreases the total DC power wiring.
But in the end the most effective solution has been found to be simply moving the magnetometer as far from the generated magnetic field as possible.
Normally when you are observing the magnetic offset directly on the logs caused by the DC power stuff, you can simply watch the offset linearly increase as power usage (current) goes up.
The more effective you are at getting it away from the problem, the less the total offset.
Usually 6 to 9 inches is sufficient to make the problem so small as to be unimportant.
@Josh -
That's the cable (from sparkfun) I used. It's not quite the right size though - the pins on that cable are spaced closer (1.0mm) than the pins on the APM (1.25mm). That said, I made it work by bending the pins slightly and using a drop of hot glue to secure the plug.
@Napoleon
As far as I know the motivations for moving the compass away from the APM are unique to 3.0 and copter. Someone else may have more insight though...
is it worth the try for an arduplane or only for the multicopters?
Yes, I am using the 5983 on my quad. It's a drop-in replacement and the board I have has in integrated 3V3 regulator, so 5V isn't an issue. I have excellent results, even flying close to power lines in loiter mode.
Stephan, have you already used the HMC5983 and its the same install? Thanks everyone for the great tips.
Also sparkfun sells this JST cable. https://www.sparkfun.com/products/10359