PNI TCM XB User manual

User Manual
TCM
High-Performance Tilt-Compensated Compass Module

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page i
Table of Contents
1COPYRIGHT & WARRANTY INFORMATION ................................................. 1
2INTRODUCTION ......................................................................................... 2
3SPECIFICATIONS......................................................................................... 3
3.1 Characteristics & Requirements ........................................................... 3
3.2 Mechanical Drawings............................................................................ 6
4SET-UP....................................................................................................... 8
4.1 Electrical Connections........................................................................... 8
4.2 Installation Location.............................................................................. 9
4.2.1 Operate within the TCM’s dynamic range................................... 9
4.2.2 Locate away from changing magnetic fields ............................... 9
4.2.3 Mount in a physically stable location .......................................... 9
4.2.4 Location-verification testing ........................................................ 9
4.3 Mechanical Mounting ......................................................................... 10
4.3.1 Pitch and Roll Conventions ........................................................ 10
4.3.2 Mounting Orientation................................................................ 11
5USER CALIBRATION.................................................................................. 12
5.1 Magnetic Calibration........................................................................... 13
5.1.1 Full-Range Calibration................................................................ 15
5.1.2 2D Calibration ............................................................................ 16
5.1.3 Limited Tilt Range Calibration.................................................... 17
5.1.4 Hard-Iron-Only Calibration ........................................................ 18
5.2 Accelerometer Calibration.................................................................. 18
5.2.1 Accelerometer-Only Calibration ................................................ 19
5.2.2 Mag-and-Accel Calibration ........................................................ 20
6OPERATION WITH TCM STUDIO ............................................................... 21
6.1 Installation .......................................................................................... 21
6.2 Connection Tab ................................................................................... 22
6.2.1 Initial Connection....................................................................... 22
6.2.2 Changing Baud Rate ................................................................... 22
6.2.3 Changing Modules ..................................................................... 23
6.3 Configuration Tab ............................................................................... 23
6.3.1 Mounting Options...................................................................... 23
6.3.2 North Reference......................................................................... 24
6.3.3 Endianess ................................................................................... 24
6.3.4 Output........................................................................................ 25
6.3.5 Enable 3D Model........................................................................ 25
6.3.6 Filter Setting (Taps).................................................................... 25
6.3.7 Acquisition Settings.................................................................... 25
6.3.8 HPR During Calibration .............................................................. 26
6.3.9 Calibration Settings.................................................................... 26

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page ii
6.3.10 Default........................................................................................ 27
6.3.11 Retrieve...................................................................................... 27
6.4 Calibration Tab.................................................................................... 28
6.4.1 Samples ...................................................................................... 28
6.4.2 Calibration Results ..................................................................... 29
6.4.3 Current Configuration................................................................ 30
6.4.4 Options....................................................................................... 30
6.4.5 Clear ........................................................................................... 30
6.5 Test Tab............................................................................................... 31
6.5.1 Current Reading ......................................................................... 31
6.5.2 3D Model.................................................................................... 31
6.5.3 Acquisition Settings.................................................................... 31
6.5.4 Sync Mode.................................................................................. 32
6.6 Log Data Tab ....................................................................................... 33
6.7 Graph Tab............................................................................................ 34
6.8 System Log Tab ................................................................................... 35
7OPERATION WITH PNI BINARY PROTOCOL ............................................... 36
7.1 Datagram Structure ............................................................................ 36
7.2 Parameter Formats ............................................................................. 37
7.3 Commands & Communication Frames ............................................... 39
7.3.1 kGetModInfo (frame ID 1d) ........................................................ 40
7.3.2 kGetModInfoResp (frame ID 2d) ................................................ 40
7.3.3 kSetDataComponents (frame ID 3d) .......................................... 41
7.3.4 kGetData (frame ID 4d) .............................................................. 42
7.3.5 kGetDataResp (frame ID 5d)....................................................... 42
7.3.6 kSetConfig (frame ID 6d) ............................................................ 43
7.3.7 kGetConfig (frame ID 7d)............................................................ 47
7.3.8 kGetConfigResp (frame ID 8d).................................................... 47
7.3.9 kSave (frame ID 9d) .................................................................... 48
7.3.10 kStartCal (frame ID 10d) ............................................................. 48
7.3.11 kStopCal (frame ID 11d).............................................................. 50
7.3.12 kSetFIRFilters (frame ID 12d)...................................................... 50
7.3.13 kGetFIRFilters (frame ID 13d) ..................................................... 52
7.3.14 kGetFIRFiltersResp (frame ID 14d) ............................................. 52
7.3.15 kPowerDown (frame ID 15d)...................................................... 52
7.3.16 kSaveDone (frame ID 16d).......................................................... 53
7.3.17 kUserCalSampleCount (frame ID 17d)........................................ 53
7.3.18 kCalScore (frame ID 18d)............................................................ 53
7.3.19 kSetConfigDone (frame ID 19d).................................................. 54
7.3.20 kSetFIRFiltersDone (frame ID 20d) ............................................. 54
7.3.21 kStartContinuousMode (frame ID 21d)...................................... 54
7.3.22 kStopContinuousMode (frame ID 22d) ...................................... 54
7.3.23 kPowerUpDone (frame ID 23d) .................................................. 55

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page iii
7.3.24 kSetAcqParams (frame ID 24d)................................................... 55
7.3.25 kGetAcqParams (frame ID 25d).................................................. 56
7.3.26 kSetAcqParamsDone (frame ID 26d).......................................... 56
7.3.27 kGetAcqParamsResp (frame ID 27d) .......................................... 56
7.3.28 kPowerDownDone (frame ID 28d) ............................................. 56
7.3.29 kFactoryMagCoeff (frame ID 29 d) ............................................. 56
7.3.30 kFactoryMagCoeffDone (frame ID 30 d)..................................... 56
7.3.31 kTakeUserCalSample (frame ID 31d).......................................... 57
7.3.32 kFactoryAccelCoeff (frame ID 36 d)............................................ 57
7.3.33 kFactoryAccelCoeffDone (frame ID 37 d) ................................... 57
7.3.34 kSetSyncMode (frame ID 46 d) ................................................... 57
7.3.35 kSetSyncModeResp (frame ID 47 d) ........................................... 58
7.3.36 kSyncRead (frame ID 49 d).......................................................... 58
7.4 Using Multiple Coefficient Sets........................................................... 59
7.5 Code Examples.................................................................................... 61
7.5.1 Header File & CRC-16 Function.................................................. 61
7.5.2 CommProtocol.h File ................................................................. 64
7.5.3 CommProtocol.cpp File.............................................................. 66
7.5.4 TCM.h File .................................................................................. 70
7.5.5 TCM.cpp File............................................................................... 71

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page iv
List of Tables
Table 3-1: Performance Characteristics13
Table 3-2: Absolute Maximum Ratings 4
Table 3-3: Electrical Operating Requirements 4
Table 3-4: I/O Characteristics 5
Table 3-5: Environmental Requirements 5
Table 3-6: Mechanical Characteristics 5
Table 4-1: TCM Pin Descriptions 8
Table 5-1: Magnetic Calibration Mode Summary 14
Table 5-2: 12 Point Full-Range Calibration Pattern 16
Table 5-3: 12 Point 2D Calibration Pattern 17
Table 5-4: 12 Point Limited-Tilt Calibration Pattern 17
Table 5-5: 6 Point Hard-Iron-Only Calibration Pattern 18
Table 6-1: Mounting Orientations 24
Table 7-1: UART Configuration 36
Table 7-2: TCM Command Set 39
Table 7-3: Component Identifiers 41
Table 7-4: Configuration Identifiers 44
Table 7-5: Sample Points 45
Table 7-6: Recommended FIR Filter Tap Values 51
Table 7-7 Multiple Coefficient Command List 59
List of Figures
Figure 3-1: TCM XB Mechanical Drawing 6
Figure 3-2: TCM XB Pigtailed Cable Drawing 6
Figure 3-3: TCM MB Mechanical Drawing 7
Figure 4-1: Positive & Negative Roll and Pitch Definition 10
Figure 4-2: Mounting Orientations 11
Figure 5-1: 12 Point Full-Range Calibration 15
Figure 5-2: Accelerometer Calibration Starting Orientations 20
Figure 7-1: Datagram Structure 36

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 1
1 Copyright & Warranty Information
© Copyright PNI Sensor Corporation 2009
All Rights Reserved. Reproduction, adaptation, or translation without prior written permission is prohibited, except
as allowed under copyright laws.
Revised March 2014. For most recent version visit our website at www.pnicorp.com
PNI Sensor Corporation
2331 Circadian Way
Santa Rosa, CA 95407, USA
Tel: +1 (707) 566-2260
Fax: +1 (707) 566-2261
Warranty and Limitation of Liability. PNI Sensor Corporation ("PNI") manufactures its TCM products
(“Products”) from parts and components that are new or equivalent to new in performance. PNI warrants that each
Product to be delivered hereunder, if properly used, will, for one year following the date of shipment unless a different
warranty time period for such Product is specified: (i) in PNI’s Price List in effect at time of order acceptance; or (ii)
on PNI’s web site (www.pnicorp.com) at time of order acceptance, be free from defects in material and workmanship
and will operate in accordance with PNI’s published specifications and documentation for the Product in effect at time
of order. PNI will make no changes to the specifications or manufacturing processes that affect form, fit, or function
of the Product without written notice to the OEM, however, PNI may at any time, without such notice, make minor
changes to specifications or manufacturing processes that do not affect the form, fit, or function of the Product. This
warranty will be void if the Products’ serial number, or other identification marks have been defaced, damaged, or
removed. This warranty does not cover wear and tear due to normal use, or damage to the Product as the result of
improper usage, neglect of care, alteration, accident, or unauthorized repair.
THE ABOVE WARRANTY IS IN LIEU OF ANY OTHER WARRANTY, WHETHER EXPRESS, IMPLIED,
OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF MERCHANTABILITY,
FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF
ANY PROPOSAL, SPECIFICATION, OR SAMPLE. PNI NEITHER ASSUMES NOR AUTHORIZES ANY
PERSON TO ASSUME FOR IT ANY OTHER LIABILITY.
If any Product furnished hereunder fails to conform to the above warranty, OEM’s sole and exclusive remedy and
PNI’s sole and exclusive liability will be, at PNI’s option, to repair, replace, or credit OEM’s account with an amount
equal to the price paid for any such Product which fails during the applicable warranty period provided that (i) OEM
promptly notifies PNI in writing that such Product is defective and furnishes an explanation of the deficiency; (ii) such
Product is returned to PNI’s service facility at OEM’s risk and expense; and (iii) PNI is satisfied that claimed
deficiencies exist and were not caused by accident, misuse, neglect, alteration, repair, improper installation, or
improper testing. If a Product is defective, transportation charges for the return of the Product to OEM within the
United States and Canada will be paid by PNI. For all other locations, the warranty excludes all costs of shipping,
customs clearance, and other related charges. PNI will have a reasonable time to make repairs or toreplace the Product
or to credit OEM’s account. PNI warrants any such repaired or replacement Product to be free from defects in material
and workmanship on the same terms as the Product originally purchased.
Except for the breach of warranty remedies set forth herein, or for personal injury, PNI shall have no liability for any
indirect or speculative damages (including, but not limited to, consequential, incidental, punitive and special damages)
relating to the use of or inability to use this Product, whether arising out of contract, negligence, tort, or under any
warranty theory, or for infringement of any other party’s intellectual property rights, irrespective of whether PNI had
advance notice of the possibility of any such damages, including, but not limited to, loss of use, revenue or profit. In
no event shall PNI’s total liability for all claims regarding a Product exceed the price paid for the Product. PNI neither
assumes nor authorizes any person to assume for it any other liabilities.
Some states and provinces do not allow limitations on how long an implied warranty lasts or the exclusion or limitation
of incidental or consequential damages, so the above limitations or exclusions may not apply to you. This warranty
gives you specific legal rights and you may have other rights that vary by state or province.

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 2
2 Introduction
Thank you for purchasing PNI Sensor Corporation’s TCM XB (pn 12810) or TCM MB (pn 13095)
tilt-compensated 3-axis digital compass. The TCM is a high-performance, low-power
consumption, tilt-compensated electronic compass module that incorporates PNI’s advanced
magnetic distortion compensation and calibration scoring algorithms to provide industry-leading
heading accuracy. The TCM combines PNI’s patented magneto-inductive sensors and
measurement circuit technology with a 3-axis MEMS accelerometer for unparalleled cost
effectiveness and performance.
PNI recognizes not all applications allow for significant tilt during calibration, so multiple
calibration methods are available to ensure optimized performance can be obtained in the real
world. These include Full-Range Calibration, when ≥45° of tilt is possible during calibration, 2D
Calibration when constrained to calibration in a horizontal or near-horizontal plane, and Limited-
Tilt Calibration when tilt is constrained to <45° but >5° of tilt is possible.
PNI also recognizes conditions may change over time, and to maintain superior heading accuracy
it may be necessary to recalibrate the compass. So the TCM incorporates Hard-Iron-Only
Calibration to easily account for gradual changes in the local magnetic distorting components.
Plus, the accelerometer can be periodically recalibrated in the field to maintain maximum
accuracy.
These advantages make PNI’s TCM the choice for applications that require the highest accuracy
and performance anywhere in the world under a wide range of conditions. Applications for the
TCM include:
Unmanned vehicles –underwater (UUV), ground (UGV), & aerial (UAV)
Far target locaters and laser range finders
Dead reckoning systems
Systems in which the tilt angles used for calibration are physically constrained
With its many applications, the TCM incorporates a flexible and adaptable command set. Many
parameters are user-programmable, including reporting units, a wide range of sampling
configurations, output damping, and more.
We’re sure the TCM will help you to achieve the greatest performance from your system. Thank
you for selecting the TCM.

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 3
3 Specifications
3.1 Characteristics & Requirements
Table 3-1: Performance Characteristics1
Parameter
Value
Heading
Accuracy
≤65° of pitch after Full-Range
Calibration
<0.3° rms
≤80° of pitchafter Full-Range
Calibration
<0.5° rms
≤5° of pitch after 2D calibration
<2.0° rms
≤2 times the calibration tilt angle when
using limited-tilt calibration2
<2.0° rms
Resolution
0.1°
Repeatability
0.05° rms
Attitude
Range
Pitch
± 90°
Roll
± 180°
Accuracy
Pitch
0.2° rms
Roll
≤65° of pitch
0.2° rms
≤80° of pitch
0.4° rms
≤86° of pitch
1.0° rms
Resolution
0.01°
Repeatability
0.05° rms
Maximum Operational Dip Angle3
85°
Magnetometers
Calibrated Field Range
± 125 µT
Resolution
0.05 µT
Repeatability
± 0.1 µT
Footnotes:
1. Specifications are subject to change. Assumes the TCM is motionless and the local magnetic field
is clean relative to the user calibration.
2. For example, if the calibration was performed over ±10° of tilt, then the TCM would provide <2° rms
accuracy over ±20° of tilt.
3. Performance at maximum operational dip angle will be somewhat degraded.

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 4
Table 3-2: Absolute Maximum Ratings
Parameter
Minimum
Maximum
Units
Supply Voltage
-0.3
+10
VDC
Storage Temperature
-40
+85
°C
CAUTION:
Stresses beyond those listed above may cause permanent damage to the device. These are
stress ratings only. Operation of the device at these or other conditions beyond those indicated
in the operational sections of the specifications is not implied.
Table 3-3: Electrical Operating Requirements
Parameter
Value
Supply Voltage
TCM XB
3.8 to 9 VDC
TCM MB
3.3 to 9 VDC
Communication
Lines
TCM XB
High Level Input
2.4 V minimum
Low Level Input
0.6 V maximum
Output Voltage Swing
±5.2 V typ., ±5.0 V min.
Tx Output Resistance
300 Ω
TCM MB
High Level Input
2.0 V minimum
Low Level Input
0.8 V maximum
Output Voltage Swing
0 –3.3 V typical
Tx Output Resistance
330 Ω
Average
Current Draw
TCM XB
@ max. sample rate
20 mA typical
@ 8 Hz sample rate
16 mA typical
TCM MB
@ max. sample rate
17 mA typical
@ 8 Hz sample rate
13 mA typical
Peak Current
Draw
During application of external
power
120 mA pk, 60 mA avg
over 2 ms
During logical power up/down or
Sync Trigger
135 mA pk, 60 mA avg
over 4 ms
Sleep Mode
Current Draw
TCM XB
0.3 mA typical
TCM MB
0.1 mA typical

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 5
Table 3-4: I/O Characteristics
Parameter
Value
Communication
Interface
TCM XB
RS232 UART
TCM MB
CMOS/TTL UART
Communication Protocol
PNI Binary
Communication Rate
300 to 115200 baud
Maximum Sample Rate1
~30 samples/sec
Time to Initial
Good Data2
Initial power up
<210 ms
Sleep Mode recovery
<80 ms
Footnotes:
1. The maximum sample rate is dependent on the strength of the magnetic field,
and typically will be from 25 to 32 samples/sec.
2. FIR taps set to “0”.
Table 3-5: Environmental Requirements
Parameter
Value
Operating Temperature1
-40C to +85C
Storage Temperature
-40C to +85C
Footnote:
1. To meet performance specifications across this range,
recalibration will be necessary as the temperature varies.
Table 3-6: Mechanical Characteristics
Parameter
Value
Dimensions
(l x wx h)
TCM XB
35 x 43 x 13 mm
TCM MB
33 x 31 x 13 mm
Weight
TCM XB
6.8 gm
TCM MB
5.3 gm
Connector
TCM XB
9-pin Molex, pn 53780-0970
TCM MB
4-pin MIL-MAX, pn 850-10-004-10-001000

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 6
3.2 Mechanical Drawings
The default orientation is for the silk-screened arrow to point in the “forward” direction.
Figure 3-1: TCM XB Mechanical Drawing
Figure 3-2: TCM XB Pigtailed Cable Drawing

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 7
The default orientation is for the silk-screened arrow to point in the “forward” direction.
Figure 3-3: TCM MB Mechanical Drawing

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 8
4 Set-Up
This section describes how to configure the TCM in your host system. To install the TCM into
your system, follow these steps:
Make electrical connections to the TCM.
Evaluate the TCM using TCM Studio or a binary terminal emulation program, such as
RealTerm or Tera Term, to ensure the compass generally works correctly.
Choose a mounting location.
Mechanically mount the TCM in the host system.
Perform a user calibration.
4.1 Electrical Connections
The TCM XB incorporates a 9 pin Molex connector, part number 53780-0970, which mates
with Molex part 51146-0900 or equivalent. The TCM MB incorporates a 4 pin Mil-Max
connector, part number 850-10-004-10-001000, which mates with Mill-Max part 851-XX-
004-10-001000 or equivalent. The pin-out is given below in Table 4-1.
Table 4-1: TCM Pin Descriptions
Pin
Number1
TCM XB
TCM MB
9 Pin
Connector
Cable Wire
Color
4 Pin
Connector
1
GND
Black
GND
2
GND
Gray
Vin
3
GND
Green
UART Tx
4
NC
Orange
UART Rx
5
NC
Violet
6
NC
Brown
7
UART Tx
Yellow
8
UART Rx
Blue
9
Vin
Red
Footnote:
1. For the TCM XB, pin #1 is indicated on Figure 3-1, while for the TCM MB, pin
#1 is the pin closest to the corner.
After making the electrical connections, it is a good idea to perform some simple tests to ensure
the TCM is working as expected. See Section 5 for how to operate the TCM with TCM Studio,
or Section 7 for how to operate the TCM using the PNI binary protocol.

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 9
4.2 Installation Location
The TCM’s wide dynamic range and sophisticated calibration algorithms allow it to operate in
many environments. For optimal performance however, you should mount the TCM with the
following considerations in mind:
4.2.1 Operate within the TCM’s dynamic range
The TCM can be user calibrated to correct for static magnetic fields created by the host
system. However, each axis of the TCM has a calibrated dynamic range of ±125 µT. If
the total field exceeds this value for any axis, the TCM may not perform to specification.
When mounting the TCM, consider the effect of any sources of magnetic fields in the host
environment that, when added to Earth’s field, may take the TCM out of its dynamic
regime. For example, large masses of ferrous metals such as transformers and vehicle
chassis, large electric currents, permanent magnets such as electric motors, and so on.
4.2.2 Locate away from changing magnetic fields
It is not possible to calibrate for changing magnetic anomalies. Thus, for greatest accuracy,
keep the TCM away from sources of local magnetic distortion that will change with time;
such as electrical equipment that will be turned on and off, or ferrous bodies that will move.
Make sure the TCM is not mounted close to cargo or payload areas that may be loaded
with large sources of local magnetic fields.
4.2.3 Mount in a physically stable location
Choose a location that is isolated from excessive shock, oscillation, and vibration. The
TCM works best when stationary. Any non-gravitational acceleration results in a distorted
reading of Earth’s gravitational vector, which affects the heading measurement.
4.2.4 Location-verification testing
Location-verification testing should be performed at an early stage of development to
understand and accommodate the magnetic distortion contributors in a host system.
Determine the distance range of field distortion.
Place the compass in a fixed position, then move or energize suspect components while
observing the output to determine when they are an influence.

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 10
Determine if the magnetic field is within the dynamic range of the compass.
With the compass mounted, rotate and tilt the system in as many positions as possible.
While doing so, monitor the magnetometer outputs, observing if the maximum linear
range is exceeded.
4.3 Mechanical Mounting
The TCM is factory calibrated with respect to its mounting holes. It must be aligned within
the host system with respect to these mounting holes. Ensure any stand-offs or screws used to
mount the module are non-magnetic. Refer to Section 3.2 for dimensions, hole locations, and
the reference frame orientation.
Note: Ensure that when attaching the TCM to the host system, the mounting method does not
introduce stresses on the board, as this can affect the performance of the accelerometer, and therefore
also negatively affect heading accuracy.
4.3.1 Pitch and Roll Conventions
The TCM uses a MEMS accelerometer to measure the tilt angle of the compass. This data
is output as pitch and roll data, and is also used in conjunction with the magnetometers to
provide a tilt-compensated heading reading.
The TCM utilizes Euler angles as the method for determining accurate orientation. This
method is the same used in aircraft orientation where the outputs are heading (also called
yaw or azimuth), pitch and roll. When using Euler angles, roll is defined as the angle
rotated around an axis through the center of the fuselage while pitch is rotation around an
axis through the center of the wings. These two rotations are independent of each other
since the rotation axes rotate with the plane body.
As shown in Figure 4-1, for the TCM a positive pitch is when the front edge of the board
is rotated upward and a positive roll is when the right edge of the board is rotated down.
Figure 4-1: Positive & Negative Roll and Pitch Definition

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 11
4.3.2 Mounting Orientation
The TCM can be mounted in various orientations, as shown for the TCM XB in Figure 4-2.
All reference points are based on the white silk-screened arrow on the top side of the board.
The orientation should be programmed in the TCM using TCM Studio or the kSetConfig
command. The default orientation is “STD 0°”.
Note: TCM XB is shown. The Z axis sensor and the connector are on the module’s top surface,
regardless of model.
Figure 4-2: Mounting Orientations

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 12
5 User Calibration
The magnetic sensors in the TCM are calibrated at PNI’s factory in a magnetically controlled
environment. However sources of magnetic distortion positioned near the TCM in the user’s
system will distort Earth’s magnetic field and should be compensated for in the host system with
a user calibration. Examples of such sources include ferrous metals and alloys (ex. iron, nickel,
steel, etc.), batteries, audio speakers, current-carrying wires, and electric motors. Compensation
is accomplished by mounting the TCM in the host system and performing a user calibration. It is
expected the sources of magnetic distortion remain fixed relative to the TCM’s position within the
host system. By performing a calibration, the TCM identifies the local sources of magnetic
distortion and negates their effects from the overall reading to provide an accurate heading.
As with the magnetic sensor, the accelerometer in the TCM is calibrated at PNI’s factory. But the
accelerometer will gradually change over time, and the user either will need to periodically
perform a user accelerometer calibration or return the unit to PNI for recalibration. As a general
rule-of-thumb, the accelerometer should be recalibrated every 6 to 12 months. Unlike a magnetic
calibration, the accelerometer may be calibrated outside the host system. Accelerometer
calibration is more sensitive to noise or hand jitter than magnetic calibration, especially for
subsequent use at high tilt angles. Because of this, ideally a stabilized fixture would be used for
accelerometer calibration, although resting the unit against a stable surface often is sufficient.
Key Points:
Magnetic calibration:
oRequires incorporating the TCM into the host system to compensate for magnetic
sourcing and distorting components with the user’s system.
oAllows for 4 different methods of calibration. Full-Range Calibration provides
the highest heading accuracy, while 2D and Limited-Tilt Calibration support a
limited range of motion during calibration. Hard-Iron-Only Calibration updates
just the hard-iron coefficients with a relatively easy procedure.
Accelerometer calibration requires rotating the TCM through a full sphere of coverage,
but the TCM does not need to be incorporated into the user’s system during calibration.
If the TCM will experience different states during operation, such as operating with a
nearby shutter sometimes closed and sometimes open, or operating over a broad
temperature range, then different sets of calibration coefficients can be saved for the
various states. Up to 8 magnetic calibration coefficient sets and 3 accelerometer
calibration coefficient sets can be saved.

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 13
5.1 Magnetic Calibration
Two fundamental types of magnetic distortion exist, hard-iron distortion and soft-iron
distortion. A given component can exhibit both hard-iron and soft-iron distortions. These
distortions are reviewed in the ensuing paragraphs, and are followed by discussions on
temperature effects and other considerations. For more information on magnetic distortion and
calibration, see PNI’s white paper “Local Magnetic Distortion Effects on 3-Axis Compassing”
at PNI’s website (http://www.pnicorp.com/technology/papers).
Hard-Iron Effects
Hard-iron distortions are caused by permanent magnets and magnetized objects in close
proximity to the sensors. These distortions add or subtract a fixed component to each
axis of the magnetic field reading. Hard-iron distortions usually are unchanging and in
a constant location relative to the sensors, for all heading orientations.
Soft-Iron Effects
Magnetically “soft” materials effectively bend the magnetic field near them. These
materials have a high magnetic permeability, meaning they easily serve as a path for
magnetic field lines. Unlike hard-iron effects, soft-iron effects do not increase or
decrease the total field in the area. However, the effect of the soft-iron distortion
changes as the host system’s orientation changes. Because of this, it is more difficult
to compensate for soft-iron materials.
Temperature Effects
While the hard-iron and soft-iron distortion of a system may remain quite stable over
time, normallythe distortion signature will change over temperature. As a general rule,
the hard-iron component will change 1% per 10°C temperature change. Exactly how
this affects heading depends on several factors, most notably the hard-iron component
of the system and the inclination, or dip angle.
Consider the example of a host system with a 100 µT hard-iron component. This is a
fairly large hard-iron component, but not completely uncommon. A 10°C temperature
change will alter the magnetic field by ~1 µT in the direction of the hard-iron
component. Around San Francisco, with an inclination of ~60°, this results in up to a
couple of degrees of heading change over 10°C.
Consequently, no matter how stable a compass is over temperature, it is wise to
recalibrate over temperature since the magnetic signature of the host system will
change over temperature. The TCM helps accommodate this issue by allowing the user
to save up to 8 sets of magnetic calibration coefficient sets, so different calibration
coefficients can be generated and loaded at different temperatures.

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 14
Other Considerations
The TCM measures the total magnetic field within its vicinity, which is a combination
of Earth’s magnetic field and local magnetic sources and distortions. While the TCM’s
calibration algorithms can compensate for local static magnetic sources, it is not
possible to compensate for dynamic changes in the magnetic field. Consequently, it
is recommended to keep the TCM away from dynamic magnetic fields. If this is not
possible, then take measurements only when the state of the magnetic field is known.
For example, if an electric motor is nearby take measurements only when the motor is
off. Alternatively, different sets of magnetic calibration coefficients can be generated
in advance for various states and then called when appropriate. Using the prior
example, generate and use one set of coefficients for when the motor is off and another
set for when the motor is on.
The main objective of a magnetic user calibration is to compensate for hard-iron and soft-iron
distortions to the magnetic field caused by components within the user’s host system. To that
end, the TCM needs to be mounted within the host system and the entire host system needs to
be moved as a single unit during a user calibration. The TCM allows the user to perform a
calibration only in a 2D plane or with limited tilt, but provides the greatest accuracy if the user
can rotate through 360° of heading and at least ±45°of tilt.
The following subsections provide instructions for performing a magnetic calibration of a
TCM system. Several calibration mode options exist, as summarized in Table 5-1. To meet
the accuracy specification, the number of samples should be the “Minimum Recommended”
value, or greater. Calibration may be performed using Studio or using the PNI binary protocol,
and up to 8 sets of magnetic calibration coefficients may be saved. The recommended
calibration patterns described in the following sub-sections provide a good distribution of
sample points. Also, PNI recommends the location of the TCM remain fairly constant while
only the orientation is changed.
Table 5-1: Magnetic Calibration Mode Summary
Calibration
Mode
Accuracy
Tilt Range
during Cal
Number of Samples
Minimum
Recommend
Allowable
Range
Full Range
0.3° rms
>±45°
12
10 –18
2D Calibration
<2°
<±5°
12
10 –18
Limited Tilt
Range
<2° over 2x tilt
range
±5° to ±45°
12
10 –18
Hard Iron Only
Restores prior
accuracy
>±3°
6
4 - 18

PNI Sensor Corporation DOC#1014688 r09.2
TCM User Manual Page 15
Before proceeding with a calibration, ensure the TCM is properly installed in the host system,
as discussed in Section 4. Also, the software should be properly configured with respect to the
mounting orientation, Endianness, north reference, etc.
Section 6.4 outlines how to perform a calibration using Studio, while Section 7.3.10 provides
a step-by-step example of how to perform a calibration using the PNI protocol.
5.1.1 Full-Range Calibration
A Full-Range Calibration is appropriate when the TCM can be tilted ±45°or more. This
method compensates for hard and soft iron effects in three dimensions, and allows for the
highest accuracy readings. The recommended 12 point calibration pattern is a series of 3
circles of evenly spaced points, as illustrated in Figure 5-1 and listed in Table 5-2. The
pitch used in the second and third circles of the calibration should at least match the
maximum and minimum pitch the device is expected to encounter in use.
Figure 5-1: 12 Point Full-Range Calibration
Note: While Figure 5-1 shows the location of the device changing, this is for illustration purposes and
it is best for the location of the device to remain constant while only the orientation is changed.
This manual suits for next models
3
Table of contents
Other PNI Measuring Instrument manuals