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...
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.
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...
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 TCM XB 3.8 to 9 VDC Supply Voltage TCM MB 3.3 to 9 VDC High Level Input 2.4 V minimum...
Table 3-4: I/O Characteristics Parameter Value Communication TCM XB RS232 UART Interface TCM MB CMOS/TTL UART Communication Protocol PNI Binary Communication Rate 300 to 115200 baud Maximum Sample Rate ~30 samples/sec Initial power up <210 ms Time to Initial Good Data Sleep Mode recovery <80 ms...
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 6...
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 7...
Blue 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.
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 9...
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...
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.
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.
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).
“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.
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. Full-Range Calibration 5.1.1 A Full-Range Calibration is appropriate when the TCM can be tilted ±45°...
-5° to +5°. The recommended 12 point calibration pattern is a circle of evenly spaced points, as given in Table 5-3. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
Additionally, the accelerometer data is critical for establishing an accurate heading reading when the TCM is tilted, as discussed in the PNI white paper “Tilt- Induced Heading Error in a 2-Axis Compass”, which can be found on PNI’s web site (http://www.pnicorp.com/technology/papers).
For this reason PNI recommends the accelerometer be recalibrated every 6 to 12 months. The user may return the TCM to PNI for accelerometer calibration, or the user may perform a user accelerometer calibration. The remainder of this section covers the user accelerometer calibration.
The TCM allows for a simultaneous magnetometer and accelerometer calibration. This requires a full-coverage calibration pattern, physically stable measurements, and installation in the user’s system so the host system’s magnetic signature is present. PNI recommends 18 to 32 calibration points for a Mag-and-Accel Calibration.
Note: TCM Studio v3.X and higher is compatible with the TCM XB, TCM MB and legacy TCM 6, but not other legacy TCM models. The TCM XB also will work with TCM Studio v3 and higher, while the TCM MB will work with TCM Studio v4 and higher.
Connection Tab Initial Connection 6.2.1 If using the PNI dual-connectorized cable, ensure the batteries are well-charged. Select the serial port the module is plugged into, which is generally COM 1. Select 38400 as the baud rate. Click the <Connect> button if the connection is not automatic.
TCM Studio supports 16 mounting orientations, as illustrated previously in Figure 4-2. The descriptions in TCM Studio are slightly different from those shown in Figure 4-2, and the relationship between the two sets of descriptions is given below. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
“Declination” window. Endianess 6.3.3 Select either the <Big> or <Little> Endian button. The default setting is <Big>. See Sections 7.2 and 7.3 for additional information. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 24...
Note that the inverse of the Poll Delay is greater than the sample rate, since the Poll Delay does not include the actual measurement acquisition time. The default is 0. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
If the user wants to have more control over when the point will be taken, then Auto Sampling should be deselected. Once deselected, the <Take Sample> button on the Calibration tab will be active. Selecting PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
Clicking this button restores the TCM Studio program to the factory default settings. Retrieve 6.3.11 Clicking on this button causes TCM Studio to read the settings from the module and display them on the screen. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 27...
Once the pre-set number of samples has been taken (as set on the Configuration tab) the calibration is complete. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
Calibration, this ideally should be ≈2°. For Limited Tilt Range Calibration the value should be as large a possible given the user’s constraints. Accel CalScore Represents the over-riding indicator of the quality of the accelerometer calibration. Acceptable scores will be <1. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 29...
To save this action in non- volatile memory, click the <Save> button. It is not necessary to clear the current calibration in order to perform a new calibration. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
“Enable 3D Model Display” box is selected on the Configuration tab. Acquisition Settings 6.5.3 These indicators mimic the pertinent selections made on the Configuration tab. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 31...
Sync Mode. Note that <Sync Trigger> sends a 0xFF signal as an external interrupt to wake up the module. This is not done for the first reading as the module is already awake. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
Click the <Export> button to save the data to a file. Click the <Clear> button to clear the data from the window. Note: The data logger use ticks for time reference. A tick is 1/60 second. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
The graph can be used to visually see hard and soft iron effects within the environment measured by the TCM, as well as corrected output after a user calibration has been performed. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
TCM Studio. Closing TCM Studio will erase the system log. Select the <Export> button, at the bottom right of the screen, to save the system log to a text file. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
Operation with PNI Binary Protocol The TCM utilizes a binary communication protocol, where the communication parameters should be configured as follows: Table 7-1: UART Configuration Parameter Value Number of Data Bits Start Bits Stop Bits Parity none Datagram Structure The data structure is shown below:...
Parameter Formats Note: Floating-point based parameters conform to ANSIring/IEEE Std 754-1985. Please refer to the Standard for more information. PNI also recommends refer to the user’s compiler instructions to understand how the compiler implements floating-point format. 64-Bit Floating Point (Float64) The 64-bit float format is given below in big Endian.
Page 43
UInt32-based parameters are unsigned 32-bit numbers. 24 23 16 15 Big Endian 0 15 8 23 Little Endian Unsigned 16-Bit Integer (UInt16) UInt16-based parameters are unsigned 16-bit numbers. Little Endian Big Endian PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 38...
Queries for the FIR filter settings for the kGetFIRFilters magnetometer & accelerometer sensors. Contains the FIR filter settings for the kGetFIRFiltersResp magnetometer & accelerometer sensors. kPowerDown Powers down the module kSaveDone Response to kSave PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 39...
Note that the Type and Revision can be decoded from the binary format to character format using the ASCII standard. For example, the hex string “00 0D 02 54 43 4D 35 31 32 30 PNI Sensor Corporation DOC#1014688 r09.2...
38 C7 87” can be decoded to read “TCM5 1208”. Also, the TCM XB is referenced as Type “TCM6” since the number of Type characters is limited to 4. kSetDataComponents (frame ID 3 7.3.3 This frame defines what data is output when kGetData is sent. Table 7-3 summarizes the various data components and more detail follows this table.
Payload ID Count ID 1 Value ID 1 ID 2 Value ID 2 ID 3 Value ID 3 ID Specific ID Specific UInt8 UInt8 UInt8 ID Specific UInt8 PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 42...
To save these in non-volatile memory, the kSave command must be issued. Payload Config ID Value UInt8 ID Specific Example: To configure the declination, the payload would look like: Payload 10.0 Declination ID Declination Angle (Float32) PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 43...
If set to FALSE, the module waits for kTakeUserCalSample to take a sample with the condition that a magnetic field vector component delta is greater than 5 µT from the last sample PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
Page 51
the kSetConfig frame is sent with kMagCoeffSet = 2 a calibration is performed the kSave frame is sent the kSetConfig frame is sent again, but with kMagCoeffSet = 3, and a calibration is performed. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 46...
The response to kGetConfig is given below and contains the configuration ID and value. Payload Config ID Value UInt8 ID Specific Example: If a request to get the set declination angle, the payload would look like: Payload 10.0 Declination ID Declination Angle (Float32) PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 47...
On powering up, the last saved calibration coefficients will be loaded. This frame commands the module to start a user calibration. After sending this command, the module ensures a PNI-established stability condition is met, takes the first calibration point, and then responds with kUserCalSampCount. kUserCalSampCount will continue to be sent after each sample is taken.
Page 54
Using the kSetConfig command, establish the coefficient set number for the new calibration coefficient by setting the value for kMagCoeffSet (value 0-7) and/or kAccelCoeffSet (value 0-2). Using the kSetConfig command again, set kUserCalNumPoints to the appropriate number of calibration points. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 49...
This can be useful if a significant change in heading has occurred since the last reading, as the old heading data would be in PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
RS-232 driver. However, the driver chip has a feature to keep the Rx line enabled. The TCM will power up when it receives any signal on the native UART Rx line. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
This score represents the over-riding quality of the accelerometer calibration. An acceptable score is ≤1. In the event of an aborted calibration the score will be 179.8 or in the event of a mag-only calibration the score will be 99.99 PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
SampleDelay parameter. The frame has no payload. The response is kGetDataResp. kStopContinuousMode (frame ID 22 7.3.22 This frame commands the TCM to stop data output when in Continuous Acquisition Mode. The frame has no payload. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 54...
NOT tied to the time with which the module transmits data to the host system. Generally speaking, the AcquireDelay is either set to 0, in which case the TCM is constantly sampling, or set to equal the SampleDelay value. The advantage of PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
This frame must be followed by the kSave frame to save the change in non- volatile memory. kFactoryMagCoeffDone (frame ID 30 7.3.30 This frame is the response to kFactoryMagCoeff frame. The frame has no payload. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 56...
9600 there is no delay. For baud rates greater than 9600 the minimum delay is equal to: Minimum delay after sending “FF ” (in seconds) = 7E-3 – (10/baud rate) PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 57...
The minimum delay time is dependent on the baud rate, and for a baud rate equal to or slower than 9600 there is no delay. The minimum delay is defined by the same formula given for switching from Sync Mode to Normal Mode in kSetSyncMode. PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual...
0x13 0 - 2 to be copy 0 0x27 0xA7 0x00 0x0A 0x06 0x13 0x00 0x00 kAccelCoeffCopySet 0x00 0x01 0x84 0x00 0x05 0x13 0xDD to be copy 1 0x06 0xA8 PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 59...
Page 65
Send kSave command to save the kCoeffCopySet to flash so that it will be still available after power cycle. The kSave command is as following. 0x00 0x05 0x09 0x6E 0xDC PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 60...
// our location in the frame we are putting together UInt16 crc; // the CRC to add to the end of the packet UInt16 count; // the total length the packet will be count = (UInt16)len + kPacketMinSize; PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 66...
Page 73
= Ticks() + 50 ; mStep++ ; // goto the next step in the process break ; case 2: // wait for msg complete or timeout if(inLen >= mExpectedLen - 2) PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 68...
Page 74
// expecting within 1/2sec of receiving the length bytes. Clear // everything in the input buffer since the data is unreliable mSerialPort->InClear(); mStep = 1 ; // Look for the next length bytes break ; default: break ; PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 69...
UInt8 count = data[0]; // The number of data elements returned UInt32 pntr = 1; // Used to retrieve the returned elements // The data elements we requested Float32 heading, pitch, roll, temperature; PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 71...
Page 77
CommProtocol::kRoll: // Move(source, destination, size (bytes)). Move copies the // specified number of bytes from the source pointer to the // destination pointer. Store the roll. Move(&(data[pntr]), &roll, sizeof(roll)); PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 72...
Page 78
// send next data request break; default: // Message is a function that displays a formatted string // (similar to printf) Message("Unknown frame %02X received \r\n", (UInt16)frameType); break; PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 73...
Page 79
// go to next step of process break; case 2: // Ticks is a timer function. 1 tick = 10msec. if(Ticks() > mTime) // tell the module to take a sample SendComm(CommProtocol::kGetData); PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 74...
Page 80
3: // Ticks is a timer function. 1 tick = 10msec. if(Ticks() > mResponseTime) Message("No response from the module. Check connection and try again\r\n"); mStep = 0; break; default: break; PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 75...
Page 81
Pitch ID is 24, not 79. Added in section on using Multiple Calibration Coefficient January 21, D. McKenzie 2015 R09.1 AcquisitionMode in 7.3.24 default value 0 indicating Poll Mode May 14, 2018 B. Zhang R09.2 PNI Sensor Corporation DOC#1014688 r09.2 TCM User Manual Page 76...
Need help?
Do you have a question about the TCM XB and is the answer not in the manual?
Questions and answers