Magnetometer, How to use it

Post Reply
rocketray
Posts: 44
Joined: Tue Feb 01, 2011 3:14 am

Magnetometer, How to use it

Post by rocketray »

Ok im wondering why i have IMU's and why i didn't just stick to Wii motion plus and BMA020. I have a Barometer which seems to do very little, infact i get a better height hold by turning it off and balancing it by eye, but of course that only really works at lowish levels. And the magnetometer is a bit of a mystery to me. I understand why its needed when you have GPS,as it gives a baseline for the GPS to measure from. But as far as i can see the only practical use for it without the GPS is a sort of heading hold, if so i cant seem to see much improvement over setting up the Yaw properly. Should I have it set so its on all the time or only on while the Barometer is on? or maybe switch pos 1 off, pos 2 mag on, pos 3 mag and barometer, its all so confusing.

I know the Barometer will improve as the codeing matures, so i can look forward to a proper height hold in the future but everone says the Mag works great, so could someone instruct me in its use. How do i set it up so i get proper heading hold and not this sort of, i'll hold this time but next time i'm going to twist 45 degrees or some other random amount. Before you ask, Yes i have calebated it in the Gui. I know what Heading Hold feels like because i have got Spartan Quarks in my Heli's and i want that same locked in feeling with my Quads and Tri's. Please someone how about a quick Magnetometer 101, i cant be the only one who could benefit from this :)

Happy Solstice for yesterday :D :D :D

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Magnetometer, How to use it

Post by Alexinparis »

Hi,

You can activate the magnetometer independently with other sensors.
However, you need an ACC installed to have reliable MAG values.

It's important to calibrate it before using it, but it's also important to move the copter in all direction during the calibration.
Was it the case ?

rocketray
Posts: 44
Joined: Tue Feb 01, 2011 3:14 am

Re: Magnetometer, How to use it

Post by rocketray »

Alexinparis wrote:Hi,

You can activate the magnetometer independently with other sensors.
However, you need an ACC installed to have reliable MAG values.

It's important to calibrate it before using it, but it's also important to move the copter in all direction during the calibration.
Was it the case ?


Hi Alex,

Yes i do fly with the ACC on most of the time except when trying to flip or loop.
When calibrateing the Mag i turn it 360 degrees in the pitch plane and the roll plane, i even rotate it 360 in the yaw plane as well even though i know its not needed. I also have played with the MAG setting in the Gui but i dont seem to feel much difference. I will have to talk a brave friend into twisting the copter when its in hover and see if the Mag cuts in then and returns it to its original heading as in Jussi's vid.
I think i am maybe expecting too much of it and am correcting it myself before the Mag has time to do the correction. But in that case what is the benefit?
I am going to set my mini tri to Mag on permanantly for a week or so, if i cant see it working after it being on all the time i will just forget it untill we have GPS up and running.

Thanks :D

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Magnetometer, How to use it

Post by Alexinparis »

Hi,
tTe mag acts as a perfect heading hold system. nothing more for the moment.
So you are still free to use the yaw stick. But once released, the orientation should stay even after 10 minutes ;)

rocketray
Posts: 44
Joined: Tue Feb 01, 2011 3:14 am

Re: Magnetometer, How to use it

Post by rocketray »

Hi Alex, :)

I thought that was how it was supposed to work, i will just have to play with the Mag setting until it does then. Am i right in thinking that once its set right it might as well be on all the time.

Thought i ought to mention that i have been experimenting with dev20110622 and have been having all sorts of problems. First i was getting oscilations at a low P(pitch and roll) and also the rc rate isnt reading right on the LCD. i ended up with 2.00 when the LCD was reading .75. I have gone back to the previous version and all seems OK again. It came as a bit of a reality check as i have been using them as updates when i know that they are development and therefore not the finished article.

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Magnetometer, How to use it

Post by Hamburger »

Alexinparis wrote:Hi,
tTe mag acts as a perfect heading hold system. nothing more for the moment

what are suitable yaw PID values to go with using the MAG? Are the yaw PID values relevant at all?

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Magnetometer, How to use it

Post by Alexinparis »

Hi, yaw PID should be the same with or without the mag activated.

skygizmo
Posts: 6
Joined: Sat Jul 16, 2011 12:20 am

Re: Magnetometer, How to use it

Post by skygizmo »

Hi
have a question about the MAG sensor.
if I activate the MAG sensor on the front boom pointing north. if the wind turns towards north-west quad, then of course the quad to turn towards the north again.
What would happen if I activate the MAG sensor on the front boom pointing towards the north-west? and the wind driving it toward the south, it will then turn towards the north-west again?
it means that the front beam is locked to the compass directions in which MAG sensor is activated?

thanks in advanc

Post Reply