A seven-element model corrects for hard iron and soft iron interference. Freescale also offers a 10-element model, but you must contact the company for more information. The eCompass code typically requires about 15 kilobytes of Flash memory and 5 kilobytes of RAM.
You might wonder about the terms "soft iron" and "hard iron." The accuracy of an eCompass-based device depends greatly on the calculation of and subtraction in software of stray magnetic fields both within and nearby the magnetometer on a PCB. By convention, engineers separate these effects into fixed fields -- hard iron effects -- and fields induced by geomagnetism -- soft iron effects.
Soft iron effects arise from distortions in the magnetic field at the sensor caused by nearby nonmagnetic devices such as capacitors and shields. These components cause a distortion that varies with their orientation in the Earth's magnetic field. As a result, the accelerometers need to determine sensor orientation with respect to Earth's gravity.
Engineers can work easily with the sensors and software by purchasing a $99, three-board package (RD4247MAG3110) that includes a sensor module, an interface board, and a USB-based board. Freescale distributors should have the board in stock, and you can click here for the kit's user guide. Freescale plans to send me a board set soon, and I'll report on how it works.
Because semiconductor manufacturers make complicated devices and want designers to use them, they create development tools and provide source code that illustrates how to use these devices. I'd say almost all MCU and programmable-sensor companies offer hardware and software to help engineers and product designers get off to a good start. In most cases, open-source code provides a way to start with a core of working software. Of course, the code might run optimally only on the MCU-maker's chips.
Rotating the chip itself in relation to hard/soft iron can dramatically improve performance. We have a design which uses a compass in close proximity to a brushless motor. It isn't intended to provide a true heading, but does monitor rotation.
Thanks for this @Jon. With the increased availability of compact, integrated sensors and low-power computing, I expect the boom into "sensor fusion" is just starting. I'm delighted to read that Freescale did all of the difficult calibration analysis and created an on-board algorithm. The application note you linked even includes the source code for the calibration algorithm they developed. Kudos to Freescale for making their code open so it can be reviewed, modified, improved, and adapted by the sensor community. I hope they can be an example for other instrumentation manufacturers.
One recent contract design I did for a military contract placed an Ecompass on the main board of a portable GPS device.True, that multiple subsequent GPS fixes will provide a compass heading, the need was for a foot soldier who may be hunkered down in a foxhole, and needed direction.From the designer's perspective, many things can affect the Ecompass performance as Jon pointed out: shields, capacitors, and any Fe based components.
But two surprises were the screws and the Stainless steel shields. First, the screws were expected to wreak havoc with the Ecompass, but careful placement of the SMD to be equidistant between two screws proved sufficient .Test readings still came thru perfectly.
The second surprise was the SS shields, and we went to great lengths to requalify new, NiAg shields as engineered replacements.Halfway into the effort to requalify NiAg, one of the techs put a white-board magnet on the rev 1 stainless steel shield being phased out.It didn't stick.Foolishly, I took for granted without actually checking the metallurgical properties of the grade of SS shields, that they in fact did not possess any iron and did not affect the Ecompass performance any differently that the newer Nickel Silver shields.Didn't do my homework and it resulted in a lot of extra work for no reason.
Switched-capacitor filters have a few disadvantages. They exhibit greater sensitivity to noise than their op-amp-based filter siblings, and they have low-amplitude clock-signal artifacts -- clock feedthrough -- on their outputs.
For industrial control applications, or even a simple assembly line, that machine can go almost 24/7 without a break. But what happens when the task is a little more complex? That’s where the “smart” machine would come in. The smart machine is one that has some simple (or complex in some cases) processing capability to be able to adapt to changing conditions. Such machines are suited for a host of applications, including automotive, aerospace, defense, medical, computers and electronics, telecommunications, consumer goods, and so on. This discussion will examine what’s possible with smart machines, and what tradeoffs need to be made to implement such a solution.