My compass decreases its reading as much as 90 degress with take-off motor power (high current).  It does this both on an APM 2.5 and an APM1 board.  I've moved the APM board to the secnd deck in the stack and the deviation is only 10 degress, but stll present.  I've been testing with nothing connected to the APM but a RX to try to isolate the problem. 

I have a stock 3DR-A frame with 880kv motos and a Attoilot 90A current sensor.  Stock 3DR power distribution board.

Obviously this is an issue with just my set up.   Could it be a bad power distribution board?  Current draw seems to be as expected (~28A in hover).  Can the placement of the Auttopilot current sensor cause a mag field that can affect the APM's magnetometer? 

Has anybody seen this issue before?

Views: 830

Reply to This

Replies to This Discussion

I'm pretty sure that 99% of APM users have compass problems and probably don't know it.  I'd guess it's the top undiagnosed problem for people and most think it's PID tuning problems.  I'm very convinced that several of my worst out-of-control crashes were because of magnetometer interference issues (power cables, ESCs, GoPro).  IMHO 3DR shouldn't sell an FC with the mag on-board, it should always be installed in an isolated location.  Ditto for GPS antenna.

Just wanted to tie off this thread for the benefit of others.

After mounting an external compass to the top plate of my quad and performing a few other magnetic interference reducing steps, my quad now fly’s perfectly.  No more compass interference with increasing motor power.  Yea!  Now, my quad stability and loiter performance is a beautiful thing to watch.  The Arducopter developers rock big time!   Thank you!

I’ve included a picture of the top plate of my quad with the external compass and GPS mounted.

Configuring the external compass is easy, but there are a few little tricks.  I am using an APM 2.5, which has an external I2C connector.  For the APM 2.0 and APM 1.4 boards, you will have a few extra steps, not described here.    The steps for an APM 2.5 board are:

1)   Purchase a HMC5883L magnetometer breakout board – I bought mine from 3DR, but I assume the one from Sparkfun will work.   Make sure the 3DR board is set to use 3.3volts (the APM 2.5’s I2C port uses 3.3 volts, not 5 volts).  You will have to modify the 3DR board because it is shipped from 3DR with the 5 volt jumper set.

2)    Looking at the included picture entitled “APM 2.5 compass modification”, cut the jumper trace in the middle of the APM 2.5 board.  This disables the SDA line to the board’s internal magnetometer, rendering it inert.

3)    The APM 2.5 I2C connector needs a 4 pin DF13 connector.  I bought a 19cm DF13 4 connector from 3DR and cut off one end.  I then stripped and tinned the four wires. 

4)  Connect the DF13’s 4 wires to the compass breakout board.  You could use a connector if you like, but I soldered the wires directly to the board for one less connection to fail.  Note that the wires will not be one to one.  Pin 1 on the DF13 connector will not go to pin 1 of the compass board.  The cable I received from 3DR had one red wire and three black wires.  Substitute your wire colors accordingly.  Solder the wires as follows:

Red wire on end of connector (+3.3v) goes to the VCC (or +3.3v) pad on the compass board (see labels on board for location).  This is the wire closest to the interior on the APM 2.5 board.

Wire next to red wire (SCL) goes to the SCL pad on the compass board.

Wire next to wire next to red wire (SDA) goes to the SDA pad on compass board.

Black wire on end of connector (ground) goes to ground pad on compass board.  This is the wire closest to the edge of the APM 2.5 board.

5)  Mount the compass board on the top plate of your quad. I used double sided foam to mount the board.  The orientation of the board matters.  I mounted the board “components up with pins forward”.  Note which direction you mount the board – you will need to modify the software with this orientation. 

6)  Modify, compile and load the software for your compass board orientation.  You must be able to load software from the Arduino IDE to complete this step.  In “APM_Config.h”, you will find a commented out statement like:

//#define MAG_ORIENTATION     AP_COMPASS_COMPOENTS_DOWN_PINS_FORWARD

For my situation, I added the following statement just below the commented out statement above as follows:

#define MAG_ORIENTATION     AP_COMPASS_COMPOENTS_UP_PINS_FORWARD

You can find a list of all possible orientations for the MAG_ORIENTATION flag in the “AP_Compass_HMC5843.h” library, including orientations for both the 3DR and Sparkfun boards.

7)  If this is the first time loading software from the IDE, make sure the following statement is uncommented:

#define CONFIG_APM_HARDWARE    APM_HARDWARE_APM2

8)  Save, Compile and Upload the modified software

9)  Test the compass board and have fun flying with a now stable compass!

Assuming I didn’t forget a step, this should be all there is to it.  Good luck.

Attachments:

 I had the battery wires in my Bixler going over the APM which probably caused most of the wondering flight paths (and almost crashes), which caused most of my grumbling about 3DR and their APM. I simply fastened the wires up to the top of the fuselage and bingo, the throttle induced swings of the HUD stopped!

THAT is why we read the forums!

Thank you Lloyd DeForrest.

P.S. I just checked the current instructions for the APM 2.5+ and no mention of how important this little detail is when installing the APM.

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service