PNI TCM2.6 User manual

PNI Corporation
TCM2.5 and TCM2.6
Tilt Compensated 3-axis Compass Module

Page 2 of 48
© Copyright
PNI Corporation 2005
All Rights Reserved. Reproduction, adaptation, or
translation without prior written permission is prohibited,
except as allowed under copyright laws.
Part No. 12413
Document No. 1007535
Revision 5
April 2006
Printed in USA
PNI Corporation
133 Aviation Blvd, Suite 101
Santa Rosa, CA 95403, USA
Tel: (707) 566-2260
Fax: (707) 566-2261
Conventions Used in this Manual.
Any data that is sent to or received from the
TCM2.5/2.6 is presented in monospace font, for
example: $C326.3*checksum<cr><lf>. Place
markers for ASCII characters are indicated by the
character “n.” Any monospace characters in straight
brackets denote transmitted data that may or may not
be in the character string, depending on the
circumstances. For instance [Ennn] is the error code
string that is output by the TCM2.6 only when an error
condition exists. Also,(-) denotes the presence of a
negative sign in a character string when the
corresponding value is negative. The parentheses are
not included in the output string, and only serve to
demark the hyphen.
TCM2.6 commands can be identified either by their
mnemonic, for example, h, or by their full name, for
example, Halt continuous sampling.
Items in angle brackets either denote special characters
or summary data, for example, <cr> denotes the
carriage return character, <lf> denotes a line feed, and
<error code> denotes all the characters for an error
code string.
Warranty and Limitation of Liability. PNI 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 to replace 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.

Page 3 of 48
About the TCM2.5/2.6
Thank you for purchasing the TCM2.5/2.6. The TCM2.5 has been designed as a drop-in replacement for
PNI Corporation’s TCM2 family of products. The TCM2.5 uses the same board size, interface connector,
and RS-232 protocol as the TCM2 modules to allow for ease of integration with existing systems. The
TCM2.6 has all the features of the TCM2.5, but is about half the size and weight and has an extended
temperature range.
The TCM2.5/2.6 are the choice for existing applications that require compatibility with PNI Corporation’s
TCM2 family of products.
The TCM2.5/2.6 integrates 3-axis magnetic field sensing, 2-axis tilt sensing, and compass heading into a
single module. Advantages include compatibility with existing systems, low power consumption, large
signal noise immunity under all conditions, and a large magnetic field measurement range.
The TCM2.5/2.6 combines PNI Corporation’s patented Magneto-Inductive (MI) sensors and measurement
circuit technology with a MEMS accelerometer for unparalleled cost effectiveness and performance. The
MI sensor changes inductance by 100% over its field measurement range. This variable inductance
property is used in a cost and space efficient ASIC (PNI 11096) which incorporates a temperature and
noise stabilized oscillator/counter circuit which is inherently free from offset drift.
The TCM2.5/2.6’s advantages make it suitable for many applications, including:
• Remote terrestrial antenna direction indicators
• Side-scan sonar
• ROV, AUV control
• Survey equipment
• Robotics systems
• Vehicle detection
With its many potential applications, the TCM2.5/2.6 provides a command set designed with flexibility and
adaptability in mind. Many parameters are user-programmable, including reporting units, a wide range of
sampling configurations, output damping, and more. We hope the TCM2.5/2.6 will help you to achieve the
greatest performance from your target system. Thank you for selecting the TCM2.5/2.6.

Page 4 of 48
Installation
This section describes how to configure, program, and control the TCM2.5/2.6 in your host system. To
install the TCM2.5/2.6 into your system, follow these steps:
• Make electrical connections to the TCM2.5/2.6
• Evaluate the TCM2.5/2.6 using the included TCM Studio Program
• Choose a mounting location
• Mechanically mount the TCM2.5/2.6
• Perform user calibration
Electrical Connections
Included with the TCM2.5/2.6 Interface Kit is a cable to allow for the unit to be connected to your host
system. On one end of the cable is the connector needed to mate with the TCM2.5/2.6. The cable’s
wires are color coded as indicated below.
PNI also has a 6-foot cable with a DB9 connector attached. Contact PNI Corporation for purchasing
information.
Table 1: TCM2.5/2.6 PIN Descriptions
PIN Wire Color TCM2.5 PIN Description PIN Wire Color TCM2.6 PIN Description
1 Orange Vsupply (5 V regulated) 1 Black Power Ground
2 Red Vsupply (6 to 18 V unregulated) 2 Gray NC
3 Black Power Ground 3 Green RS232 Ground
4 Blue RxD (RS-232) -5 to 5V 4 Orange NC
5 Yellow TxD (RS-232) -5 to 5V or -12 to 12V 5 Violet NC
6 White RTS, Wake from Sleep 6 Brown NC
7 Green Data Ground 7 Yellow TxD
8 Brown NC 8 Blue RxD
9 Purple NC 9 Red 5 VDC
10 Gray Data Ground

Page 5 of 48
RS-232 Serial Communication Interface
Parameters 8 data bits, 1 start bit, 1 stop bit, no parity, flow control none
Baud Rate 300 to 115200
Communicating with the TCM2.5/2.6
Once the TCM2.5/2.6 is powered up and the RS232 connection is made with one of the PC’s COM ports,
you may begin exchanging ASCII serial data with the TCM2.5/2.6. The most direct means is to run any
modem or terminal emulation software. Specify the COM port that you have the TCM2.5/2.6 connected to
and set the baud rate to the same baud rate of the TCM2.5/2.6. The default baud rate for the TCM2.5/2.6
is 9600. Remember that the TCM2.5/2.6 does not echo characters by default, so you may wish to select
the echo output option in your terminal emulation program or press <Ctrl> eon the keyboard.
TCM Studio – Evaluation Program
The TCM2.5/2.6 evaluation software communicates with the TCM2.5/2.6 through the COM port of your
PC. It provides an easy to use interface, so that instead of issuing command codes manually, you can
use buttons, check boxes, and dialog boxes. It reads the Binary responses of the TCM2.5/2.6 output
strings and formats its sensor data into labeled and easy-to-read data fields. The program also includes
the ability to log and save the outputs of the TCM2.5/2.6 to a file. All of this is so that you may begin to
learn the capabilities of the TCM2.5/2.6 while using the TCM Studio program’s more friendly interface.
To install the TCM Studio program onto a Windows system:
1. Drag the “TCM Studio.exe” to the working directory of your computer.
2. Move the Quesa plug-in (Quesa.dll) into either the Windows System or System32 folder. Quesa
is the OpenGL rendering engine and the 3D Model of the TCMStudio will not run without it.
• For Windows 2000/NT copy to: /WinNT/System32 folder
• For Windows XP copy to: /Windows/System32 folder
To Install the TCM Studio program onto a Mac OSX system:
1. Drag the “TCM Studio” to the working directory of your computer.
2. Move the Quesa plug-in (Quesa) to: /Library/CFMSupport
Hardware Setup:
1. Connect the unit to a serial port of the PC via the included cable. (A USB to Serial Adapter can
be used; Keyspan USA-19QW was tested.)
2. Supply power

Page 6 of 48
[Connection Tab]
Initial Connection:
1. Select the serial port the unit is plugged into.
2. Select 9600 as the baud rate (default).
3. Click on the <Connect> button.
4. Once a connection is made the “Connected” light will turn green.
Change Baud Rate:
1. Select new baud rate for the module.
2. Select same baud rate for the computer.
3. Click on the <Connect> button.
Change Modules:
Once connection has been made, the TCM Studio will remember the last settings. Any time a
module is switched out, clicking on the <Connect> button once the new module is attached will
reestablish a connection as long as the module baud rate is the same as the previous unit.
[Configuration Tab]
North Reference:
Magnetic: When the “Magnetic” radio button is selected, heading will be relative to Magnetic North.
True: When the “True” radio button is selected, heading will be relative to True North. To use North
Heading in “True” mode, the declination needs to be set in the “Declination” window.
Options:
Use to select halting continuous output by sending a single “h” command.
Damping:
Enabled: Use to select if the filter (damping) is to be used
Time Const: Use to select 4, 8, 16, or 32 samples and apply the values to a filter prior to calculating
the heading. These filters allow for a much more stable reading, but can make the acquisition of the
data by the program slower. The default setting is 8.

Page 7 of 48
Reading Units:
Compass: Use to select either Degrees or Mils as the unit of measure.
Inclinometer: Use to select either Degrees or Mils as the unit of measure.
Temperature: Use to select either Celsius or Fahrenheit as the unit of measure.
Default:
This button will set the TCM2.5/2.6 module back to the factory default settings for the parameters
shown on the screen.
Note: This is similar, but with less parameters, to the factory command.
[Calibration Tab]
Start (stop)
Toggle button to begin and end calibration
Calibration Procedure:
1. Click on the <Start> button to begin.
2. Begin rotating the TCM2.5/2.6 in a circle while applying pitch and roll to the unit. The unit will
have the appearance of a “wobbling top” as it is moved through the calibration routine.
3. Turn the TCM2.5/2.6 around at least twice changing the pitch and roll as much as possible.
4. Each turn should take longer than 30 seconds. The turn does not need to be a perfect circle. In
the calibration mode, the TCM2.5/2.6 is trying to take as many different data points as possible to
determine the magnetic anomalies. The more pitch and roll points you give it, the better it is able
to determine the vertical magnetic fields. If possible, apply as close to a ± 90ÛSLWFKDQGÛ
roll. Doing so will improve the quality of the calibration. Do not worry about exceeding the tilt
range of the unit.
5. Once two complete rotations have been completed, click on the <Stop> button to finish the
calibration.
Score
The TCM2.5/2.6 provides feedback on calibration through the calibration score, which has the
following format: “...HnVnMn.n....”
The first two numbers in the calibration score, HnVn, respectively describe the quality of the
calibration for the horizontal component and vertical component of the host system’s local magnetic
field. Higher numbers reflect higher quality. The highest possible score is a “9”. The factors that
contribute to a good score for Hn and Vn are as follows:
a good, magnetically quiet location was chosen for the user calibration procedure.
the magnetic environment is stable; there are no large sources of changing fields.
the calibration data points included changes in system heading and inclination to
allow for proper measurement of the horizontal and vertical field vectors.
there are no significant soft-iron distortion effects.

Page 8 of 48
The last number in the score, Mn.n, describes the magnitude of local field. Larger numbers denote
strong local fields. Small local fields are preferable, since less correction will be necessary, and
they utilize less of the magnetometers’ dynamic range. A magnitude score greater than 30
indicates strong magnetic fields at the TCM2.5/2.6 location; you should consider alternative
mounting locations. Any score less than 10 is very good.
Note: The calibration score values mostly provide a qualitative estimation. For example, a
good score would be H9V9Mn.n. A poor score as anything less than H9V9Mn.n. A poor V
score generally indicates that you need to tilt more during the calibration. A poor H score
indicates you did not turn two full circles or that you turned too quickly.
6. If the calibration is not sufficient then click on the <Start> button and begin the calibration again.
Clear:
This button will clear the user calibration in the unit. Once selected, the unit will revert back to its
factory calibration.
[Test Tab]
Current Reading:
Once the <GO> button is selected the unit will begin outputting Heading, Pitch and Roll information.
Selecting the <Stop> button or changing tabs will halt the output of the unit.
3D Model:
The helicopter will follow the movement of the attached module and give a clear representation of the
module’s orientation.
[Data Logger Tab]
1. Select the data to log in the “Data” window.
2. Use Shift-Ctrl-Click and Ctrl-Click to select multiple items.
3. Click on the <GO> button to start logging; click the <STOP> button to stop logging.
4. Click on the <Export> button to save the data to a file.
5. Click on the <Clear> button to clear the data from the window.
[System Log Tab]
Export:
Select the <Export> button to save the system log to a file.

Page 9 of 48
Where to install the TCM2.5/2.6
The TCM2.5/2.6’s magnetometers’ wide dynamic range and its sophisticated calibration algorithms allow
it to operate in many environments. For optimal performance however, you should mount the TCM2.5/2.6
with the following considerations in mind:
The TCM2.5/2.6’s magnetometers should not saturate
The TCM2.5/2.6 can be calibrated for large static magnetic fields. However, each axis of the
TCM2.5/2.6’s magnetometers has a maximum dynamic range of ±80 µT; if the total field exceeds
this value for any axis, the TCM2.5/2.6 will not give accurate heading information. When
mounting the TCM2.5/2.6, consider the effect of any sources of magnetic fields in the local
environment that when added to the earth’s field may saturate the TCM2.5/2.6’s sensors. 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.
Locate the TCM2.5/2.6 away from local sources of changing magnetic fields
It is not possible to calibrate for changing magnetic anomalies. Thus, for greatest accuracy, keep
the TCM2.5/2.6 away from sources of local magnetic anomalies that will change with time; for
instance, electric equipment that will be turned on and off or nearby ferrous bodies that will be
changing positions. Make sure the TCM2.5/2.6 is not mounted close to cargo or payload areas
that may be loaded with large sources of local magnetic fields.
The TCM2.5/2.6 should be mounted in a physically stable location
Choose a location that is isolated from excessive shock, oscillation, and vibration.

Page 10 of 48
Mechanically mounting the TCM2.5/2.6
Refer to the TCM2.5/2.6 Dimensional Specification later in this manual for the TCM2.5/2.6 board
dimensions and the orientation of the reference frame.
The TCM2.5/2.6 is factory calibrated with respect to the mounting holes, as shown below, thus it must be
aligned within the host system with respect to these mounting holes, not the board edges.
Figure 1: TCM2.5 Mounting Diagram
Figure 2: TCM2.6 Mounting Diagram

Page 11 of 48
Using the TCM2.5/2.6
RS232 Data Output Word
The TCM2.5/2.6 sends an “output word” in ASCII across the RS232 serial link when issued the s? (Single
Output Word) command, or when in go (Continuous Sampling) mode. This data output word may be
configured by the user for the desired format and configuration. You may select either NMEA 0183, or
TCM2 standard output word formats, with the sdo= (Set RS-232 Output Word) command.
NMEA 0183 Format
The TCM2.5/2.6 can be configured to conform to the NMEA (National Maritime Electronics Association)
0183 specification, which describes a standard RS232 bus format for exchange of a variety of navigation
information (GPS, radar, compass, and so on). In the NMEA output format, only compass heading
information is available. Inclinometer, magnetometer, thermometer data and the distortion detection
warning are all unavailable.
$HCHDM,<compass>,M*checksum<cr><lf> !for magnetic heading
For example,
$HCHDM,182.3,M*checksum<cr><lf> !for magnetic heading = 182.3 °
The checksum value is the result of XOR’ing the ASCII bytes between the ‘$’ and ‘*’ characters. This one
byte value is reported in the output word by two ASCII characters representing two hex digits, with the
most significant nibble first. For example, “...*A3<cr><lf>” indicates that the output word has a
decimal checksum value of 163.

Page 12 of 48
TCM2.5/2.6 Standard Output
The TCM2.5/2.6 standard output format may be configured to provide all of the sensor data parameters
available, or only those parameters required.
$C<compass>P<pitch>R<roll>X<Bx>Y<By>Z<Bz>T<temp>E<error
code>*checksum<cr><lf>
View the sections covering the commands: c? (Compass Update), m? (Magnetometer Update), i?
(Inclinometer Update), t? (Temperature Update) for detailed information regarding the character
formatting and resolution of the values for each of the data parameters in the output word.
Example
The TCM2.5/2.6 will return the following:
$C328.3P28.4R-12.4X55.11Y12.33Z-18.43T22.3E001*checksum<cr><lf>
under the following conditions:
• compass heading = 328.3 °(true or magnetic, depending on configuration)
• pitch = 28.4 °
• roll = -12.4 °
• Bx = 55.11µT (x-component of magnetic field)
• By = 12.33 µT (y-component of magnetic field)
• Bz = -18.43 µT (z-component of magnetic field)
• Temperature = 22.3 °(F/C depending on configuration)
• E001 = Distortion flag is raised–magnetic anomaly nearby
Any parameters not enabled are not included in the output word.
For example:
$C328.3T22.3*checksum<cr><lf> !for compass and thermometer information only.
The checksum value is computed and reported identically to that for the NMEA output format.

Page 13 of 48
Command Syntax
There are three types of commands you may issue to the TCM2.5/2.6:
• User Configuration Parameter commands which set user-definable parameters.
• Request for Data commands which query the TCM2.5/2.6 for data or for the stored value of user-
definable parameters.
• Action commands which prompt the TCM2.5/2.6 to perform a specific action.
All commands must be followed with a <cr>, or <cr><lf>. The <lf> characters are ignored by the
TCM2.5/2.6, but are supported to allow compatibility with a variety of terminals.
Programming Conventions
Set TCM2.5/2.6 user parameters: <parameter>=<value><cr>
Query TCM2.5/2.6 data (parameter or sensor values): <parameter>?<cr>
Action command: <command><cr>
Detailed descriptions of all commands are in the “Command List” and a command summary is shown in
“Command List Quick Reference”
Data Transmission
The TCM2.5/2.6 will transmit data across the RS-232 interface in response to input commands, and will
also transmit data output words automatically when placed in continuous output mode. The response to
the various commands is as follows:
Input Command TCM2.5/2.6 Response
Valid parameter-setting commands :<cr><lf>
Valid action command varies according to command
Valid Parameter query commands :<parameter>=<value><cr><lf>
Invalid, or unrecognized command :E<code><cr><lf>
Valid sensor query command varies according to command
The ‘:’ character signifies a successfully identified and executed command.
Table 2: Input Command Responses

Page 14 of 48
Error Codes
Error codes are given in the output word immediately before the checksum output indicated by the letter
“E” followed by three ASCII characters representing hexadecimal digits (for example, ASCII F equals
hexadecimal value F, or decimal value 15). Each error condition corresponds to one bit within one of the
hexadecimal digits. When the error condition exists, that bit will be set equal to 1 in the error code
transmitted by the TCM2.5/2.6. The error conditions and their corresponding bit locations are listed below.
Refer to Table 4: Common Error Codes for a list of the most common error codes.
Table 3: Bit Locations of Error Conditions
1st ASCII Character
Bit 3 (MSB) EEPROM1 error
Bit 2 EEPROM2 error
Bit 1 Reserved for future use (always 0)
Bit 0 (LSB) Reserved for future use (always 0)
2nd ASCII Character
Bit 3 (MSB) Reserved for future use (always 0)
Bit 2 Command parameter invalid
Bit 1 Reserved for future use (always 0)
Bit 0 (LSB) Command invalid or not supported on
current TCM
3rd ASCII Character
Bit 3 (MSB) Reserved for future use (always 0)
Bit 2 Magnetometer out of range
Bit 1 Inclinometer out of range
Bit 0 (LSB) Reserved for future use (always 0)
Table 4: Common Error Codes
Error Code Description
E002 Inclinometer out of range
E004 Magnetometer out of range
E006 Magnetometer out of range + Inclinometer out of range
E010 Command invalid or not available
E040 Command parameter invalid
E050 Command invalid or not available + Command parameter invalid
E400 EEPROM2 error a
E800 EEPROM1 error a
EC00 EEPROM2 error + EEPROM1 error a
a. Indicates that the TCM2.5/2.6 EEPROM has been corrupted. Contact PNI for assistance.

Page 15 of 48
Description of Error Conditions
Command Parameter Invalid – contains an invalid or out of range value.
Command invalid or not available on current model of TCM2 – is not recognized by the
TCM2.5/2.6. The syntax is incorrect, or you have entered a command which is not supported by the
TCM model you are using.
Inclinometer out of range – the inclinometer sensor is detecting an attitude that is outside of its
operational range of maximum pitch and roll. When this error flag is raised, compass and inclinometer
output data should be disregarded.
Magnetometer out of range – the magnetometer sensors are detecting an ambient magnetic field that
exceeds the maximum field measurement range of the magnetometer in any of the three axes.
Compass Operating Modes
Standby Mode
The TCM2.5/2.6 is in Standby mode when you issue an h (Halt) command or ax (Warm Reboot). You
may configure and verify the TCM2.5/2.6’s user parameters in the Standby mode (set sampling rate, filter
parameters, and so on.) You may also query the TCM2.5/2.6 for single updates of compass heading,
pitch and roll, magnetic field strength, and temperature.
Sampling in Standby Mode
You can receive data from the TCM2.5/2.6 sensors from the h (Halt Continuous Sampling, Enter
Standby) mode. You may wish to do this if you are manually operating the TCM2.5/2.6 for evaluation
purposes, or if the TCM2.5/2.6 only needs to be polled periodically. With the TCM2.5/2.6 in the Standby
mode, you can query sensor data by either issuing single parameter updates with commands like c?
(Compass Update), m? (Magnetometer Update) or you can receive output word updates by issuing the
s? (Single Update of Output Word) command. The output word may be configured as previously
described in “TCM2.5/2.6 Standard Output” to provide either NMEA formatted compass data, or the
TCM2.5/2.6 Standard output word, which presents any combination of TCM2.5/2.6 sensor data that you
wish to receive. The single parameter updates allow you to immediately query any sensor data.
Continuous Sampling Mode
After configuring the TCM2.5/2.6 in the Standby mode, issue the go command to place the TCM2.5/2.6
into Continuous Sampling mode. In this mode, the TCM2.5/2.6 samples its sensors, processes, and
outputs this sensor data at a rate determined by the SP parameter, default is 8 Hz.

Page 16 of 48
User Calibration
All compasses can perform well in a controlled environment, where the ambient magnetic field consists
solely of the earth’s field. In most practical applications, however, an electronic compass module will be
mounted in a host system such as a vehicle that can contain large sources of local magnetic fields:
ferrous metal chassis, transformer cores, electrical currents, and permanent magnets in electric motors.
By performing the user calibration procedure, you allow the TCM2.5/2.6 to identify the major sources of
these local magnetic anomalies and subsequently cancel out their effects when measuring the earth’s
magnetic field for computing compass headings. When you perform the user calibration procedure, the
TCM2.5/2.6 takes a series of magnetic field measurements. It analyzes these total field measurements in
order to identify the components that are created by the earth’s field, which is the desired signal, from
those components that are generated by the local environment, which we wish to subtract out.
The end goal of the procedure for the TCM2.5/2.6 is to have an accurate measurement of the static three-
dimensional magnetic field vector generated by its host system at its mounting location. This vector is
subsequently subtracted out of run-time field measurement to yield the resultant earth’s field vector.
One major benefit from the TCM2.5/2.6’s triaxial magnetometer/triaxial inclinometer system configuration
is its ability to compensate for distortion effects in all orientations throughout its usable tilt range. As we
have mentioned, a compass must measure the local field vector generated by the host system at its
current position within the system in order to accurately calibrate. Because the TCM2.5/2.6’s
magnetometer is strapped-down, or fixed with respect to its host system, this local field vector does not
change as the host system’s attitude changes, allowing the TCM2.5/2.6 to accurately compensate in all
pitch and roll orientations. Gimbaled fluxgates, for instance, are unable to provide accurate calibration in
non-level orientations because its magnetometers, being gimbaled, change position with respect to the
host system as attitude changes. This presents a different local distortion field than that measured during
calibration.

Page 17 of 48
Multipoint Calibration (mpcal)
Key Points
• Tilt as much as possible during the calibration. This allows the compass to take full advantage of
the 3-axis magnetometer.
• Move slowly, take as much as 30 seconds to complete a circle. You are trying to get an even
sampling of the magnetic field over as many headings and tilts as possible.
• Pay attention to the calibration score. Performance will be compromised if you accept a low
score.
• If you get a poor calibration, clear it before making a new calibration.
Procedure
1. Clear any previous calibration by sending cc.
2. Enable multipoint calibration by sending mpcal=e.
3. Put the TCM2.5/2.6 into continuous mode by sending go.
4. Begin rotating the TCM2.5/2.6 in a circle while applying pitch and roll to the unit. The unit will have
the appearance of a “wobbling top” as it is moved through the calibration routine.
• Turn the TCM2.5/2.6 around at least twice changing the pitch and roll as much as possible. Each
turn should take longer than 30 seconds. The turn does not need to be a perfect circle.
• In the calibration mode, the TCM2.5/2.6 is trying to take as many different data points as possible
to determine the magnetic anomalies.
• The more pitch and roll points you give it, the better it is able to determine the vertical magnetic
fields.
• Apply as close to a ± 90ÛSLWFKDQGÛUROODVSRVVLEOH'RLQJVRZLOOLPSURYHWKHTXDOLW\RIWKH
calibration. Do not worry about exceeding the tilt range of the unit.
5. Halt the TCM2.5/2.6 by sending h if halt=e; or h <return> if halt=d.
6. Finish the calibration by sending mpcal=d.
7. Check the calibration score by sending lc?.
• If the calibration score is not satisfactory, repeat the calibration process

Page 18 of 48
Interpreting the Calibration Score
The TCM2.5/2.6 provides feedback on calibration through the calibration score, which has the
following format: “...HnVnMn.n....”
The first two numbers in the calibration score, HnVn, respectively describe the quality of the
calibration for the horizontal component and vertical component of the host system’s local mag-
netic field. Higher numbers reflect higher quality. The highest possible score is a “9”. The factors
that contribute to a good score for Hn and Vn are as follows:
• a good, magnetically quiet location was chosen for the user calibration procedure.
• the magnetic environment is stable; there are no large sources of changing fields.
• the calibration data points included changes in system heading and inclination to allow for
proper measurement of the horizontal and vertical field vectors.
• there are no significant soft-iron distortion effects.
The last number in the score, Mn.n, describes the magnitude of local field. Larger numbers
denote strong local fields. Small local fields are preferable, since less correction will be necessary,
and they utilize less of the magnetometers’ dynamic range. A magnitude score greater than 30
indicates strong magnetic fields at the TCM2.5/2.6 location; you should consider alternative
mounting locations. Any score less than 10 is very good.
Note: The calibration score values mostly provide a qualitative estimation. For example, a good
score would be H9V9Mn.n. A poor score as anything less than H9V9Mn.n. A poor V score gen-
erally indicates that you need to tilt more during the calibration. A poor H score indicates you did
not turn two full circles or that you turned too quickly.
Soft Iron Effects
The TCM2.5/2.6 can calibrate for hard iron effects, or local fields that can be modeled as static
fields such as those created by permanent magnets. Hard iron distortions are significant in most
systems. There is another class of iron effects, soft iron, that are an amplification of magnetic
fields created by highly permeable materials, such as ferrous metals. The TCM2.5/2.6 does not
compensate for soft iron effects. Soft iron effects, however, are generally far weaker than hard
iron effects in most systems, and can be more readily defeated by choosing a suitable location to
mount your compass module.
In some systems, however, it may be difficult to avoid large masses of ferrous metal that may
create non-trivial soft iron effects, such as an armor plate in a tracked vehicle. In these instances,
try to locate the module as far away from the ferrous metals as possible. Soft iron effects
decrease with distance by an inverse square relation so even modest separation can be effective.
Other Limitations
As discussed, the TCM2.5/2.6 models local disturbances as a static magnetic vector contribution
to the earth’s field. Any local fields, which are not static, will create errors. You cannot calibrate
for anomalies that are not fixed with respect to the compass. For example, you may know that the
TCM2.5/2.6 will be used in close proximity to other vehicles. You cannot calibrate for the effects
of these other vehicles, as they will be moving with respect to the TCM2.5/2.6. This is a limitation
universal to all compasses. Consider, therefore, the TCM2.5/2.6’s position relative to any
potential sources of field that will not be static: magnetic cargo or payloads that may be placed in
close proximity, fans or other electrical equipment that may be turned on and off, and so on.
The TCM2.5/2.6 can calibrate for any environment that creates a magnetic field that does
not exceed the dynamic range of its magnetometers.

Page 19 of 48
Declination Value
Declination, also called magnetic variation, is the difference between true and magnetic north, relative to
a point on the earth. It is measured in degrees east or west of true north. Correcting for declination is
accomplished by storing the correct declination angle, and then changing the heading reference from
magnetic north to true north. Declination angles vary throughout the world, and change very slowly over
time. For the greatest possible accuracy, go to the National Geophysical Data Center web page below to
get the declination angle based on your latitude and longitude: http://www.ngdc.noaa.gov/cgi-
bin/seg/gmag/fldsnth1.pl
Pitch and Roll
The TCM2.5/2.6 uses accelerometers to measure the orientation of the compass with respect to gravity.
Since the compass also measures the complete magnetic field, the TCM2.5/2.6 can correct for the tilt of
the compass to provide an accurate heading.
The TCM2.5/2.6 utilizes Euler angles as the method for determining accurate orientation. This method is
the same used in aircraft orientation where the outputs are Heading (Yaw), Pitch and Roll. When using
Euler angles pitch and roll are defined as the angle rotated around an axis through the center of the
fuselage; 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.
For the TCM2.5/2.6 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 downward.
Figure 3: TCM2.5 Pitch & Roll Axes
Figure 4: TCM2.6 Pitch & Roll Axes

Page 20 of 48
Programming Commands
Table 5: Command List Quick Reference
Command Description
Request for Data Commands
c? Compass Update
i? Inclinometer Update
lc? Query Last Calibration Score
m? Magnetometer Update
s? Single Update Output Word
t? Temperature Update
Action Commands
cc Clear Calibration Data
factory Factory Settings
go Enter Continuous Mode
h Halt Continuous Sampling, Enter Standby
halt= Enable Single Character Halt
mpcal= Multipoint Calibration
sleep Sleep Mode (improved sleep mode over TCM2)
wake Wake Mode (requires separate program and connection of RTS pin)
ax Warm Reboot
User Configuration Parameter Commands
b= Set Baud Rate
damping= Enable Filter for damping of output
ec= Enable Compass Data for Output Word
em= Enable Magnetometer Data for Output Word
ep= Enable Pitch Data for Output Word
er= Enable Roll Data for Output Word
et= Enable Temperature Data for Output Word
ma= Select Magnetometer Output Option
mag_dec= Set Declination Angle
sdo= Set RS232 Output Word Format
sn= Select Magnetic or True North
timeconst= Set the value for filtering (damping) of outputs.
uc= Set Compass Units
ui= Set Inclinometer Units
ut= Set Temperature Units
This manual suits for next models
1
Table of contents
Other PNI Computer Hardware manuals
Popular Computer Hardware manuals by other brands

Xiaomi
Xiaomi Mi Electric Scooter M365 Repair manual

Microchip Technology
Microchip Technology VSC8211 manual

NETGEAR
NETGEAR WPN511 - RangeMax Wireless PC Card user manual

Thermaltake
Thermaltake Pacific PR12-D5 Plus quick start guide

BBV
BBV CTI/1 installation guide

Intel
Intel RT3WB080 Hardware user's guide