x3 Precision Sensor Components
x2-Axis Magnetoresistive Sensor for X-Y Axis
Earth’s Field Detection
x1-Axis Magnetoresistive Sensor for Z-Axis Earth’s
Field Detection
x2-Axis Accelerometer for 60° Tilt Compensation
x2.7 to 5.5 volt Supply Range
x3-Axis Compass Reference Design Included
Product Description
The Honeywell HMC1055 3-Axis Compass Sensor Set
combines the popular HMC1051Z one-axis and the
HMC1052 two-axis magneto-resistive sensors plus a 2axis MEMSIC MXS3334UL accelerometer in a single
kit. By combining these three sensor packages, OEM
compass system designers will have the building
blocks needed to create their own tilt compensated
compass designs using these proven components.
The HMC1055 chip set includes the three sensor
integrated circuits and an application note describing
sensor function, a reference design, and design tips for
integrating the compass feature into other product
platforms.
DIAGRAMS
Pinouts (top view)
HONEYWELL
HMC1051Z
HMC
1052
678910
B
A
12345678
12345
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 1
HMC1055
Advance InformationSENSOR PRODUCTS
SPECIFICATIONS – MAGNETIC SENSORS HMC1051Z, HMC1052
CharacteristicsConditions*MinTypMaxUnits
Bridge Elements
Supply Vbridge referenced to GND 1.82.520Volts
ResistanceBridge current = 1mA 80010001500ohms
Field Range Full scale (FS) – total applied field -6+6gauss
Sensitivity Set/Reset Current = 0.5A 0.81.01.2mV/V/gauss
Bridge Offset Offset = (OUT+) – (OUT-)
Field = 0 gauss after Set pulse
Bandwidth Magnetic signal (lower limit = DC) 5MHz
Noise Density@ 1kHz, Vbridge=5V50nV/sqrt Hz
Resolution50Hz Bandwidth, Vbridge=5V120
Disturbing Field Sensitivity starts to degrade.
Use S/R pulse to restore sensitivity.
Max. Exposed
No perming effect on zero reading10000gauss
Field
Operating
Ambient-40125°C
Temperature
Storage
Ambient, unbiased-55150°C
Temperature
Sensitivity
Tempco
Bridge Offset
Tempco
Bridge Ohmic
TA=-40 to 125°C, Vbridge=5V
T
=-40 to 125°C, Ibridge=5mA
A
TA=-40 to 125°C, No Set/Reset
T
=-40 to 125°C, With Set/Reset
A
Vbridge=5V, TA=-40 to 125°C210025002900ppm/°C
Tempco
Sensitivity Ratio of
TA=-40 to 125°C95101105%
X,Y Sensors
(HMC1052 Only)
X,Y sensor
Sensitive direction in X and Y sensors 0.01degree
Orthogonality
(HMC1052)
Linearity ErrorBest fit straight line
± 1 gauss
± 3 gauss
± 6 gauss
Hysteresis Error 3 sweeps across ±3 gauss0.06%FS
Repeatability Error 3 sweeps across ±3 gauss0.1%FS
* Tested at 25°C except stated otherwise.
-1.25±0.5+1.25mV/V
Pgauss
20gauss
-3000-2700
-2400ppm/°C
-600
±500
ppm/°C
±10
0.1
0.5
%FS
1.8
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 2
HMC1055
Advance InformationSENSOR PRODUCTS
SPECIFICATIONS – MAGNETIC SENSORS HMC1051Z, HMC1052
CharacteristicsConditions*MinTypMaxUnits
Set/Reset Strap
ResistanceMeasured from S/R+ to S/R- 345ohms
Current0.1% duty cycle, or less,
2Psec current pulse
Resistance
Tempco
Offset Straps
ResistanceMeasured from OFFSET+ to OFFSET- 121518ohms
Pin Configurations (Arrow indicates direction of applied field that generates a positive output voltage after a SET pulse.)
HMC1051
Vcc
(3)
HMC1051
BRIDGE ABRIDGE B
Vo+(A)
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 4
GND Plane
(2)
Vo-(A)
S/R+
(6)
(8)
Set/Reset Strap
(4)
GND1(B)
(1)
S/R-
(7)
GND2(B)
(5)
HMC1051Z Pinout
HONEYWELL
HMC1051Z
12345678
HMC1055
Advance InformationSENSOR PRODUCTS
HMC1052
MXD3334UL
(7)
(7)
Sck
Sck
(optional)
(optional)
Vcc
Vcc
(5)
(5)
HMC1052
HMC1052
BRIDGE ABRIDGE B
BRIDGE ABRIDGE B
GND2
OUT-
OUT-
(10)
(10)
GND2
(9)
(9)
CLK
CLK
Heater
Heater
Control
Control
GND1
GND1
(3)
(3)
S/R+
S/R+
(6)
(6)
Oscillator
Oscillator
OUT+
OUT+
Internal
Internal
(4)
(4)
Set/Reset Strap
Set/Reset Strap
OUT-
OUT-
(7)
(7)
Continous
Continous
Self Test
Self Test
GND
GND
(1)
(1)
S/R-
S/R-
(8)
(8)
Temperature
Temperature
Reference
Reference
Sensor
Sensor
Voltage
Voltage
OUT+
OUT+
(2)
(2)
HMC1052 Pinout
678910
B
HMC
A
1052
12345
(1)
(1)
T
T
OUT
OUT
V
V
(6)
(6)
REF
REF
1
2
8
7
X +g
6
Low Pass
Gnd
Gnd
Low Pass
Filter
Filter
Low Pass
Low Pass
Filter
Filter
V
V
DA
DA
(4)(3)(8)
(4)(3)(8)
D
D
(5)
(5)
OUTX
OUTX
(2)
(2)
D
D
OUTY
OUTY
2-AXIS
2-AXIS
SENSOR
SENSOR
V
V
DD
DD
X axis
X axis
Factory Adjust
Factory Adjust
Offset &Gain
Offset & Gain
Y axis
Y axis
Pin Descriptions
HMC1051Z
PinNameDescription
1GND1(B)Bridge B Ground 1 (normally left open)
2Vo+(A)Bridge Output Positive
3VccBridge Positive Supply
4GND PlaneBridge Ground (substrate)
5GND2(B)Bridge B Ground 2 (normally left open)
6S/R+Set/Reset Strap Positive
7S/R-Set/Reset Strap Negative
8Vo-(A)Bridge Output Negative
3
Y +g
MEMSIC
4
Top View
5
Solid State Electronics Center • www.magneticsensors.com• (800) 323-8295•Page 5
HMC1055
Advance InformationSENSOR PRODUCTS
HMC1052
PinNameDescription
1GNDBridge B Ground
2OUT+Bridge B Output Positive
3GND1Bridge A Ground 1
4OUT+Bridge B Output Positive
5VccBridge Positive Supply
6S/R+Set/Reset Strap Positive
7OUT-Bridge B Output Negative
8S/R-Set/Reset Strap Negative
9GND2Bridge A Ground 2
10OUT-Bridge A Output Negative
MXD3334UL
PinNameDescription
1T
2D
OUT
OUTY
3GndGround
4V
5D
6V
DA
OUTX
ref
7SckOptional External Clock
8V
DD
Temperature (Analog Voltage)
Y-Axis Acceleration Digital Signal
Analog Supply Voltage
X-Axis Acceleration Digital Signal
2.5V Reference
Digital Supply Voltage
Package Dimensions
HMC1051Z
HMC1052
SymbolMillimeters
MinMax
A
A1
B
D
E
e
H
h
1.3711.728
0.1010.249
0.355 0.483
9.829 11.253
3.810 3.988
1.270 ref
6.850 7.300
0.3810.762
SymbolMillimeters
Min Max
A
A1
B
D
E1
e
E
L1
- 1.10
0.05 0.15
0.15 0.30
2.90 3.10
2.90 3.10
0.50 BSC
4.75 5.05
0.95 BSC
Inches x 10E-3
Min Max
54 68
4 10
1419
387443
150157
50 ref
270287
1530
Inches x 10E-3
Min Max
- 43
2.0 5.9
5.9 11.8
114 122
114 122
2.0 BSC
187 199
37.4
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 6
HMC1055
Advance InformationSENSOR PRODUCTS
MXS3334UL
Application Notes
The HMC1055 Chipset is composed of three sensors packaged as integrated circuits for tilt compensated electronic
compass development. These three sensors are composed of a Honeywell HMC1052 two-axis magnetic field sensor,
a Honeywell HMC1051Z one-axis magnetic sensor, and the Memsic MXS3334UL two-axis accelerometer.
Traditionally, compassing is done with a two-axis magnetic sensor held level (perpendicular to the gravitational axis)
to sense the horizontal vector components of the earth’s magnetic field from the south pole to the north pole. By
incorporating a third axis magnetic sensor and the two-axis accelerometer to measure pitch and roll (tilt), the compass
is able to be electronically “gimbaled” and can point to the north pole regardless of level.
The HMC1052 two-axis magnetic sensor contains two Anisotropic Magneto-Resistive (AMR) sensor elements in a
single MSOP-10 package. Each element is a full wheatstone bridge sensor that varies the resistance of the bridge
magneto-resistors in proportion to the vector magnetic field component on its sensitive axis. The two bridges on the
HMC1052 are orientated orthogonal to each other so that a two-dimensional representation of an magnetic field can
be measured. The bridges have a common positive bridge power supply connection (Vb); and with all the bridge
ground connections tied together, form the complete two-axis magnetic sensor. Each bridge has about an 1100-ohm
load resistance, so each bridge will draw several milli-amperes of current from typical digital power supplies. The
bridge output pins will present a differential output voltage in proportion to the exposed magnetic field strength and the
amount of voltage supply across the bridge. Because the total earth’s magnetic field strength is very small (~0.6
gauss), each bridge’s vector component of the earth’s field will even be smaller and yield only a couple milli-volts with
nominal bridge supply values. An instrumentation amplifier circuit; to interface with the differential bridge outputs, and
to amplify the sensor signal by hundreds of times, will then follow each bridge voltage output.
The HMC1051Z is an additional magnetic sensor in an 8-pin SIP package to place the sensor silicon die in a vertical
orientation relative to a Printed Circuit Board (PCB) position. By having the HMC1052 placed flat (horizontal) on the
PCB and the HMC1051Z vertical, all three vector components of the earth’s magnetic field (X, Y, and Z) are sensed.
By having the Z-axis component of the field, the electronic compass can be oriented arbitrarily; and with a tilt sensor,
perform tilt-compensated compass heading measurements as if the PCB where perfectly level.
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 7
HMC1055
Advance InformationSENSOR PRODUCTS
C1
C1
150P
VCC
VCC
VEE
VEE
VCC
VCC
VEE
VEE
Vdd
Vdd
150P
Vdd
Vdd
X1
X1
LMV324M
LMV324M
C2
C2
150P
150P
Vdd
Vdd
X2
X2
LMV324M
LMV324M
5
5
Vref
Vref
14
14
C6
C6
0.1U
0.1U
C7
C7
0.1U
0.1U
Vdd
Vdd
Vdd
Vdd
18
18
R12
R12
10K
10K
R13
R13
10K
10K
R10
R10
10
10
DO0
DO0
MICRO-
MICRO-
CONTROLLER
CONTROLLER
VDD
VDD
AN0
AN0
AN1
AN1
AN2
AN2
AN3
AN3
GND
GND
NC
NC
DI0
DI0
DI1
DI1
SCK
SCK
CS
CS
RXD
RXD
TXD
TXD
R1A6R2A
R1A6R2A
7
7
R3AR4A
R3AR4A
HMC1052
HMC1052
R1B11R2B
R1B11R2B
10
10
R3BR4B
R3BR4B
Rsr1
Rsr1
4
4
Vdd
Vdd
R1
R1
1.00MEG
1.00MEG
R2
R2
4.99K
4.99K
1
1
2
Vref
Vref
Vref
Vref
R9
R9
220
220
2
R3
R3
1.00MEG
1.00MEG
R5
R5
1.00MEG
1.00MEG
13
13
12
12
R7
R7
1.00MEG
1.00MEG
R4
R4
4.99K
4.99K
R6
R6
4.99K
4.99K
R8
R8
4.99K
4.99K
C4
C4
1U
1U
8
8
9
9
15
16
16
Vref
Vref
15
X4
X4
IRF7509P
IRF7509P
X5
X5
IRF7509N
IRF7509N
R18
R18
1.00MEG
1.00MEG
24
24
23
23
R20
R20
1.00MEG
1.00MEG
VCC
VCC
VEE
VEE
C5
C5
150P
150P
Vdd
Vdd
X3
X3
LMV324M
LMV324M
25
25
Rsr2
Rsr2
4
4
HMC1051Z
HMC1051Z
R14Z21R15Z
R14Z21R15Z
22
22
R16ZR17Z
R16ZR17Z
C3
C3
0.22U
0.22U
Vdd
Vdd
R19
R19
4.99K
4.99K
R21
R21
4.99K
4.99K
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 8
VDAVDD
VDAVDD
VREF
VREF
DOUTY
DOUTY
MXS3334UL
MXS3334UL
TOUT
TOUT
NC
NC
DOUTX
DOUTX
GND
GND
Figure 1
Figure 1
SCK
SCK
3-Axis Compass Reference Design
HMC1055
Advance InformationSENSOR PRODUCTS
The MXS3334UL is a two-axis accelerometer in an 8-pin LCC package that provides a digital representation of the
earth’s gravitational field. When the MXS3334UL is held level and placed horizontally on a PCB, both digital outputs
provide a 100 Hz Pulse Width Modulated (PWM) square wave with a 50 percent duty cycle. As the accelerometer is
pitched or rolled from horizontal to vertical, the Doutx and Douty duty cycles will shift plus or minus 20% of its duty
from the 50% center point.
The reference design in Figure 1 shows a reference design incorporating all three sensor elements of the HMC1055
chipset for a tilt compensated electronic compass operating from a 5.0 volt regulated power supply described as Vdd.
The HMC1052 sensor bridge elements A and B are called out as R1A, R2A, R3A, R4A, and R1B, R2B, R3B, R4B
respectively; and create a voltage dividing networks that place nominally 2.5 volts into the succeeding amplifier
stages. The HMC1051Z sensor bridge elements R14Z, R15Z, R16Z, and R17Z also do a similar voltage dividing
method to its amplifier stage.
In this design each amplifier stage uses a single operational amplifier (op-amp) from a common LMV324M quad opamp Integrated Circuit (IC). For example, resistors R1, R2, R3, and R4 plus capacitor C1 configure op-amp X1 into an
instrumentation amplifier with a voltage gain of about 200. These instrumentation amplifier circuits take the voltage
differences in the sensor bridges, and amplify the signals for presentation at the micro-controller Analog to Digital
Converter (ADC) inputs, denoted as AN1, AN2, and AN3. Because the zero magnetic field reference level is at 2.5
volts, each instrumentation amplifier circuit receives a 2.5 volt reference voltage (Vref) from a resistor divider circuit
composed of R12 and R13.
For example, a +500 milli-gauss earth’s field on bridge A of the HMC1052 will create a 2.5 milli-volt difference voltage
at the sensor bridge output pins (0.5 gauss multiplied by the 1.0mV/V/gauss sensitivity rating). This 2.5mV then is
multiplied by 200 for 0.5 volt offset that is referenced to the 2.5 volt Vref for a total of +3.0 volts at AN1. Likewise any
positive and or negative magnetic field vectors from bridge B and the HMC1051Z bridge are converted to voltage
representations at AN2 and AN3.
The micro-controller also receives the sensor inputs from the MXS3334UL accelerometer directly from Doutx and
Douty into two digital inputs denoted as DI0 and DI1. Optionally, the MXS3334UL temperature output pin (Tout) can
routed to another microcontroller ADC input for further temperature compensation of sensor inputs. Power is supplied
to the MXS3334UL from the 5.0 volt Vdd source directly to the accelerometer VDA pin and on to the VDD pin via a ten
ohm resistor (R10) for modest digital noise decoupling. Capacitors C6 and C7 provide noise filtering locally at the
accelerometer and throughout the compass circuit.
The set/reset circuit for this electronic compass is composed of MOSFETs X4 and X5, capacitors C3 and C4, and
resistor R9. The purpose of the set/reset circuit is to re-align the magnetic moments in the magnetic sensor bridges
when they exposed to intense magnetic fields such as speaker magnets, magnetized hand tools, or high current
conductors such as welding cables or power service feeders. The set/reset circuit is toggled by the microcontroller
and each logic state transition creates a high current pulse in the set/reset straps for both HMC1052 and the
HMC1051Z.
Operational Details
With the compass circuitry fully powered up, sensor bridge A creates a voltage difference across OUTA- and OUTA+
that is then amplified 200 times and presented to microcontroller analog input AN1. Similarly, bridges B and C create
a voltage difference that is amplified 200 times and presented to microcontroller analog inputs AN2 and AN3. These
analog voltages at AN1 and AN2 can be thought of as “X” and “Y” vector representations of the magnetic field. The
third analog voltage (AN3) plus the tilt information from accelerometer, is added to the X and Y values to create tilt
compensated X and Y values, sometimes designated X’ and Y’.
To get these X, Y, and Z values extracted, the voltages at AN1 through AN3 are to be digitized by the
microcontroller’s onboard Analog-to-Digital Converter (ADC). Depending on the resolution of the ADC, the resolution
of the Compass is set. Typically compasses with one degree increment displays will have 10-bit or greater ADCs, with
8-bit ADCs more appropriate for basic 8-cardinal point (North, South, East, West, and the diagonal points)
compassing. Individual microcontroller choices have a great amount of differing ADC implementations, and there may
be instances where the ADC reference voltage and the compass reference voltage can be shared. The point to
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 9
HMC1055
Advance InformationSENSOR PRODUCTS
remember is that the analog voltage outputs are referenced to half the supplied bridge voltage and amplified with a
similar reference.
The most often asked question on AMR compass circuits is how frequent the set/reset strap must be pulsed. The
answer for most low cost compasses is fairly infrequently; from a range of once per second, to once per compass
menu selection by the user. While the set circuit draws little energy on a per pulse basis, a constant one pulse per
second rate could draw down a fresh watch battery in less than a year. In the other extreme of one “set” pulse upon
the user manually requesting a compass heading, negligible battery life impact could be expected. From a common
sense standpoint, the set pulse interval should be chosen as the shortest time a user could withstand an inaccurate
compass heading after exposing the compass circuit to nearby large magnetic sources. Typical automatic set
intervals for low cost compasses could be once per 10 seconds to one per hour depending on battery energy
capacity. Provision for a user commanded “set” function may be a handy alternative to periodic or automatic set
routines.
In portable consumer electronic applications like compass-watches, PDAs, and wireless phones; choosing the
appropriate compass heading data flow has a large impact on circuit energy consumption. For example, a one
heading per second update rate on a sport watch could permit the compass circuit to remain off to nearly 99 percent
of the life of the watch, with just 10 millisecond measurement snapshots per second and a one per minute set pulses
for perming correction. The HMC1052 and HMC1051Z sensors have a 5 MHz bandwidth in magnetic field sensing, so
the minimum snapshot measurement time is derived principally by the settling time of the op-amps plus the sampleand-hold time of the microcontroller’s ADCs.
In some “gaming” applications in wireless phones and PDAs, more frequent heading updates permits virtual reality
sensor inputs for software reaction. Typically these update rates follow the precedent set more than a century ago by
the motion picture industry (“Movies”) at 20 updates or more per second. While there is still some value in creating off
periods in between these frequent updates, some users may choose to only switch power on the sensor bridges
exclusively and optimize the remainder of the circuitry for low power consumption.
Compass Firmware Development
To implement an electronic compass with tilt compensation, the microcontroller firmware must be developed to gather
the sensor inputs and to interpret them into meaningful data to the end user system. Typically the firmware can be
broken into logical routines such as initialization, sensor output collection and raw data manipulation, heading
computation, calibration routines, and output formatting.
For the sensor output data collection, the analog voltages at microcontroller inputs AN0 through AN3 are digitized and
a “count” number representing the measured voltage is the result. For compassing, the absolute meaning of the ADC
counts scaled back to the sensor’s milli-gauss measurement is not necessary, however it is important to reference the
zero-gauss ADC count level. For example, an 8-bit ADC has 512 counts (0 to 511 binary), then count 255 would be
the zero offset and zero-gauss value.
In reality errors will creep in due to the tolerances of the sensor bridge (bridge offset voltage), multiplied by the
amplifier gain stages plus any offset errors the amplifiers contribute; and magnetic errors from hard iron effects
(nearby magnetized materials). Usually a factory or user calibration routine in a clean magnetic environment will
obtain a correction value of counts from mid ADC scale. Further tweaking of the correction value for each magnetic
sensor axis once the compass assembly is in its final user location, is highly desired to remove the magnetic
environment offsets.
For example, the result of measuring AN0 (Vref) is about count 255, and the measuring of AN1, AN2, and AN3 results
in 331, 262, and 205 counts respectively. Next calibration values of 31, -5, and 20 counts would be subtracted to
result in corrected values of 301, 267, and 205 respectively. If the pitch and roll were known to be zero; then the AN3
(Z-axis output) value could be ignored and the tilt corrected X and Y-axis values would be the corrected values of AN1
and AN2 minus the voltage reference value of AN0. Doing the math yields arctan [y/x] or arctan [(267-255)/(301-255)]
or 14.6 degrees east of magnetic north.
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 10
Once the magnetic sensor axis outputs are gathered and the calibration corrections subtracted, the next step toward
heading computation is to gather the pitch and roll (tilt) data from the MEMSIC MXS3334UL accelerometer outputs.
The MXS3334UL in perfectly horizontal (zero tilt) condition produces a 100Hz, 50 percent duty cycle Pulse Width
Modulated (PWM) digital waveform from its Doutx and Douty pins corresponding to the X and Y sensitive axis. These
output pins will change their duty cycle from 30% to 70% when tilted fully in each axis (±1g). The scaling of the PWM
outputs is strictly gravitational, so that a 45 degree tilt results in 707 milli-g’s or a slew of ±14.1% from the 50% center
point duty cycle.
With the MXS3334UL’s positive X-axis direction oriented towards the front of the user’s platform, a pitch downward
will result in a reduced PWM duty cycle, with a pitch upward increasing in duty cycle. Likewise, the Y-axis arrow is 90
degrees counter-clockwise which results in a roll left corresponding to a decreasing duty cycle, and roll right to an
increasing duty cycle.
Measuring the pitch and roll data for a microcontroller is reasonably simple in that the Doutx and Douty logic signals
can be sent to microcontroller digital input pins for duty cycle measurement. At firmware development or factory
calibration, the total microcontroller clock cycles between Doutx or Douty rising edges should be accrued using an
interrupt or watchdog timer feature to scale the 100Hz (10 millisecond) edges. Then measuring the Doutx and Douty
falling edges from the rising edge (duty cycle computation) should be a process of clock cycle counting. For example,
a 1MHz clocked microcontroller should count about 10,000 cycles per rising edge, and 5,000 cycle counts from rising
to falling edge would represent a 50% duty cycle or zero degree pitch or roll.
Once the duty cycle is measured for each axis output and mathematically converted to a gravitational value, these
values can be compared to a memory mapped table, if the user desires the true pitch and roll angles. For example, if
the pitch and roll data is to be known in one degree increments, a 91-point map can be created to match up
gravitational values (sign independent) with corresponding degree indications. Because tilt-compensated compassing
requires sine and cosine of the pitch and roll angles, the gravitational data is already formatted between zero and one
and does not require further memory maps of trigonometric functions. The gravity angles for pitch and roll already fit
the sine of the angles, and the cosines are just one minus the sine values (cosine = 1 – sine).
The equations:
X’ = X * cos(I) + Y * sin(T) * sin(I) – Z * cos(T) * sin(I)
Y’ = Y * cos(T) + Z * sin(T)
Create tilt compensated X and Y magnetic vectors (X’, Y’) from the raw X, Y, and Y magnetic sensor inputs plus the
pitch (I) and roll (T) angles. Once X’ and Y’ are computed, the compass heading can be computed by equation:
Azimuth (Heading) = arctan (Y’ / X’)
To perform the arc-tangent trigonometric function, a memory map needs to be implemented. Thankfully the pattern
repeats in each 90° quadrant, so with a one-degree compass resolution requirement, 90 mapped quotients of the arctangent function can be used. If 0.1° resolution is needed then 900 locations are needed and only 180 locations with
0.5° resolution. Also, special case quotient detections are needed for the zero and inifinity situations at 0°, 90, 180°,
and 270° prior to the quotient computation.
After the heading is computed, two heading correction factors may be added to handle declination angle and platform
angle error. Declination angle is the difference between the magnetic north pole and the geometric north pole, and
varies depending on the latitude and longitude (global location) of the user compass platform. If you have access to
Global Positioning Satellite (GPS) information resulting in a latitude and longitude computation, then the declination
angle can be computed or memory mapped for heading correction. Platform angle error may occur if the sensors are
not aligned perfectly with the mechanical characteristics of the user platform. These angular errors can be inserted in
firmware development and or in factory calibration.
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 11
In the paragraphs describing raw magnetic sensor data, the count values of X, Y, and Z are found from inputs AN0 to
AN3. A firmware calibration routine will create Xoff, Yoff and Xsf, and Ysf for calibration factors for “hard-iron”
distortions of the earth’s magnetic field at the sensors. Typically these distortions come from nearby magnetized
components. Soft-iron distortions are more complex to factor out of heading values and are generally left out for low
cost compassing applications. Soft-iron distortion arises from magnetic fields bent by un-magnetized ferrous materials
either very close to the sensors or large in size. Locating the compass away from ferrous materials provides the best
error reduction. The amount of benefit is dependant on the amount of ferrous material and its proximity to the
compass platform.
To derive the calibration factors, the sensor assembly (platform) and its affixed end-platform (e.g. watch/human, boat,
auto, etc.) are turned at least one complete rotation as the compass electronics collects many continuous readings.
The speed and rate of turn are based on how quickly the microcontroller can collect and process X, Y, and Z data
during the calibration routine. A good rule of thumb is to collect readings every few degrees by either asking the user
to make a couple rotations or by keeping in the rotation(s) slow enough to collect readings of the correct rate of turn.
The Xh and Yh readings during calibration are done with Xoff and Yoff at zero values, and axis scale factors (Xsf and
Ysf) at unity values. The collected calibration X and Y values are then tabulated to find the min and max of both X and
Y. At the end of the calibration session, the Xmax, Ymax, Xmin, and Ymin values are converted to the following:
Xsf = 1 or (Ymax –Ymin) / (Xmax – Xmin) , whichever is greater
Ysf = 1 or (Xmax –Xmin) / (Ymax – Ymin) , whichever is greater
Xoff = [(Xmax – Xmin)/2 – Xmax] * Xsf
Yoff = [(Ymax –Ymin)/2 –Ymax] * Ysf
Z-axis data is generally not corrected if the end-platform can not turned upside-down. In portable or hand-held
applications, then the compass assembly can be tipped upside down and Zoff can be computed like Xoff and Yoff, but
with only two reference points (upright and upside down). Factory values for Zoff maybe the only values possible.
Creating corrected X, Y, and Z count values are done as previously mentioned by subtracting the offsets. The scale
factor values are used only after the Vref counts are subtracted form the offset corrected axis counts. For more details
on calibration for iron effects, see the white paper “Applications of Magnetoresistive Sensors in Navigation Systems”
located on the magneticsensors.com website.
Offsets due to sensor bridge offset voltage of each sensor axis are part of the Xoff, Yoff, and Zoff computation. These
offsets are present even with no magnetic field disturbances. To find their true values, the set and reset drive circuits
can be toggled while taking measurements shortly after each transition. After a reset pulse, the magnetic field portion
of the sensor bridge will have flipped polarity while the offset remains the same. Thus two measurements, after a
reset and a set pulse can be summed together. The magnetic portions of the sum will cancel, leaving just a double
value of the offset. The result can then be divide by two to derive the bridge offset.
The reason for knowing the bridge offset, is that the offset will drift with temperature. Should the user desire the best
accuracy in heading, a new calibration should be performed with each encounter with a new temperature
environment. See application notes AN-212, AN-213, and AN-214 for further compass design considerations.
Ordering Information
Ordering NumberProduct
HMC10553-Axis Compass Sensor Set
Honeywell reserves the right to make changes to improve reliability, function or design. Honeywell does not assume
any liability arising out of the application or use of any product or circuit described herein; neither does it convey any
license under its patent rights nor the rights of others.
900302 12-02 Rev –
Solid State Electronics Center • www.magneticsensors.com • (800) 323-8295 • Page 12
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.