YAW not flat on MultiWiiConf (using HMC5883L)

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
jipp
Posts: 7
Joined: Wed Oct 21, 2015 11:05 am

YAW not flat on MultiWiiConf (using HMC5883L)

Post by jipp »

Hi

I'm a little confused by behavior of the YAW curve inside the MultiwiiConf.

I use a NanoWii and attached HMC5883L (From HobbyKing) to the I2C bus. I did the calibration of the MAG sensor. Checking the North direction and the orientation it seems to work. (Not yet checked during a flight)

But looking at the MultiWiiConf I see:
-Roll and Pitch behave good
-Yaw is very very strong fluctuating!

Nevertheless the Quad picture seems to reflect the orientation of the Quadcopter.

Is this normal behavior that the line is not calm even when the Quad is put on the floor and not moving?
Checking some videos and posts I did not recognize this anywhere.


thanks a lot for any comment.

Cheers
Attachments
Bildschirmfoto 2015-10-23 um 21.00.17.png

Cereal_Killer
Posts: 221
Joined: Fri Mar 06, 2015 5:44 am

Re: YAW not flat on MultiWiiConf (using HMC5883L)

Post by Cereal_Killer »

Ok so as you've probably been able to figure out when there's a MAG attached the heading in the GUI is dependent on it (otherwise it's dependent on the gyro and the cardinal direction displayed means nothing). Just cause it's acting strange most likely the copter will still fly (tho I wouldn't try to use any MAG based modes till this is solved).

First thing to do is to 100% confirm your sensor orientation is correct (note it WILL allow you to calibrate even if it's not got the proper orientation, it just won't work / read right).
Please see here for what the sensor graphs should be doing and verify yours moves as it should be (test all 3 axis').

jipp
Posts: 7
Joined: Wed Oct 21, 2015 11:05 am

Re: YAW not flat on MultiWiiConf (using HMC5883L)

Post by jipp »

from what is listed there:

X MAG:
ROLL RIGHT = positive
ROLL LEFT = negative

Y MAG
PITCH FORWARD = positive
PITCH backward = negative

Z MAG
should be positive -> this is not the case its jumping very high up and down (mostly negative)
not move a lot if the multi remains flat. -> as well jumping around (see picture above, this was captured when sensor was flat on the floor)


could it be that the sensor is broken?
I connected it for testing on a plain Arduino UNO and saw as well strong fluctuating values there for the z-axis, so I can exclude the GUI and MultiWii SW.

Kbev5709
Posts: 451
Joined: Mon Aug 17, 2015 5:56 pm

Re: YAW not flat on MultiWiiConf (using HMC5883L)

Post by Kbev5709 »

jipp wrote:could it be that the sensor is broken?
I connected it for testing on a plain Arduino UNO and saw as well strong fluctuating values there for the z-axis, so I can exclude the GUI and MultiWii SW.


Looks like to me that it could be a junk sensor. You can skip HK and their ridiculous shipping charges by just buying one from ebay http://www.ebay.com/itm/GY-273-HMC5883L ... Sw-nZTo6gx They're inexpensive and Chinese but they're only 99 cents with free shipping. Just buy a few for good measure. One might work in the bunch. When you pay $8.99 for the one from HK you are getting a Honeywell, but judging by your luck with it, it was probably outsourced by Honeywell to a Chinese maker. So the name on it really doesn't matter in the end. Also,from my experience with HK the shipping is at a minimum six dollars and some change. If you want to pursue the matter with HK they will most likely refund your money if you file a claim and send them a vid of the part not functioning correctly. They credited full purchase price of $21.00 to my account after I ended up getting a set of retracts that wouldn't work. I didn't even have to return the junk ones. All I had to do was send the service department a video showing the failed product. Below is the graph of my mag on my win gui with the yaw being the top trace. Also, my quad is sitting on the kitchen table right next to my computer, and no more than two feet from a running refrigerator. Image
and below a zoom in on that graph that while running showed a slight variation between +163 and +165 in a cyclical fashion.
Image
so I would say that based on the fact that it is going crazy while sitting still your sensor is messed up. That graph trace you posted looks like my EKG from the hospital when my blood pressure is real high :o :shock: :mrgreen: :lol:

jipp
Posts: 7
Joined: Wed Oct 21, 2015 11:05 am

Re: YAW not flat on MultiWiiConf (using HMC5883L)

Post by jipp »

I replaced the sensor by a new one I bought and the line went flat - like it should.
But it was negative.
To solve this I changed the following line in the config.h (uncommented and made the Z negative):

#define FORCE_MAG_ORIENTATION(X, Y, Z) {imu.magADC[ROLL] = X; imu.magADC[PITCH] = Y; imu.magADC[YAW] = -Z;}

So thanks to all, problem solved.
Attachments
Bildschirmfoto 2015-10-28 um 22.52.32.png

Kbev5709
Posts: 451
Joined: Mon Aug 17, 2015 5:56 pm

Re: YAW not flat on MultiWiiConf (using HMC5883L)

Post by Kbev5709 »

Sweet! Now go fly!!! :D :D :D

Post Reply