User Guide TCM2.5 & TCM2.
© Copyright PNI Sensor Corporation 2005 All Rights Reserved. Reproduction, adaptation, or translation without prior written permission is prohibited, except as allowed under copyright laws. Revised July 2013. For most recent version visit our website at www.pnicorp.com PNI Sensor Corporation 2331 Circadian Way Santa Rosa, CA 95407 USA Tel: (707) 566-2260 Fax: (707) 566-2261 Warranty and Limitation of Liability.
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.
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.
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.
[Connection Tab] Initial Connection: 1. 2. 3. 4. Select the serial port the unit is plugged into. Select 9600 as the baud rate (default). Click on the button. 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 button. Change Modules: Once connection has been made, the TCM Studio will remember the last settings.
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.
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.
PNI Sensor Corporation TCM2.5 & TCM2.
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.
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 PNI Sensor Corporation TCM2.5 & TCM2.
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.
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.
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 , or . The characters are ignored by the TCM2.5/2.
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.
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.
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.
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.
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 magnetic field. Higher numbers reflect higher quality. The highest possible score is a “9”.
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. 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.
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
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. Command Description Commands not used for the TCM2.5/2.
Request for Data Commands Query Commands c? (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. Syntax c? Output when compass units are set to degrees: $Cnnn.n[Ennn]*checksum: when compass units are set to mils: $Cnnn.
i? (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? Output When the inclinometer units are set to degrees: $P(-)nn.nR(-)nn.n[Ennn]*checksum: When inclinometer units set to mils: $P(-)nnnR(-)nnn[Ennn]*checksum: Resolution 0.
lc? (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? Output HnVnMn.nn Valid Values Example 0-9 for H and V lc? H7V8M8.00 Related Commands m? !An example of a poor score mpcal (Multipoint Calibration) (Magnetometer Update) Description Samples and returns the X, Y, and Z axes of magnetometer data.
Related Commands s? 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. If TCM2.5/2.6 Standard output is selected, only those data parameters that are enabled (with ec, ep, er, em, et) will be output.
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. cc (Clear Calibration Data) Description Erases all calibration data. Any further magnetometer or compass output is not corrected for any local fields. This command is only valid during Standby Mode (h). Use this command before recalibrating the TCM2.5/2.6 for a new or changed local magnetic environment.
factory (Factory Settings) Description Resets the TCM2.5/2.6 to the factory settings. The internal modes are set to the following factory defaults b=5 er=e mpcal=d cc et=d sdo=t damping=d timeconst=8 sn=m ec=e halt=d sp=8 em=d ma=u uc=d ep=e mag_dec=0.0 ui=d Syntax factory Output H0V0m0.00 Example factory go ut=c (Enter Continuous Sampling Mode) Description Enters the Continuous Sampling Mode (go). The TCM2.5/2.
h (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.
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. mpcal=e : Syntax go ....... ......
sleep (Sleep Mode) Description Enters the sleep mode of operation. This command turns off the internal clocks and the RS-232 chip. Syntax sleep Output Example Related Commands wake (Wake Mode) wake (Wake Mode) Note: Only used with the TCM2.5 Description Enters the wake mode of operation. To wake the TCM2.5, a falling edge on the int2 (interrupt 2) pin of the processor is required. This is achieved by connecting pin 6 of the TCM2.
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.
damping= (Set Digital Damping) Description Enables or disables filtering of the output.
Valid Values Input Description e Compass data enabled. It will be included in the output word. (Default setting) d Compass data disabled. It will be excluded in the output word Table 11: Valid ec= Values Example ec=e !include compass data in output word : Query Response em= ec? :ec= (Enable Magnetometer Data for Output Word) Description Enables or disables magnetometer data for inclusion in the TCM2.5/2.
ep= (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 Output :[Ennn] Valid Values Input Description e Pitch data enabled. It will be included from the output word. (Default setting) d Pitch data disabled.
Valid Values Input Description e Roll data enabled. It will be included from the output word. (Default setting) d Roll data disabled. It will be excluded in the output word Table 14: Valid er= Values er=e Example !include roll data in output word : Query Response et= er? :er= (Enable Temperature Data for Output Word) Description Enables or disables temperature data for inclusion in the TCM2.5/2.6 Standard Output Word.
ma= (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. Note that compass readings always are based upon corrected magnetometer readings.
Valid Values Input Description nn.n Declination angle in degrees (default is set to 0.0) Table 17: Valid mag_dec= Values Example mag_dec=17.2 !sets the declination angle to 17.2 degrees : Query Response sdo= :mag_dec= mag_dec? (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).
sn= (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.
sp= (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.
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.
uc= (Set Compass Units) Description Sets the units to be used for the input and output of the heading data. Syntax uc=n Output :[Ennn] Valid Values Input Description d degrees, 360 × in a full circle (Default setting) m mils, 6400 mils in a full circle Table 22: Valid uc= Values uc=d Example !set units to degrees : :uc= Query Response uc? ui= (Set Inclinometer Units) Description Sets the units to be used for the input and output of the tilt (pitch & roll) data.
ut= (Set Temperature Units) Description Sets the units to be used for the input and output of the temperature data. Syntax ut=n Output :[Ennn] Valid Values Input Description f Fahrenheit c Celsius (Default setting) Table 24: Valid ut= Values Example ut=f !set units to Fahrenheit : Query Response ut? PNI Sensor Corporation TCM2.5 & TCM2.
TCM2.5/2.6 Code Example Wake C program /* in /* /* wake.c - Sample program to wake the TCM2.5/2.6 after is has been put 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) */ /* wake 2 - wakes a tcm2.5/2.6 on com port 2, etc. */ #include #include /* for atoi */ #include
Performance Specifications Parameter Heading Specifications Accuracy over tilt range Resolution Repeatability [1] Max Dip Angle Magnetometer Specifications Calibrated Field Measurement Range Magnetic Resolution Magnetic Repeatability Tilt Specifications Pitch Accuracy Roll Accuracy Tilt Range Tilt Resolution Tilt Repeatability [1] Calibration Hard Iron Calibration Soft Iron Calibration Mechanical Specifications Dimensions (L x W x H) Weight Mounting Options Connector for RS-232 I/O Specifications Time to Go
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 PNI Sensor Corporation TCM2.5 & TCM2.
3 ft. Cable Assembly Figure 6: 3’ Cable Drawing PIN Wire Color Description 1 Orange Vsupply (5 V regulated) 2 Red Vsupply (6 to 18 V unregulated) 3 Black Power Ground 4 Blue RxD (RS-232) -5 to 5V 5 Yellow TxD (RS-232) -5 to 5V or -12 to 12V 6 White RTS, Wake from Sleep 7 Green Data Ground 8 Brown NC 9 Purple NC 10 Gray Data Ground Table 26: Molex Connector TCM2.5 Pin Descriptions PNI Sensor Corporation TCM2.5 & TCM2.
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 PNI Sensor Corporation TCM2.5 & TCM2.
18 in. Cable Assembly Figure 8: 18" Cable Drawing PIN Wire Color Description 1 Black Power Ground 2 Gray NC 3 Green RS232 Ground 4 Orange NC 5 Violet NC 6 Brown NC 7 Yellow TxD 8 Blue RxD 9 Red 5 VDC Table 27: Molex Connector TCM2.6 Pin Description PNI Sensor Corporation TCM2.5 & TCM2.