Compass off by 45° in X frame setup, Input_voltage setting in CLI

Hi everybody, as this is my first post. I would like to say thanks to all the people who are working so hard on this project.

While testing the current firmware in an X  frame setup I have noticed an offset of the compass by exactly 45°. I also think that this is the reason why the loitering mode does not work properly and results in circular movements. I think this might be the same issue others might have with the loiter mode.

Is there a parameter I need to change or is this a bug? APM is mounted as described here http://code.google.com/p/arducopter/wiki/AC2_Frame_Assembly

and the MAG is mounted to the shield as described here:

http://code.google.com/p/arducopter/wiki/AC2_Magnetos

Any help on this is highly appreciated.

Another issue that came up is, while using the new APM Board (v1.4) the 5V power supply is connected via a diode (D1) this used to be only the case (v1.2) when using external power. This however results in a voltage of about (4.7v) at the ATMega. While everything still works fine, the analog ref. voltage will be a bit low resulting in wrong AD-conversion. I know there is the “#define INPUT_VOLTAGE 5.0” in the config file.  However, this might be a good parameter to include in the CLI setup menu. Because everything else is working great and can be configured in the CLI.

Keep up the good work,
Niklas

Tags: APM, Compass, Input_voltage, offset, v1.4

Views: 55

Reply to This

Replies to This Discussion

Please update to the latest code (you can use the Mission Planner to automatically check for new code and load it). There is a new magnetometer that is now being shipped by the DIY Drones store that has the axis differently than the old one. The code has now been updated (thanks to Randy Mackay!) to autodetct which mag you have and adjust the measurement accordingly.
I have been using 2.0.30 which the MP gave me this morning. Just tried again but still the same version and no change. Still a 45° offset. Declination seems to be correct. The values the compass produces also seem ok, they change like they should, just about 45° off.
Just to be clear, you mean that North is shown as 45 degrees off what you think North should be? That can be due to local magnetic effects from other components on the board. The absolute direction is not that important. What's important is that the relative direction changes appropriately as you move the board around.

yes, that's what I mean. The compass itself seems to be working great. If I turn by 90° it changes by 90°. I can life with the offset if this does not cause an other problems. I just thought that this might explain the problems I had with the loiter mode. Simple mode works perfectly fine by the way.

 

Chris,

Does the compass code read the frames x or + config? If not that could account for this issue?

Best

D
The APM board is always facing forward, regardless of frame configuration, so that should not be an issue.

Mmm, if the compass works ok, what could be the reason for the problem in loiter mode be? Every time I put on loiter the quadrocopter starts to fly circles around the GPS point. The problem is that it always overshoots a little bit resulting in crazy oscillations after a few swings. Changing the PID values did not improve anything (I increased the P value from 2.5 to 4.5 and decreased the D value from 0.03 to 0.01).

Any idea what I could try next?

How about you try reducing the P value so that it doesn't have enough oomph to start the oscillations
Same problem (45 deg error) in Hexa_plus configuration. Version 2.029.
I have hexa-plus frame, firmware 2.033. Problem still exist. True north pole must be 45 deg CCW. (maybe I must try to test it in another place?)

Now I think, that it is just anomaly in my room...

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