Page 2
For instance [Ennn] is the error code misuse, neglect, alteration, repair, improper installation, string that is output by the TCM2.6 only when an error or improper testing. If a Product is defective, condition exists. Also,(-) denotes the presence of a...
Page 3
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.
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.
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.
[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.
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.
Page 8
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;...
Page 9
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.
Page 10
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 10 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.
Page 12
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.
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.
Command parameter invalid E050 Command invalid or not available + Command parameter invalid E400 EEPROM2 error E800 EEPROM1 error EC00 EEPROM2 error + EEPROM1 error a. Indicates that the TCM2.5/2.6 EEPROM has been corrupted. Contact PNI for assistance. Page 14 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.
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.
Page 17
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.
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.
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 19 of 48...
Programming Commands Table 5: Command List Quick Reference Command Description Request for Data Commands Compass Update Inclinometer Update Query Last Calibration Score Magnetometer Update Single Update Output Word Temperature Update Action Commands Clear Calibration Data factory Factory Settings Enter Continuous Mode Halt Continuous Sampling, Enter Standby halt= Enable Single Character Halt...
Page 21
Command differences between the TCM2.5/2.6 and previous TCM2 units To keep the software compatible with existing systems, when any of the commands below are sent the unit will respond with the “:” as if it had accepted the command. Querying the command will result in an error code, since the command is obsolete and not being used.
Request for Data Commands Query Commands (Compass Update) Description Samples the magnetometer and inclinometer sensors, then calculates and returns the compass heading. When in Standby mode (h) use this command to query the compass reading regardless of whether compass data has been selected for inclusion in the output word.
Page 23
(Inclinometer Update) Description Samples and returns the pitch and roll inclinometer data. When in Standby mode (h) use this command to query the inclinometer readings regardless of whether inclinometer data has been selected for inclusion in the output word. Syntax i?<cr>...
Page 24
(Query Last Calibration Score) Description Reports the score generated by the last calibration procedure executed, as stored in EEPROM. Use this command to recall the quality of the last calibration procedure. Syntax lc?<cr> Output HnVnMn.nn<cr><lf> Valid Values 0-9 for H and V Example lc?<cr>...
Page 25
Related Commands em= (Enable Magnetometer) (Single Update of Output Word) Description Transmits the output word you specified. This command can only be used in the Standby (h) mode. The Select RS232 Output Word Format (sdo=) command allows you to select between NMEA or TCM2.5/2.6 Standard formats for the output word.
Related Commands et= (Enable Temperature) ut= (Set Temperature Units) Action Commands (Help Command) Description All TCM2.5/2.6 commands are displayed using the “?” command. (Clear Calibration Data) Description Erases all calibration data. Any further magnetometer or compass output is not corrected for any local fields.
Page 27
factory (Factory Settings) Description Resets the TCM2.5/2.6 to the factory settings. The internal modes are set to the following factory defaults er=e mpcal=d ut=c et=d sdo=t damping=d timeconst=8 sn=m ec=e halt=d sp=8 em=e ma=u uc=d ep=e mag_dec=0.0 ui=d Syntax factory<cr> Output H0V0m0.00<cr><lf>...
Page 28
(Halt Continuous Sampling, Enter Standby) Description Exits Continuous Sampling Mode (go) and enters Standby mode (h). If this command is received while the TCM2.5/2.6 is transmitting an output word, the remainder of the output word will be sent before the TCM2.5/2.6 changes modes. Syntax h<cr>...
Page 29
mpcal= (Multipoint Calibration) Description Initiates a multipoint calibration. This command is only valid when used in conjunction with Enter Continuous Sampling Mode (go). The TCM2.5/2.6 samples its sensors and adds the data point to the current set of calibration data. Syntax mpcal=e<cr>...
Page 30
TCM2.5 connector to the RTS pin (pin 4 on a DB25 and pin 7 on a DB9) of the COM port. A sample wake.c program example is provided at the end of this document. To wake athe TCM2.6, toggle RxD line Syntax wake<cr>...
Page 31
User Configuration Parameter Commands The following commands allow you to set and query the values of the TCM2.5/2.6’s user configuration parameters. These parameters specify how the TCM2.5/2.6 will operate, such as damping, baud rate, and so on. The TCM2.5/2.6 stores all parameter values in EEPROM when specified, so that after a reboot or power cycling, it will return to the last configuration set.
Page 32
damping= (Set Digital Damping) Description Enables or disables filtering of the output. Syntax damping=n<cr> Output :[Ennn]<cr><lf> Valid Values Input Description enable damping disable damping (default setting) Table 10: Valid damping= values Example !enable damping damping=e<cr> :<cr><lf> Query Response damping? :damping= Related Commands timeconst= (set time constant for digital damping)
Page 33
Valid Values Input Description Compass data enabled. It will be included in the output word. (Default setting) Compass data disabled. It will be excluded in the output word Table 11: Valid ec= Values Example !include compass data in output word ec=e<cr>...
Page 34
(Enable Pitch Data for Output Word) Description Enables or disables pitch data for inclusion in the TCM2.5/2.6 Standard Output Word. Syntax ep=n<cr> Output :[Ennn]<cr><lf> Valid Values Input Description Pitch data enabled. It will be included from the output word. (Default setting) Pitch data disabled.
Page 35
Valid Values Input Description Roll data enabled. It will be included from the output word. (Default setting) Roll data disabled. It will be excluded in the output word Table 14: Valid er= Values Example !include roll data in output word er=e<cr>...
Page 36
(Select Magnetometer Output Option) Description Outputs either corrected or non corrected magnetometer readings. If corrected readings are selected, the magnetometer readings output by the TCM2.5/2.6 reflect corrections to ambient field as a result of user calibration. If not corrected, the magnetometer readings output reflect total ambient field, including local fields.
Page 37
Valid Values Input Description nn.n Declination angle in degrees (default is set to 0.0) Table 17: Valid mag_dec= Values Example !sets the declination angle to 17.2 degrees mag_dec=17.2 :<cr><lf> mag_dec? Query Response :mag_dec= sdo= (Set RS232 Output Word Format) Description Sets the output word format to be used in response to the Single Update Output Word (sdo?) command and in Continuous Output Mode (go).
Page 38
(Select Magnetic or True North) Description Selects either magnetic or true north. True North sets the heading reference to True North or Magnetic North. If the value is set to true, then declination is applied to get the True North heading. Syntax sn=n<cr>...
Page 39
(Set Sampling Period) Description This command is used to set the sampling rate at which the data will be output in Hz. NOTE: The function of this command has changed from the TCM2 in which the sp was the clock divisor to derive the output rate. Syntax sp=n<cr>...
Page 40
timeconst= (Set Time Constant for Digital Damping) Description This command is used with the digital damping command. It sets the time constant to nn samples for the digital damping. Syntax timeconst=n<cr> Output :[Ennn]<cr><lf> Valid Values Input Description Set the measured time constant = 4 Integer value between 1 –...
Page 41
(Set Compass Units) Description Sets the units to be used for the input and output of the heading data. Syntax uc=n<cr> Output :[Ennn]<cr><lf> Valid Values Input Description degrees, 360 × in a full circle (Default setting) mils, 6400 mils in a full circle Table 22: Valid uc= Values Example !set units to degrees...
Page 42
(Set Temperature Units) Description Sets the units to be used for the input and output of the temperature data. Syntax ut=n<cr> Output :[Ennn]<cr><lf> Valid Values Input Description Fahrenheit Celsius (Default setting) Table 24: Valid ut= Values Example !set units to Fahrenheit ut=f<cr>...
Page 43
TCM2.5/2.6 Code Example Wake C program /* wake.c - Sample program to wake the TCM2.5/2.6 after is has been put in sleep mode */ /* Wake toggles the RTS line to give the TCM2.5/2.6 a (falling) edge */ /* P Milford 1/10/96 */ /* Usage: wake 1 - wakes a tcm2.5/2.6 on com port 1 (default) */...
Tilt Resolution Tilt Repeatability [1] Deg RMS Calibration Hard Iron Calibration Soft Iron Calibration Mechanical Specifications TCM2.5 TCM2.6 Dimensions (L x W x H) 6.4 x 5.1 x 1.4 3.4 x 4.3 x 1.3 Weight grams Mounting Options Screw Mounts/Standoffs horizontal...
Page 45
Mechanicals TCM2.5 Board and Cable The default orientation for the TCM2.5/2.6 is for the silk-screened arrow to point in the “forward” direction. That puts the edge opposite of the Molex connector as the front edge of the board. Figure 5: TCM2.5 Board Drawing Page 45 of 48...
Page 46
3 ft. Cable Assembly Figure 6: 3’ Cable Drawing Wire Color Description Orange Vsupply (5 V regulated) Vsupply (6 to 18 V unregulated) Black Power Ground Blue RxD (RS-232) -5 to 5V Yellow TxD (RS-232) -5 to 5V or -12 to 12V White RTS, Wake from Sleep Green...
Page 47
TCM2.6 Board and Cable The default orientation for the TCM2.6 is for the silk-screened arrow to point in the “forward” direction. That puts the edge opposite of the Molex connector as the front edge of the board. Figure 7: TCM2.6 Board Drawing...
Page 48
18 in. Cable Assembly Figure 8: 18" Cable Drawing Wire Color Description Black Power Ground Gray Green RS232 Ground Orange Violet Brown Yellow Blue 5 VDC Table 27: Molex Connector TCM2.6 Pin Description Page 48 of 48...
Need help?
Do you have a question about the TCM2.6 and is the answer not in the manual?
Questions and answers