Magnetometer Sensor Module HMC5883L Breakout problems

Post Reply
Wiz
Posts: 2
Joined: Sun Sep 30, 2012 2:44 pm

Magnetometer Sensor Module HMC5883L Breakout problems

Post by Wiz » Sun Sep 30, 2012 2:48 pm

Hi,

A while ago I purchased the HMC5883L sensor breakout board. I tried it with Arduino and the Multiwii multirotor flight controller software. The magnetometer shows OK values on axis X and Y, but axis Z gives random values, making it unusable. It seems that the chip has a defective axis. What to do..? :?:

User avatar
techsupport
Site Admin
Posts: 210
Joined: Sat Mar 03, 2012 2:32 pm

Re: Magnetometer Sensor Module HMC5883L Breakout problems

Post by techsupport » Sat Oct 06, 2012 2:40 pm

Hi friend

Do you mean the z-axis readings of magnetometer is random when it's lying on the flat ? Could you provide us the readings of the sensor. Please use the example code

in the wiki page. http://www.geeetech.com/wiki/index.php/ ... r_Breakout

Regards;
techsupport
Your real trustworthy partner in China!!
Email: forum@geeetech.com

Wiz
Posts: 2
Joined: Sun Sep 30, 2012 2:44 pm

Re: Magnetometer Sensor Module HMC5883L Breakout problems

Post by Wiz » Mon Oct 08, 2012 5:29 am

Hi, thanks for your help! ;)

Here is a print-out of sensor values. The first values are taken when I rotated the magnetometer a little, the last ones are captured when the sensor was lying on my desk. There is something wrong with the Z values.

Raw: -103 -29 2 Scaled: -94.76 -26.68 1.84 Heading: 3.46 Radians 198.34 Degrees
Raw: -115 -27 2 Scaled: -105.80 -24.84 1.84 Heading: 3.42 Radians 195.83 Degrees
Raw: -119 -28 3 Scaled: -111.32 -25.76 1.84 Heading: 3.41 Radians 195.65 Degrees
Raw: -126 -25 2 Scaled: -115.92 -23.00 1.84 Heading: 3.38 Radians 193.84 Degrees
Raw: -124 -23 2 Scaled: -114.08 -21.16 1.84 Heading: 3.37 Radians 193.13 Degrees
Raw: -125 -26 4 Scaled: -115.00 -23.92 3.68 Heading: 3.39 Radians 194.37 Degrees
Raw: -128 -24 3 Scaled: -117.76 -22.08 2.76 Heading: 3.37 Radians 193.24 Degrees
Raw: -129 -21 1 Scaled: -21432.32 -14602.24 296.24 Heading: 3.79 Radians 216.89 Degrees
Raw: -130 -22 2 Scaled: -119.60 -20.24 1.84 Heading: 3.35 Radians 192.22 Degrees
Raw: -130 -23 2 Scaled: -119.60 -21.16 1.84 Heading: 3.36 Radians 192.65 Degrees
Raw: -131 -20 2 Scaled: -120.52 -18.40 1.84 Heading: 3.34 Radians 191.30 Degrees
Raw: -137 -24 2 Scaled: -126.04 -22.08 1.84 Heading: 3.36 Radians 192.55 Degrees
Raw: -138 -24 3 Scaled: -126.96 -23.00 2.76 Heading: 3.37 Radians 192.89 Degrees
Raw: -141 -25 2 Scaled: -129.72 -23.00 1.84 Heading: 3.36 Radians 192.67 Degrees
Raw: -144 -28 2 Scaled: -132.48 -25.76 1.84 Heading: 3.38 Radians 193.62 Degrees
Raw: -143 -28 3 Scaled: -131.56 -25.76 2.76 Heading: 3.38 Radians 193.70 Degrees
Raw: -146 -30 2 Scaled: -134.32 -27.60 1.84 Heading: 3.39 Radians 194.23 Degrees
Raw: -147 -30 3 Scaled: -135.24 -27.60 2.76 Heading: 3.39 Radians 194.15 Degrees
Raw: -144 -31 0 Scaled: -132.48 -28.52 0.00 Heading: 3.40 Radians 194.77 Degrees
Raw: -143 -32 2 Scaled: -131.56 -29.44 1.84 Heading: 3.41 Radians 195.23 Degrees
Raw: -106 -96 2 Scaled: -97.52 -88.32 1.84 Heading: 3.92 Radians 224.78 Degrees
Raw: -94 -132 1 Scaled: -86.48 -121.44 0.92 Heading: 4.14 Radians 237.16 Degrees
Raw: -92 -140 3 Scaled: -84.64 -128.80 2.76 Heading: 4.18 Radians 239.31 Degrees
Raw: -85 -149 2 Scaled: -78.20 -137.08 1.84 Heading: 4.24 Radians 242.91 Degrees
Raw: -88 -142 3 Scaled: -80.96 -130.64 2.76 Heading: 4.20 Radians 240.83 Degrees
Raw: -86 -139 3 Scaled: -79.12 -127.88 2.76 Heading: 4.20 Radians 240.87 Degrees
Raw: -91 -137 3 Scaled: -83.72 -126.04 2.76 Heading: 4.17 Radians 239.02 Degrees
Raw: -93 -136 2 Scaled: -85.56 -125.12 1.84 Heading: 4.16 Radians 238.25 Degrees
Raw: -91 -137 2 Scaled: -83.72 -126.04 1.84 Heading: 4.17 Radians 239.02 Degrees
Raw: -92 -136 3 Scaled: -84.64 -125.12 2.76 Heading: 4.16 Radians 238.54 Degrees
Raw: -93 -136 3 Scaled: -85.56 -125.12 2.76 Heading: 4.16 Radians 238.25 Degrees
Raw: -93 -135 1 Scaled: -85.56 -124.20 0.92 Heading: 4.15 Radians 238.06 Degrees
Raw: -90 -135 3 Scaled: -82.80 -124.20 2.76 Heading: 4.17 Radians 238.93 Degrees
Raw: 41 -115 1 Scaled: 37.72 -105.80 0.92 Heading: 5.10 Radians 292.24 Degrees
Raw: 248 -78 2 Scaled: 228.16 -71.76 1.84 Heading: 6.02 Radians 345.16 Degrees
Raw: 342 -50 1 Scaled: 314.64 -46.00 0.92 Heading: 6.18 Radians 354.30 Degrees
Raw: 315 0 3 Scaled: 289.80 0.00 2.76 Heading: 0.05 Radians 2.62 Degrees
Raw: 228 73 4 Scaled: 209.76 67.16 3.68 Heading: 0.36 Radians 20.37 Degrees
Raw: 78 214 2 Scaled: 71.76 196.88 1.84 Heading: 1.27 Radians 72.59 Degrees
Raw: -107 278 4 Scaled: -98.44 255.76 3.68 Heading: 1.98 Radians 113.67 Degrees
Raw: -176 275 2 Scaled: -161.92 253.00 1.84 Heading: 2.19 Radians 125.24 Degrees
Raw: -307 199 3 Scaled: -282.44 183.08 2.76 Heading: 2.61 Radians 149.67 Degrees
Raw: -375 49 3 Scaled: -345.00 45.08 2.76 Heading: 3.06 Radians 175.17 Degrees
Raw: -358 -25 1 Scaled: -329.36 -23.00 0.92 Heading: 3.26 Radians 186.61 Degrees
Raw: -307 -206 3 Scaled: -282.44 -189.52 2.76 Heading: 3.78 Radians 216.48 Degrees
Raw: -267 -322 2 Scaled: -245.64 -296.24 1.84 Heading: 4.07 Radians 232.95 Degrees
Raw: -234 -390 2 Scaled: -215.28 -358.80 1.84 Heading: 4.22 Radians 241.65 Degrees
Raw: -119 -485 3 Scaled: -109.48 -446.20 2.76 Heading: 4.52 Radians 258.83 Degrees
Raw: 39 -521 2 Scaled: 35.88 -479.32 1.84 Heading: 4.83 Radians 276.90 Degrees
Raw: 326 -469 2 Scaled: 299.92 -431.48 1.84 Heading: 5.37 Radians 307.42 Degrees
Raw: 439 -434 3 Scaled: 403.88 -399.28 2.76 Heading: 5.55 Radians 317.95 Degrees
Raw: 567 -331 2 Scaled: 521.64 -304.52 1.84 Heading: 5.80 Radians 332.34 Degrees
Raw: 591 -141 2 Scaled: 543.72 -129.72 1.84 Heading: 6.09 Radians 349.20 Degrees
Raw: 574 -59 2 Scaled: 528.08 -54.28 1.84 Heading: 6.23 Radians 356.75 Degrees
Raw: 525 50 3 Scaled: 483.00 46.00 2.76 Heading: 0.14 Radians 8.06 Degrees
Raw: 500 107 2 Scaled: 460.00 98.44 1.84 Heading: 0.26 Radians 14.70 Degrees
Raw: 486 118 2 Scaled: 447.12 108.56 1.84 Heading: 0.28 Radians 16.27 Degrees
Raw: 439 136 3 Scaled: 403.88 125.12 2.76 Heading: 0.35 Radians 19.83 Degrees
Raw: 331 124 2 Scaled: 304.52 114.08 1.84 Heading: 0.40 Radians 23.16 Degrees
Raw: 92 104 1 Scaled: 84.64 95.68 0.92 Heading: 0.89 Radians 51.12 Degrees
Raw: -186 13 3 Scaled: -171.12 11.96 2.76 Heading: 3.12 Radians 178.62 Degrees
Raw: -284 -32 2 Scaled: -261.28 -29.44 1.84 Heading: 3.30 Radians 189.05 Degrees
Raw: -381 -90 3 Scaled: -350.52 -82.80 2.76 Heading: 3.42 Radians 195.91 Degrees
Raw: -290 -126 3 Scaled: -266.80 -115.92 2.76 Heading: 3.60 Radians 206.10 Degrees
Raw: -239 -160 4 Scaled: -219.88 -147.20 3.68 Heading: 3.78 Radians 216.42 Degrees
Raw: -210 -302 2 Scaled: -193.20 -277.84 1.84 Heading: 4.15 Radians 237.81 Degrees
Raw: -168 -422 4 Scaled: -154.56 -388.24 3.68 Heading: 4.38 Radians 250.91 Degrees
Raw: -42 -487 3 Scaled: -38.64 -448.04 2.76 Heading: 4.67 Radians 267.69 Degrees
Raw: 13 -489 2 Scaled: 11.96 -449.88 1.84 Heading: 4.78 Radians 274.14 Degrees
Raw: 310 -420 2 Scaled: 285.20 -386.40 1.84 Heading: 5.39 Radians 309.05 Degrees
Raw: 425 -196 2 Scaled: 391.00 -180.32 1.84 Heading: 5.90 Radians 337.86 Degrees
Raw: 420 -112 2 Scaled: 386.40 -103.04 1.84 Heading: 6.07 Radians 347.69 Degrees
Raw: 249 -55 3 Scaled: 229.08 -50.60 2.76 Heading: 6.11 Radians 350.16 Degrees
Raw: -5 -30 2 Scaled: -4.60 -27.60 1.84 Heading: 4.59 Radians 263.16 Degrees
Raw: 46 -23 2 Scaled: 42.32 -21.16 1.84 Heading: 5.87 Radians 336.05 Degrees
Raw: 5 -79 2 Scaled: 4.60 -72.68 1.84 Heading: 4.82 Radians 276.24 Degrees
Raw: -44 -71 2 Scaled: -40.48 -71.76 0.92 Heading: 4.24 Radians 243.19 Degrees
Raw: -54 -85 2 Scaled: -49.68 -78.20 1.84 Heading: 4.19 Radians 240.19 Degrees
Raw: -69 -108 2 Scaled: -63.48 -99.36 1.84 Heading: 4.19 Radians 240.04 Degrees
Raw: -72 -117 2 Scaled: -66.24 -107.64 1.84 Heading: 4.21 Radians 241.01 Degrees
Raw: -75 -125 2 Scaled: -69.00 -115.00 1.84 Heading: 4.22 Radians 241.65 Degrees
Raw: -80 -124 3 Scaled: -73.60 -114.08 2.76 Heading: 4.19 Radians 239.79 Degrees
Raw: -79 -126 2 Scaled: -72.68 -115.92 1.84 Heading: 4.20 Radians 240.53 Degrees
Raw: -79 -125 1 Scaled: -72.68 -115.00 0.92 Heading: 4.19 Radians 240.33 Degrees
Raw: -89 -128 2 Scaled: -81.88 -117.76 1.84 Heading: 4.15 Radians 237.81 Degrees
Raw: -95 -136 2 Scaled: -87.40 -125.12 1.84 Heading: 4.15 Radians 237.68 Degrees
Raw: -94 -138 2 Scaled: -86.48 -126.96 1.84 Heading: 4.16 Radians 238.36 Degrees
Raw: -95 -137 2 Scaled: -87.40 -126.04 1.84 Heading: 4.15 Radians 237.88 Degrees
Raw: -96 -138 3 Scaled: -88.32 -126.96 2.76 Heading: 4.15 Radians 237.79 Degrees
Raw: -94 -138 3 Scaled: -86.48 -126.96 2.76 Heading: 4.16 Radians 238.36 Degrees
Raw: -94 -136 1 Scaled: -86.48 -125.12 0.92 Heading: 4.15 Radians 237.97 Degrees
Raw: -94 -135 3 Scaled: -86.48 -124.20 2.76 Heading: 4.15 Radians 237.77 Degrees
Raw: -95 -137 2 Scaled: -87.40 -126.04 1.84 Heading: 4.15 Radians 237.88 Degrees
Raw: -95 -137 3 Scaled: -87.40 -126.04 2.76 Heading: 4.15 Radians 237.88 Degrees
Raw: -97 -137 1 Scaled: -89.24 -126.04 0.92 Heading: 4.14 Radians 237.32 Degrees
Raw: -95 -137 2 Scaled: -87.40 -126.04 1.84 Heading: 4.15 Radians 237.88 Degrees
Raw: -95 -136 3 Scaled: -87.40 -125.12 2.76 Heading: 4.15 Radians 237.68 Degrees
Raw: -96 -137 1 Scaled: -88.32 -126.04 0.92 Heading: 4.15 Radians 237.60 Degrees
Raw: -96 -139 2 Scaled: -88.32 -127.88 1.84 Heading: 4.15 Radians 237.99 Degrees
Raw: -94 -136 1 Scaled: -86.48 -125.12 0.92 Heading: 4.15 Radians 237.97 Degrees
Raw: -97 -136 2 Scaled: -89.24 -125.12 1.84 Heading: 4.14 Radians 237.12 Degrees
Raw: -95 -138 1 Scaled: -87.40 -126.96 0.92 Heading: 4.16 Radians 238.07 Degrees
Raw: -95 -136 3 Scaled: -87.40 -125.12 2.76 Heading: 4.15 Radians 237.68 Degrees
Raw: -96 -137 3 Scaled: -88.32 -126.04 2.76 Heading: 4.15 Radians 237.60 Degrees
Raw: -95 -139 2 Scaled: -87.40 -127.88 1.84 Heading: 4.16 Radians 238.27 Degrees
Raw: -94 -137 3 Scaled: -86.48 -126.04 2.76 Heading: 4.16 Radians 238.16 Degrees
Raw: -94 -135 2 Scaled: -86.48 -124.20 1.84 Heading: 4.15 Radians 237.77 Degrees

User avatar
techsupport
Site Admin
Posts: 210
Joined: Sat Mar 03, 2012 2:32 pm

Re: Magnetometer Sensor Module HMC5883L Breakout problems

Post by techsupport » Mon Oct 08, 2012 9:09 am

It seems that the z-axis readings is abnormal when rotate it. Please leave me your ebay user ID via Email, we will offer you a replacement.
Your real trustworthy partner in China!!
Email: forum@geeetech.com

Post Reply