Yaw drift and 4.7uF capacitor

Asked by Thomas Fulenwider

I have just soldered up a FreeIMU V0.3.5BMP. I tried the cube and yaw/pitch/roll Processing sketches only to find that the reported yaw seems to be drifting to some set value dependent on pitch and roll. When the board is flat, meaning pitch and roll are zero, the yaw drifts to about 35 degrees regardless of the direction the board is pointed. When the board is pointed up, meaning pitch is 90 and roll is zero, yaw always seem to drift to about 90 degrees.

This would seem to be an issue with the HMC5883 since it provides the absolute yaw reference. I ordered the board through Dorkbot PDX so I do not think that is an issue. My soldering in an electric skillet could have fried the HMC5883, but I have never had a problem soldering this way. I originally had only a 1uF capacitor on C303 (the C1 capacitor on the HMC5883 that is specified as 4.7uF). I have since put 5uF there.

Any suggestions? Do you agree this is a magnetometer issue? maybe I need to resolder the part.

Thanks,

-Thomas

Question information

Language:
English Edit question
Status:
Solved
For:
FreeIMU Edit question
Assignee:
No assignee Edit question
Solved by:
Thomas Fulenwider
Solved:
Last query:
Last reply:
Revision history for this message
Fabio Varesano (fabio-varesano) said :
#1

This surely looks like a problem with the magnetometer. This may be caused by these reasons:
1) some kind of electromagnetic interference near your place. Eg notebook speaker, lamp, etc..
2) eccessive heat during the soldering process may have caused offset in the readings which should be calibrated. The calibration routine in the hmc5883l code is pretty simple. You may wanna have a look at http://pastebin.com/tiGAL391 and http://pastebin.com/3TDR0YrH as replacements to HMC58X3.cpp and HMC58X3.h in the FreeIMU library. That code, implemented by an user of the FreeImU library, contains some improvements to the calibration routine which you may find useful for your problem.

Also, the 4.7uF caps has to be low ESR and people not using such caps have been reporting problems. The BOM on the project page list the exact cap part we are using successfully. I don't think that your specific problem may be correlated to this tough.

Revision history for this message
Fabio Varesano (fabio-varesano) said :
#2

Also, check using FreeIMU_raw sketch that the readings coming out from the various sensors all look good. Just load that sketch to arduino and use the serial monitor of the Arduino IDE.

Revision history for this message
Thomas Fulenwider (tfulenwider) said :
#3

Thanks for the quick response. Yes, today I checked the raw data and the magnetometer data showed up as all zeros. I will resolder the magnetometer this evening. If that still does not work, I will replace the sensor since it is probably fried.

I currently have 5 1uF capacitors stacked on C303 while I wait for my 4.7uF capacitors to come in. This should also serve to reduce the ESR until I get better caps.

I will let you know how it goes.

-Thomas

Revision history for this message
Fabio Varesano (fabio-varesano) said :
#4

The magnetometer is very sensitive to excessive heat.. one trick to have it soldered is to bring the solder to reaflow without the component in place and then add it with some tack flux. Doing this with hot air.. can't say if it will work with a skillet.

Revision history for this message
Thomas Fulenwider (tfulenwider) said :
#5

I resoldered the magnetometer and it still did not work.

I soldered a new magnetometer on and had a similar issue. This time, however I get an occasional -3 to +3 reading on the Y axis of the magnetometer. The x and z axes are always zero. While it is possible that I overheated this second one, it is unlikely because I was much more careful than I was on the first. In theory, the skillet reflow method should be easier on the chip than hot air since the heat is applied from below, rather than directly on top of the chip.

The datasheet for the HMC5883 specifies a maximum supply voltage of 3.3V, which is what I am running it at. Have you ever had problems with transient voltage spikes sending the supply voltage over 3.3V and frying the chip? I am using a IRU1205 regulator, which has the same pinout as the MIC5205. I may try more output capacitance on the regulator or moving down to a 2.7-3.0V regulator to prevent over-voltage on the magnetometer.

Revision history for this message
Thomas Fulenwider (tfulenwider) said :
#6

*correction: you use MIC5203, not MIC5205.

Revision history for this message
Fabio Varesano (fabio-varesano) said :
#7

I don't think that the regulator is your problem.. soldering that chip is really hard.

Revision history for this message
Thomas Fulenwider (tfulenwider) said :
#8

Is there a way to only do the sensor fusion for the gyro and accelerometer? The magnetometer was just giving me too much trouble.

Revision history for this message
Fabio Varesano (fabio-varesano) said :
#9

Yes, you can just modify the AHRSupdate function in the FreeIMU.cpp file in the FreeIMU library to no more use mx, my and mz. Basically you have to remove every term which uses them. It shouldn't be hard to do but let me know if you have problems.

Have you seen this video for soldering chips? http://www.youtube.com/watch?v=c_Qt5CtUlqY the key to success is to use tacky flux as http://search.digikey.com/it/it/products/SMD291NL/SMD291NL-ND/1160000

Revision history for this message
Thomas Fulenwider (tfulenwider) said :
#10

I finally got a working HMC5883 soldered onto a board! It only took killing 3 or 4 of them first :). I believe the issue was overheating during the soldering process. The first method I used was the hotplate, which did not have accurate temperature control. The second was a toaster reflow oven with quite accurate temperature control.

The problem with toaster reflow ovens is that they heat primarily by infrared. The infrared is absorbed differently depending on the material of the object and in the case of the HMC5883, it absorbed it far too well. When the air inside the oven was at a good soldering temperature, as read by the thermocouple, the HMC5883 must have been at a much higher temperature.

The solution...a piece of Kapton tape over the HMC5883 and an aluminum foil IR deflector "tent" over the whole board. The tent was open on both ends to allow airflow from the convection fan. Now the parts should not get hotter than the air temperature in the oven.

Problem Solved!

Revision history for this message
Fabio Varesano (fabio-varesano) said :
#11

Good news! Congratulations. For reflow soldering, infrared heating are not good for the reasons you experienced. A standard 30$ oven with standard resistance heating (better if bottom and top) is suggested.