Home
TCM2 Electronic Compass Module User`s Manual
Contents
1. 2 1 2 7 The coefficients must be scaled for use in the TCM2 10 KT1 40960 8 Give the TCM2 the commands to set the temperature coefficients as follows assume KT0 26 23749 KT 1 0 02389 0 26 23749 1 0 02389 9 Give the TCM2 the ax warm reboot command On versions 2 77 and higher give the TCM2 faccal e then and then faccal d The TCM2 should now use the coefficients KTO and KT1 which you just stored so calibration of the temperature sensor should be complete and outputs of temperature in the TCM2 standard output word should be the correct temperature sensed by the sensor To check that the TCM2 actually stored these coefficients you can ask the TCM2 what these coefficients are with the following commands KTO 1 10 Give the TCM2 the command to change the output word back to the standard TCM2 output word the command is sdo t 3 11 TCM2 Pitch and Roll Output The TCM2 uses a lluid filled tilt sensor to measure the orientation of the compass with respect to gravity Since the compass also measures the complete magnetic field the 2 can correct for the tilt of the compass to provide an accurate heading The tilt sensor measures the angles between the compass Z axis and the gravity vector This is a different set of angles than the pitch and roll angles as commonly used in an airplane For an airplane people usu
2. 2 Electronic Compass Module User s Manual Revision 1 09 April 23 2002 2 Electronic Compass Module User s Manual Rev 1 09 Copyright 1993 1994 1995 1996 1997 1998 1999 2002 PNI Corporation 5464 Skylane Blvd Suite A Santa Rosa CA 95403 Tel 707 566 2260 Fax 707 566 2261 techsupport pnicorp com www pnicorp com PNI CORPORATION 2 Table of Contents ai u s QS a mayun uuu 2 Xu am S Tu u Q 2 1 2 Differences Between the TCM2 2 1 3 Getting Started with the TCM2 n u 3 A PACKING ES thu ua Sasawi 3 1 5 Conventions Used in this Manual 3 2 Installation INStFUGTIONS S STAR ah u aaye 4 2 1 Where to Install the TCM2 a naa a 4 2 2 Mechanically Mounting the 2 4 2 3 Electrical Connections a a naa a 5 2 4 Calibration for Hard Iron Distortion Fields 5 eO 5 3 1 Compass Operating 5 3 2 TCM2 Command Syntax n susu 6 FOM2 Output a tain u na agia
3. 2 Appendix D Additional Commands for TCM2 Version 2 34 and Later Releases Additional Commands for 2 Version 2 34 and Later Releases Command Factory Settings Description Resets to Factory Settings The internal modes are set to the following factory defaults fast d autocal d mpcal d si d softiron d damping d ec e ep e er e em d et d ed e raw d sdo t ma u sn m uc d ui d ut c sp 1 clock 16 cc Usage factory lt cr gt Output Ennn lt cr gt lt lf gt Example factory lt cr gt Command Select Magnetic or True North Description Selects between magnetic or true north Usage sn n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Meaning t True North m Magnetic North Example sn t lt cr gt the declination angle set with mag_dec is added to the computed heading Related Commands mag_dec Command Set Declination Angle Description Sets the magnetic declination angle in degrees Usage mag_dec nn n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Meaning nn n declination angle in degrees Example mag_dec 17 2 the declination angle is set to 17 2 degrees Related Commands sn PNI CORPORATION Appendix E Additional Hard Iron Calibration Routine for the TCM2 CAL3 Additional Hard Iron Calibration for the 2 CAL3 The TCM2 has two internal routines for calculating the effects of hard iron magnetism on the co
4. T nnn nEnnn checksum lt cr gt lt 1f gt when units set to Celsius nnnEnnn checksum lt cr gt lt lf gt when units set to Fahrenheit Resolution 0 5 or 1 F Valid Ranges 25 0 to 100 0 C 13 to 212 Example t lt cr gt T25 5Ennn checksum lt cr gt lt lf gt Command Single Update of Output Word Description Causes TCM2 to transmit the output word you have specified See manual section 3 3 for a full discussion of output word formatting This command can be used either in the Standby mode The Select RS232 output word format command allows you to select between NMEA or TCM2 Standard formats for the output word If TCM2 Standard output is selected only those data parameters that are enabled with 5 5 will be output Note that in the Standby mode the TCM2 sensors are idle When this command is issued in Standby mode the TCM2 will first sample its sensors before transmitting the output word Usage s lt cr gt Output See section 3 4 for a full description of the output word formats Example s lt cr gt PNI CORPORATION 20 2 Electronic Compass Module User s Manual Rev 1 09 C328 3P28 4R 12 4X55 1Y12 32Z 18 4T22 3E06 checksum lt cr gt lt lf gt Related Commands Select RS232 output word format sdo Select serial output mode sso Enable compass data for output word ec Enable pitch data for output word ep Enable r
5. if power is lost during autocal before it is halted the TCM will restart with the prior mpcal values The limitations of user calibration The 2 can calibrate for hard iron effects or local fields that 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 soft iron effects that are created by the amplification of magnetic fields by highly permeable materials such as ferrous metals The TCM2 does not currently 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 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 The TCM2 does collect sufficient data to be mathematically capable of calibration for soft iron effects We are currently developing the algorithms to implement soft iron calibration in later models If you do have soft iron effects from your system contact PNI Corp for the soft iron correction software that runs on yo
6. s connector pins 2 and 3 respectively is a convenient means of applying power to the TCM2 The three signals used for RS232 should be connected to the corresponding pins on one of your PC s COM ports a standard DB25 COM port connector make the following connections COM Port TCM2 Connector Pin Signal Pin Signal 2 TxD 4 RxD 3 RxD 5 TxD 7 Ground 7 Data ground 4 RTS 6 Mouse This connection is only necessary if you plan to use the TCM2 as headtracker emulating a mouse On a standard PC s DB9 COM port connector make the following connections COM Port TCM2 Connector Pin Signal Pin Signal 2 RxD 5 TxD 3 TxD 4 RxD 5 Ground 7 Data ground 7 RTS 6 Mouse 5 connection is only necessary if you plan to use the TCM2 as headtracker emulating a mouse Note that some COM ports have pins 2 as TxD and 3 as RxD Cable specifications The TCM2 Evaluation Kit contains a cable to connect to the TCM2 On one end of the cable is the connector needed to mate to the TCM2 The header is MOLX 22 03 2101style with 0 100 centers The mating receptacle is MOLX 22 01 3107 or equivalent The crimps are MOLX 08 50 0114 The cable s wires are color coded as indicated below Color Connector Pin Signal PNI CORPORATION 34 2 Electronic Compass Module User s Manual Rev 1 09 Orange 1 Vsupply regulated Red 2 Vsupply unregulated Black 3 Ground power Blue 4 RxD RS232 Yellow 5 TxD RS232 White
7. Description Queries the TCM2 for the analog output mode For a full description of analog output modes see section 3 3 4 Usage sao lt cr gt Output sao nEnnn lt cr gt lt 1f gt Valid Values Output Meaning d analog output disabled linear analog output enabled q quadrature analog output enabled Example sao lt cr gt sao q lt cr gt lt 1f gt if analog output mode set to quadrature Related Commands Set analog output mode sao Command Select magnetometer output option Description Instructs the TCM2 to output either corrected or non corrected magnetometer readings If corrected readings are selected the magnetometer readings output by the TCM2 will reflect corrections to ambient field as a result of user calibration If non corrected readings are selected the magnetometer readings output will reflect total ambient field including local fields Note that compass readings always are based upon corrected magnetometer readings Usage ma n lt cr gt Output Ennn lt cr gt lt 1f gt Valid Values Input Meaning choose corrected magnetometer readings u choose non corrected magnetometer readings Example ma c lt cr gt to choose corrected magnetometer readings lt cr gt lt 1f gt Related Commands Query magnetometer output option ma Command Query magnetometer output option Description Query the TCM2 to output either corrected or non corrected magnetometer readings If corrected readings are selected the magne
8. if it is good the checksums of the two banks are compared if they are equal the second bank is assumed to be the same as the first If the checksums differ or the second bank is bad the second bank is written with the data from the first If both banks are bad the values from ROM are used PNI CORPORATION 42 Appendix Performance Specification TCM2 ELECTRONIC COMPASS MAGNETOMETER AND TILT SENSOR MODULE Data Sheet TCM2 20 TCM2 50 TCM2 electronic compass sensor module with tilt TCM2 electronic compass sensor module with tilt compensation of 20 compensation of 50 Heading Information Heading Information Accuracy when level 0 52 RMS Accuracy when level 1 0 RMS Accuracy when tilted 1 0 RMS Accuracy when tilted 1 5 RMS Resolution 0 1 Resolution 0 1 Repeatability 0 1 Repeatability 0 3 Tilt Information Tilt Information Accuracy 0 2 Accuracy 0 4 Resolution 0 1 Resolution 0 3 Repeatability 0 2 Repeatability 0 3 Range 20 Range 50 PERFORMANCE OF THE TCM2 20 AND TCM2 50 Magnetic Field Information Temperature Information sensor is uncalibrated Absolute Accuracy 1 up to 70 uT Accuracy after calibration 1 C 2 5 uT from 70 u T to 80 uT Resolution 1 C 2 F Resolution 0 01 uT Range 20 to 70 C Repeatability 0 2 uT Range 80 uT Power Requirements Supply Voltage 5 VDC regulated or 6 to 18 VDC unregulated Current
9. 6 Mouse output Green 7 Data ground Brown 8 Analog output 2 Purple 9 Analog output Gray 10 Data Ground For TCM2 80 units pin1 regulated Vsupply should not be used Connect power to pin2 and supply between 6 18 volts 5 3 Communicating with the TCM2 Once the TCM2 is powered up and the RS232 connection is made with one of the PC s COM ports you may begin swapping ASCII serial data with the TCM2 The most direct means is to run any modem or terminal emulation software specify the COM port that you have the TCM2 connected to and the default baud rate for the TCM2 9600 baud and begin typing commands Remember that the TCM2 does not echo characters by default so you may wish to select the echo output option in your terminal emulation program or press control and e key simultaneously 5 4 TCM2 EXE Evaluation Software The TCM2 EXE DOS evaluation program communicates with the TCM2 through the COM port of your PC It puts an easy to use interface onto the ASCII command language used by the 2 so that instead of issuing command codes manually you can use buttons check boxes and dialog boxes It reads the ASCII responses of the TCM2 instead of reading the ASCII output strings of the TCM2 and formats its sensor data into labeled and easy to read data fields It simultaneously presents a terminal window that shows you the actual ASCII strings being exchanged with the TCM2 so that you may observe begin to learn the TCM2 s
10. For a description of the TCM2 standard output word format see section 3 4 2 Usage ep lt cr gt Output ep nEnnn lt cr gt lt 1f gt Valid Values Output Meaning pitch data enabled will be included output word d pitch data disabled will be excluded from output word Example ep lt cr gt ep e lt cr gt lt 1 f gt if pitch data is enabled for inclusion in output word Related Commands Enable roll data for output word Description Instructs the TCM2 to either enable or disable roll data for inclusion in the TCM2 standard output word For a description of the TCM2 standard output word format see section 3 4 2 Usage er n lt cr gt Output Ennn lt cr gt lt 1f gt Valid Values Input Meaning e roll data enabled will be included in output word d roll data disabled will be excluded from output word Example er e lt cr gt to enable roll data for inclusion in output word lt cr gt lt l1lf gt Related Commands er Command Query roll data enable status PNI CORPORATION 30 2 Electronic Compass Module User s Manual Rev 1 09 Description Queries whether the roll data is currently enabled or disabled for inclusion in the TCM2 standard output word For a description of the TCM2 standard output word format see section 3 4 2 Usage er lt cr gt Output er nEnnn lt cr gt lt 1f gt Valid Values Output Meaning e roll data enabled will be included in output word d
11. a magnetic field near them If you must use a certain part with these properties then your customers should be warned to keep the product away from sources of magnetic fields which could magnetize that part and look for the E001 error Auto calibration function of the TCM2 can be used for these situations Auto calibration will try to adjust the hardiron calibration coefficients to reflect the change but if the magnetization is too large a full multipoint calibration will be necessary Do not put a magnet on the TCM2 compass Some components on the board can become magnetized if exposed to a strong magnetic field We recommend conformal coat if the board will be exposed to moisture or sources of contamination 5 6 Limitations of the TCM2 While the TCM2 electronic compass can handle many rugged environments and dynamic situations there are limits The majority of the limits result from the inclinometer the tilt sensor which is filled with an electrolytic fluid Acceleration When the TCM2 is in acceleration the fluid in the tilt sensor will be thrown up against the side of its bubble Examples of situations with acceleration include banking turns of an airplane and take off of an airplane The tilt sensor will measure the angle of the fluid as the tilt of the system because it cannot distinguish between acceleration and tilt The error from this measurement will result in an error in the calculated heading Therefore the host system ha
12. edges PNI CORPORATION 6 2 Electronic Compass Module User s Manual Rev 1 09 2 3 Electrical Connections The TCM2 utilizes a standard straight post polarized 10 pin header for power and data connections The header is MOLX 22 03 2101style with 0 100 centers The mating receptacle is MOLX 22 01 3107 or equivalent The crimps are MOLX 08 50 0114 The pin out for this connector is diagrammed below 12 345 6 7 89 10 Data ground Analog output Analog output2 Data ground Mouse input TxD RS232 5 to 5V RxD RS232 5V to 5V 12 to 12V Power Ground Vsupply 6 18V unregulated Vsupply 5V 5 Note Analog output is available on all TCM2 models Mouse mode is for Virtual Reality applications Supply voltage may either be supplied as 6 25V unregulated or 5V regulated 5 Do not apply power to both power pins simultaneously The Data Ground pin 7 of the connector should be connected to RS232 ground The RxD receive pin 4 accepts voltages from 15v to 15 The TxD transmit pin outputs 5v to 5v These ranges are compatible with most RS232 transceiver chips serial communications interface is RS232 with the following parameters 8 data bits 1 start bit 1 stop bit no parity Transmit voltages 5V receive voltages 5V minimum 15V maximum The baud rate may be configured from 300 38400 baud e The TCM2 80 can only use the unregulated power supply i
13. for the TCM2 complete the command For example when you send a command disable magnetometers it will return a to indicate it is done Do not set the baud rate too fast See the third bullet under 1 above Also you can overflow the serial input buffer of your computer if the baud rate and sample frequency sp n are set too fast For example many 486 computers cannot process the serial input if the sample rate is 30 Hz and the baud rate is 38400 Do not use the soft iron function without assistance from PNI Corp The soft iron function should NOT be enabled do not give the command softiron e during normal operation of the compass The command softiron e is only used during calibration BUT YOU SHOULD NOT USE SOFTIRON calibration without instructions from PNI Corp If you think a material which has a softiron effect is affecting the TCM2 try to move the TCM2 as far as possible in the host system from that material If you cannot move the TCM2 away from the soft iron call PNI Corp for information on soft iron calibration Do not use steel parts or other parts which can be magnetized near the TCM2 PNI CORPORATION 38 2 Electronic Compass Module User s Manual Rev 1 09 Steel and other parts can be magnetized meaning that the material will take on a different magnetic charge than the charge it had during calibration These parts can be magnetized by moving a magnet or any source of
14. gt lt 1f gt Related Commands ec Command Query compass data enable status Description Queries whether the compass data is currently enabled or disabled for inclusion in the TCM2 standard output word For a description of the TCM2 standard output word format see section 3 4 2 PNI CORPORATION 29 2 Electronic Compass Module User s Manual Rev 1 09 Usage ec lt cr gt Output lt gt lt 1 gt Valid Values Output Meaning e compass data enabled will be included in output word d compass data disabled will be excluded from output word Example ec lt cr gt lt gt lt 1 gt if compass data is enabled for inclusion output word Related Commands ec Command Enable pitch data for output word Description Instructs the TCM2 to either enable or disable pitch data for inclusion in the TCM2 standard output word For a description of the TCM2 standard output word format see section 3 4 2 Usage ep n lt cr gt Output Ennn lt cr gt lt 1f gt Valid Values Input Meaning pitch data enabled will be included output word d pitch data disabled will be excluded from output word Example ep e lt cr gt to enable pitch data for inclusion in output word lt cr gt lt 1f gt Related Commands Command Query pitch data enable status Description Queries whether the pitch data is currently enabled or disabled for inclusion in the TCM2 standard output word
15. in standby mode h Example mpcal lt cr gt go lt cr gt Lake data continuos mode h lt cr gt gt H4V3M5 00 lt cr gt lt lf gt This is an example of a poor score mpcal d lt cr gt Related Commands Query last calibration score Automatic calibration autocal Command Automatic calibration Description This is an advanced calibration technique that is used after multipoint calibration Please refer to section 3 9 for details Usage autocal e lt cr gt go lt cr gt Lake data continuos mode h lt cr gt autocal d Input Meaning Valid Ranges e enable automatic calibration d disable automatic calibration Output Example autocal lt cr gt go lt cr gt Be a take data continuos mode autocal d lt cr gt Related Commands Query last calibration score Ic Automatic calibration mpcal PNI CORPORATION 22 2 Electronic Compass Module User s Manual Rev 1 09 Command Clear calibration data Description Instructs TCM2 to erase all calibration data Any further magnetometer or compass output will not be corrected for any local fields This command is only valid during Standby mode Use this command before re calibrating the TCM2 for a new or changed local magnetic environment For a full description of the user calibration procedure see section 3 9 Usage cc lt cr gt Output HnVnMn nn lt cr gt lt l1f gt Example cc lt cr gt lt cr gt l
16. inaccurate If your application has frequencies in this range contact PNI Corp to discuss using a different fluid in the inclinometer PNI CORPORATION 39 2 Electronic Compass Module User s Manual Rev 1 09 6 New Features and Commands Available for Version 2 77 and Later Releases 6 1 Changes to the TCM2 Firmware version 2 77 is backward compatible with earlier versions of the TCM2 firmware except for the following changes The TCM2 takes about 430 msecs to start up when power is first applied to the unit Previously it took about 250 msecs to start up All parameters set by the user via the command set were immediately written to EEPROM In version 2 77 most commands do not update the EEPROM The new parameters are not updated until one of the following updating commands are issued If the power was disconnected before the new parameters were updated by one of the updating commands those new parameters would be lost Updating Commands go cc h save ax mpcal d factory cal3 6 2 New Features to the TCM2 Low power mode Sleep mode New halt command option Save the user configuration and factory calibration coefficients in two banks of the EEPROM 6 2 1 Low Power Mode New commands Command Description seriallp e Enable low power serial communication seriallp d Disable low power serial communication default is seriallp d The 2 can be put into low power mode by executing the seri
17. maximum positive and negative angle of the inclinometer When the inclinometer angle exceeds this value it is clipped to output that value along with an out of range flag Usage cclip nn n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Meaning positive floating point Clip the reading of the inclinometer at range of the inclinometer this value Example cclip nn n lt cr gt set the value for the clip angle lt cr gt lt 1f gt Related Commands cclip Command Query Skip Description Queries the value of the clip angle Usage 5 lt gt Output lt gt lt 1 gt Valid Values Input Meaning positive floating point Clip the reading of the inclinometer at range of the inclinometer this value Example Sskip lt cr gt skip nnEnnn lt cr gt lt 1f gt nn number of samples to skip Related Commands skip Command Set Sampling Period Divisor Description Divides the clock rate set by clock For the TCM2 this command is meant to be use in conjunction with the clock command to set the sampling period below 5 Hz In the TCM2 this command was used to divide down the 8 Hz sampling rate It can be used as in the TCM2 if the clock rate is set to 8 Hz Usage sp nnn lt cr gt Output Ennn lt cr gt lt lf gt Valid Ranges 1to5 Example sp 2 lt cr gt sample every 2nd sample of the clock rate lt cr gt lt 1lf gt Related Commands 5 Command Query sampli
18. program you will need to set the correct baud rate no parity 1 stop bit 8 bits and the COM port 5 5 Trouble Shooting the TCM2 1 When l connect the TCM2 to my PC there is no response from the TCM2 e sure that you are giving the TCM2 power correctly refer to section 5 2 for proper connection of power ground TXD and RXD The 2 is defaulted to standby mode To enable the TCM2 either type the go command or select the start continuous sampling button in the TCM2 exe program This button is located at the top middle position on the TCM2 exe screen e With TCM2 EXE program or any terminal program you use the program must be set to the correct COM port and baud rate that the TCM2 is currently using The TCM2 EXE program default is COM2 For COM1 type TCM2 1 when you launch the program to select the COM1 port or use the set Program i o parameters button to select the COM port and reset the TCM2 e When you change the baud rate the TCM2 does not start using the new baud rate until after 1 an ax command or 2 save command followed by cycling the power off and on again When cycling the power after the save command make sure a is returned from the TCM2 before cycling power off If power is removed during a write to the EEPROM it can get corrupted e f you change the baud rate to 38400 using the TCM2 EXE program and then cannot communicate with the TCM2 you will have to find a comput
19. roll data disabled will be excluded from output word Example er lt cr gt lt gt lt 1 gt if roll data is enabled for inclusion output word Related Commands er Command Enable magnetometer data for output word Description Instructs the TCM2 to either enable or disable magnetometer data for inclusion in the TCM2 standard output word For a description of the TCM2 standard output word format see section 3 4 2 Usage em n lt cr gt Output Ennn lt cr gt lt 1f gt Valid Values Input Meaning e magnetometer data enabled will be included in output word d magnetometer data disabled will be excluded from output word Example em e lt cr gt to enable magnetometer data lt cr gt lt lf gt Related Commands em Command Query magnetometer data enable status Description Queries whether the magnetometer data is currently enabled or disabled for inclusion in the TCM2 standard output word For a description of the 2 standard output word format see section 3 4 2 Usage em lt cr gt Output em nEnnn lt cr gt lt l1f gt Valid Values Output Meaning e magnetometer data enabled will be included in output word d magnetometer data disabled will be excluded from output word Example em lt cr gt em e lt cr gt lt l1f gt if magnetometer data is enabled Related Commands em Command Enable temperature data for output word Description Instructs the TCM2 to either enable or disabl
20. skip any outputs 6 There is an error message Ennn in the output word e See the TCM2 Error Codes section 3 3 2 for descriptions of each error code and the most likely cause for the error 7 When the host system moves the fluid in the inclinometer sloshes around and gives inaccurate tilt which results in inaccurate heading calculations e If the TCM2 will experience significant vibration or sloshing there are two ways to dampen the effect First try the digital damping function refer to section 3 6 Second a more viscous fluid can be used in the inclinometer You must contact PNI Corp for pricing and ordering a different inclinometer 8 want to see if the compass is accurate Try this simple functional test Set the TCM2 on a flat surface and mark its location Take a reading of the heading Turn the compass 180 and take another reading Try this at about 4 different orientations i e starting at 0 45 90 and 135 The compass should read a difference of 180 between pairs of readings Watch out for nearby metal most tables for example have metal parts that distort the magnetic field and will make the compass give bad readings 9 What else should not do Do not remove power before a command is complete Power MUST NOT be removed from the TCM2 while the 2 is executing a command doing this can erase the EEPROM because the EEPROM is not write protected at that time You MUST wait
21. system upside down It is very important that the z axis in the new position be exactly 180 from the original orientation Figure 3 5 When you have your system in the new orientation press the space bar The TCM2 will take its third measurement and calculate the hard iron correction You are finished with the hard iron calibration 2 2 2 Figure 1 Figure 2 Figure 3 PNI Corporation
22. the TCM2 Make electrical connections to the TCM2 Calibrate for installation alignment Calibrate for hard iron distortion effects The first four items are discussed in this section The last item user calibration for hard iron distortion is discussed in section 3 8 2 1 Where to Install the TCM2 The TCM2 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 with the following considerations in mind The TCM2 s magnetometers should not saturate The 2 can be calibrated for large static magnetic fields However each axis of the TCM2 s magnetometers has a maximum dynamic range of 80 uT if the total field exceeds this value for any axis the 2 will report a magnetometer out of range error condition When mounting the 2 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 s sensors large masses of ferrous metals such as transformers and vehicle chassis large electric currents permanent magnets such as electric motors etc Locate the 2 away from local sources of changing magnetic fields lt is not possible to calibrate for changing magnetic anomalies Thus for greatest accuracy keep the TCM2 away from sources of local magnetic anomalies that will change with time for instance electric equipment th
23. to the EEPROM The changes to the EEPROM not visible to the user Version 2 77 duplicates the factory calibration coefficients user hardiron coefficients and user configurations in two different memory locations of the EEPROM Also the factory calibration coefficients user coefficients and the user configuration parameters are all stored in separate banks of memory in the EEPROM Changes were made to make the data in the EEPROM less susceptible to corruption The EEPROM changes are as follows 1 Changed from an 8 bit checksum to a 16 bit checksum 2 The coefficients are stored in 3 different sections of the eeprom Each section can only be accessed if that section is enabled The 3 sections are a Factory calibration If this section of the eeprom is corrupt error E400 will appear b User coefficient The hardiron and softiron calibration coefficients will be stored here If this section is corrupt error E800 will appear c User configurations All user set configurations will be saved in this section of the eeprom If this section is corrupt error E800 will appear 3 The 3 sections of the eeprom are each backed up in a separate bank of eeprom The dual banks are updated each time a write to eeprom is done When the system resets if the first bank is in error the second bank is tried if the second bank is good it is used and the first bank is updated to reflect the new values If the first bank was good the second is checked
24. uc d lt cr gt to set units to degrees lt cr gt lt lf gt Related Commands uc Command Query compass units Description Queries the units currently used for input output of heading data Usage uc lt cr gt Output uc nEnnn lt cr gt lt lf gt Valid Values Output Units d degrees 360 in a full circle m mils 6400 mils in a full circle Example uc lt cr gt uc d lt cr gt lt l1f gt for units set to degrees Related Commands Command Set inclinometer units Description Sets the units to be used for input output of tilt pitch amp roll data Usage ui n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Units d degrees 360 a full circle m mils 6400 mils in a full circle Example ui d lt cr gt to set units to degrees lt cr gt lt lf gt Related Commands ui Command Query inclinometer units Description Queries the units currently used for input output of tilt pitch amp roll data Usage ui lt cr gt Output u nEnnn lt cr gt lt 1f gt Valid Values Output Units d degrees 360 1 a full circle m mils 6400 mils in a full circle Example ui lt cr gt u d lt cr gt lt lf gt for units set to degrees PNI CORPORATION 28 2 Electronic Compass Module User s Manual Rev 1 09 Related Commands ui Set RS232 output word format Description Sets the output word format to be used in response to the Single update output w
25. 0 C 0 5 steps 13 to 212 1 steps e enable d disable d e enable d disable d e enable d disable d e enable d disable d e enable d disable d 16 e enable d disable d TCM2 Command List 7 23 97 timeconstant factory sn mag_dec skip cclip sp x b x ut x ui x sdo x timeconstant sn mag_dec 5 cclip sp b ut uc ui sdo ec ep er em et ed sao ma Set time constant for digital damping Resets to factory setting Selects between magnetic or true north Set declination angle Skip measurements Set clip value Sampling period divisor Baud rate Thermometer units Compass units Inclinometer units Select RS232 output word format Enable compass data for output word Enable pitch data for output word Enable roll data for output word Enable magnetometer data for output word Enable temperature data for output word Enable distortion detection Select analog output mode Select magnetometer output option uncorrected corrected nnn t m nnn nnn nn nnn 1 2 3 4 5 6 f c d m d m t n m e d e d e d e d e d e d C u 1 to 255 t true north m magnetic m north 360 to360 0 0 to positive integer 0 0 to positive integer value 0 within the range of the inclinometer 1 to 480 1 1 300 2 1200 3 2400 5 4 4800 5 9600 6 19200 f F c C f d degrees m mils d d degrees m m
26. 2 Connecting the TEM2 yapay 32 5 3 Communicating with the 2 33 5 4 2 Evaluation Software 33 5 5 Trouble Shooting the 34 5 6 Limitations of the 2 0 0 0 0 4 00840000 37 6 New Features Commands Available for Version 2 77 Later Releases 38 6 1 Changes tothe TGM2 Qu u su tasa eeu 38 6 2 New Features of the TCM2 n 39 6 2 Tow Power MOC xiii Luya a 40 6 2 2 Sleep MOG 2 au 40 6 2 3 lt 40 6 2 4 Changes to the 40 Appendix A Performance Specification Appendix B Command List and Default Parameter Values Appendix C Dimensional Specification Appendix D Additional Commands for TCM2 Version 2 34 and Later Releases Appendix E Additional Hard lron Calibration Routine for the TCM2 CAL3 PNI CORPORATION 2 Electronic Compass Module User s Manual Rev 1 09 1 Introduction 1 1 About the TCM2 Congratulations With your procurement of the TCM2 you have chosen a product that represents the largest step forward in compass t
27. CII characters that are either supplied to or returned by the TCM2 These do not include lt cr gt lt lf gt or error code characters Please refer to complete command descriptions Items in square brackets e g mils are not included in the actual parameter data Negative signs in parentheses e g indicate their presence in the parameter data when appropriate Command Query m i s Ic go halt halt ax mpcal autocal cc seriallp sleep seriallp fast fast clock clock damping damping Description Query Commands Compass update Magnetometer update Inclinometer update Temperature update Single update output word Last calibration score Action Commands Enter continuous output mode Halt continuous sampling enter standby mode Set halt h command to be single character command Warm reboot Multipoint calibration Automatic calibration Clear calibration data Enable low power mode Enter sleep mode User Configuration Parameters Enable fast sampling Set clock rate Set digital damping Input Output Parameter Format Cnnn n 4 Cnnnn mils X nn nY nn nZ nn n P nn nR nn n 9 P nnnR nnn mils T nnn n T nnn F 9 see text HnVnMn nn HnVnMn 0 0 0 00 e d 5 to 40 Default Parameter values Value 0 to 359 99 0 to 6399 mils to 89 9 u T 0 to 45 0 0 to 800 mils 25 0 to 100
28. Note This is for version 2 82K only Operating standard mode 15 20 mA depending on user configuration Operating low power mode 7 13 mA depending on user configuration Sleep mode 2 5 mA CHARACTERISTICS OF THE TCM2 20 AND 2 50 Physical Measurements Environmental Characteristics Dimensions 2 50 x 2 00 x 1 25 Operating Temperature 20 to 70 C Weight 1 6 ounces Storage Temperature 30 to 90 C Interfaces Digital RS232C 0183 Analog 0 5 V linear 19 53 mV resolution 256 discrete levels 0 5 V quadrature sine and cosine FEATURES OF THE TCM2 20 AND TCM2 50 Built in hard iron distortion correction system with advanced automatic hard iron calibration algorithms Soft iron correction system available if needed Compass heading pitch roll 3 axis magnetometer and temperature outputs are all available from 2 Distortion Detection raises a warning flag when magnetic disturbances such as nearby ferrous metals and electrical currents compromise accuracy User selectable sampling rate of 1Hz to 30Hz Optional heading damping Specifications subject to change without notice April 23 2002 PNI CORPORATION 5464 Skylane Blvd Suite A Santa Rosa 95403 USA 707 566 2260 FAX 707 566 2261 http www pnicorp com Appendix B Command List and Default Parameter Values TCM2 Command List Notes the Input Output Parameter Format column describes the AS
29. S For instructions on installing and using the TCM2 EXE program see section 6 1 If any of the 4 items are missing please contact PNI Corp 1 5 Conventions Used in this Manual Any data that is sent to or received from the TCM2 is presented in monospace font for example 326 3 lt gt lt 1 gt Place markers for ASCII characters are indicated by the character n Any monospace characters in italics 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 only when an error condition exists Also denotes the presence of a negative sign in a character string when the corresponding value is negative Note that the parentheses are not included in the output string and only serve to demark the hyphen TCM2 commands can be identified either by their mnemonics e g h or by their full names e g Halt continuous sampling Items in angle brackets either denote special characters or summary data e g lt cr gt denotes the carriage return character lt lf gt denotes a line feed lt error code gt denotes all the characters for an error code string PNI CORPORATION 5 2 Electronic Compass Module User s Manual Rev 1 09 2 Installation Instructions To install the TCM2 into your system follow these steps Choose a mounting location Mechanically mount
30. TCM2 to sample and return the X Y and Z axes of magnetometer data This command can be used when in the Standby mode to query the magnetometer readings regardless of whether magnetometer data has been selected for inclusion in the output word Usage m lt cr gt Output X nn nnyY nn nnZ nn nnEnnn lt cr gt lt l1f gt Resolution 0 01 uT Valid Ranges 0 to 79 9 uT Example m lt cr gt 2 X25 00Y10 50Z2 03 00Ennn checksum lt cr gt lt 1lf gt Command Inclinometer Update Description Causes TCM2 to sample and return the pitch and roll inclinometer data This command can be used when in the Standby mode to query the inclinometer readings regardless of whether inclinometer data has been selected for inclusion in the output word Usage i lt cr gt Output P nn nR nn nEnnn checksum lt cr gt lt l1f gt when inclinometer units set to degrees nnnR nnnEnnn checksum lt cr gt lt 1lf gt when inclinometer units set to mils Resolution 0 1 or 2 mils Valid Ranges 0 to 20 0 0 to 355 5 mils 0 to 55 0 to 973 5mils 0 to 80 0 to 1421 6mils Example i2 lt er gt P 30 0R 20 1Ennn checksum lt cr gt lt lf gt Command Temperature Update Description Causes TCM2 to sample and return the ambient temperature This command can be used when in the Standby mode to query the temperature readings regardless of whether temperature data has been selected for inclusion in the output word Usage t lt cr gt Output
31. The hard iron calibration algorithm uses a Kalman filtering algorithm Hence it is best to slowly move the TCM2 during hard iron calibration Interpreting the calibration score The TCM2 provides feedback on calibration through the calibration score which has the following format HnVnMn 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 factors that contribute to a good score for Hn and Vn are as follows magnetically quiet location was chosen for the user calibration procedure magnetic environment of the TCM2 s host is stable There no large sources of changing fields the calibration data points included a change in system inclination to allow for measurement of the vertical distortion field there no significant soft iron distortion effects The last number in the score Mn nn describes the magnitude of local field generated by the host system Larger numbers denote strong local fields Small local fields are obviously preferable since less correction will be necessary and they utilize less of the magnetometers dynamic range Hence alow Mn number is preferable A magnitude score greater than 30 0 indicates strong magnetic fields at the TCM2 location you should consider alternative mounting lo
32. allp e Serial low power enabled command The following table shows the power consumption in the different modes Note that the power consumption will vary 0 5 mamps between units The following measurements were for serial number 7536 Power supply via the unregulated input seriallp d MODES POWER CONSUMPTION Standby Mod Continuous sample at 16HZ 16 74 mamps Continuous sample at 8HZ 15 65 mamps Continuos sample at 1 HZ PNI CORPORATION 40 2 Electronic Compass Module User s Manual Rev 1 09 Power supply via the unregulated input seriallp e MODES POWER CONSUMPTION Standby mode 4 0 mamps Continuous sample at 16HZ 13 6 mamps Continuous sample at 8HZ 10 23 mamps Continuos sample at 1 HZ 7 5 mamps 2 87 mamps Power supply via the regulated 5 volt input seriallp d MODES POWER CONSUMPTION 11 3 mamps 16 0 mamps 15 0 mamps 4 0 mamps 7 mamps Power supply via the regulated 5 volt input seriallp e MODES 7 5 i Standby mode Continuous sample at 16HZ Continuous sample at 8HZ Continuos sample at 1 HZ 6 2 2 Sleep Mode Sleep mode was developed for applications where lower power consumption is necessary and continuous output is not required It takes about 100 msecs to wake up the 2 from sleep mode The TCM2 can be in sleep mode until a sensor update is required The TCM2 can also be powered off and powered back up for a sensor update but
33. ally define the roll 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 Because the tilt sensor uses gravity it is really measuring rotations around the level Earth coordinate axes Because these are fixed and do not rotate with the body the pitch and roll output by the TCM2 will act differently than the pitch and roll defined in an airplane PNI CORPORATION 18 2 Electronic Compass Module User s Manual Rev 1 09 You can use the tilt data output by the TCM2 to calculate the orientation of the TCM2 with respect to the level Earth coordinate frame Define a vector G that is perpendicular to the compass board and therefore is parallel to the z axis of the compass The coordinates of G X Y Z in the level Earth frame will be Z SQRT 1 tan P tan R X Z tan P Y Z tan R where P and R are the pitch and roll reported by the 2 The tilt range we specify for the TCM2 is the angle this G vector makes relative to gravity This tilt sensor is accurate within this tilt range The inclination of the compass relative to gravity can be easily calculated as arctangent X Y 22 where X Y and Z are the components of the G vector given above The compass will only compensate for the tilt within specifications wh
34. at will be turned on and off nearby ferrous bodies that will be changing positions Make sure the TCM2 is not mounted close to cargo or payload areas that may be loaded with large sources of local magnetic fields You may test the magnetic environment of the location where you wish to locate the TCM2 by temporarily mounting the TCM2 there connecting the TCM2 to a data terminal and taking magnetic field samples with manual commands Enable the magnetometers em e and watch the X Y and Z magnetometer outputs Experiment with different configurations of cargo turn various equipment on and off to determine if the TCM2 s sensors saturate or detect significant changes in local magnetic anomalies The TCM2 should be mounted in a physically stable location Choose a location that is isolated from excessive shock oscillation and vibration On a yacht for instance the TCM2 should not be located at the top of a mast The TCM2 should be mounted as close to level as possible To maximize the tilt range over which the compass operates the TCM2 should be mounted as close to level as possible 2 2 Mechanically Mounting the TCM2 Refer to the TCM2 Dimensional Specification in Appendix C for the TCM2 board dimensions location of the mounting holes and the orientation of the reference frame The TCM2 is factory calibrated with respect to the mounting holes thus it must be aligned within the host system with respect to these mounting holes not the board
35. cations You can use the magnetometer output em e to find positions on your equipment with the least magnetic field PNI CORPORATION 16 2 Electronic Compass Module User s Manual Rev 1 09 The calibration score values mostly provide a qualitative estimation e g A good score would be H9V9Mn nn A poor score is H5V2Mn nn or H9V2Mn nn 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 lull circles or that you turned too quickly Key Points for the MPCAL Routine e Tilt as much as possible during the calibration This allows the compass to take full advantage of the 3 axis magnetometer e Move slowly take at least a minute to make a full circle You are trying to get an even sampling of the magnetic field over as many headings and tilts as possible e f you get a bad calibration clear it before making a new calibration e attention to the score bad score is not good enough 3 10 Temperature Sensor Calibration The temperature sensor of the TCM2 can be easily calibrated if one can put the TCM2 in two environments with known temperatures Unlike the TCM1 the TCM2 does not require temperature compensation for the inclinometer The temperature sensor was left on the TCM2 for backward compatibility to the To calibrate the temperature sensor of the TCM2 Electronic Compass Module take the following steps 1 Give the TCM2
36. ce the TCM2 has been reinstalled in a different system without re calibration in which case the TCM should be re calibrated 3 9 User Calibration 3 9 1 What is 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 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 takes a series of magnetic field measurements 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 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 resultan
37. command syntax as you use the evaluation program s more friendly interface To install the program on your computer simply copy the TCM2 EXE file from the floppy to your hard drive Usage of the program is menu driven and self explanatory The TCM2 exe program will default to COM2 and baud rate of 9600 To start the TCM2 exe program on COM2 invoke the TCM2 exe program with the following command 2 1 2 space 1 The bottom screen the commands when the different buttons are selected It can also serve as a terminal program by pressing the F1 key In the terminal mode you can type commands directly to the TCM2 The program also includes a data logging feature In the Program I O Parameters menu you can open a data file After you open the data file all of the data going to or coming from the TCM2 compass will be saved to the file When you are done collecting data close the data file The file is saved in ASCII text The TCM2 EXE program CANNOT use the 38400 baud rate Do not use TCM2 EXE to change the baud rate to 38400 If the TCM2 is set to 38400 b 7 the TCM2 EXE program will not be able to communicate with it The 38400 baud rate can be used with other terminal programs that support this rate Examples of these programs are TELIX PROCOMM and the telephone icon in the PNI CORPORATION 35 2 Electronic Compass Module User s Manual Rev 1 09 Accessories window of Windows When using a terminal
38. e data from the TCM2 sensors from within the Standby mode You may wish to do this if you are manually operating the TCM2 for evaluation purposes or if the TCM2 only needs to be polled sporadically With the TCM2 in the Standby Mode you can query sensor data by either issuing single parameter updates with commands like or you can receive output word updates by issuing the s command output word may be configured as previously described in section 3 4 to provide either NMEA formatted compass data or the TCM2 Standard output word which presents any combination of TCM2 sensor data that you wish to receive The single parameter updates allow you to immediately query any sensor data Note that because the sensors are not continuously sampling in the Standby Mode data damping is automatically disabled Thus any updates you request will not be damped The Continuous Sampling Mode In the Continuous Sampling Mode TCM2 samples its sensors processes and stores this sensor data at the periodic rate you specify with the sp clock and fast commands You have several options available for specifying how the TCM2 should output this data continuous output serial analog output quadrature output Mouse output ONLY AVAILABLE ON VERSION 2 27 AND 2 34 the TCM2 will output the specified output word at the chosen period rate As soon as a new set of sensor data is processed by the 2 it is im
39. e temperature data for inclusion in the TCM2 standard output word For a description of the TCM2 standard output word format see section 3 4 2 Usage et n lt cr gt Output Ennn lt cr gt lt 1f gt Valid Values Input Meaning temperature data enabled will be included output word d temperature data disabled will be excluded from output word Example et e lt cr gt to enable temperature data for inclusion in output word lt cr gt lt 1f gt PNI CORPORATION 31 2 Electronic Compass Module User s Manual Rev 1 09 Related Commands et Command Query temperature data enable status Description Queries whether the temperature data is currently enabled or disabled for inclusion in the TCM2 standard output word For a description of the TCM2 standard output word format see section 3 4 2 Usage et lt cr gt Output et nEnnn lt cr gt lt 1f gt Valid Values Output Meaning e temperature data enabled will be included in output word d temperature data disabled will be excluded from output word Example et lt cr gt et e lt cr gt lt lf gt if temperature data is enabled Related Commands et Command Enable magnetic distortion alarm Description Enables or disables the magnetic distortion alarm output feature If enabled the 2 will report the magnetic distortion condition when detected The magnetic distortion alarm is reported as an error flag in the error code response in TCM2 output messag
40. echnology for many years The TCM2 is a state of the art low power high performance Electronic Compass Sensor Module The TCM2 combines for the first time ever a revolutionary three axis magnetometer and a high performance two axis tilt sensor in a package that is smaller and consumes less power than any other compass module currently available The TCM2 s elimination of a mechanical gimbal is unique among electronic compasses All compasses must be referenced to level to be accurate but instead of using a clumsy universal joint or fluid bath to hold its sensors level the TCM2 uses a highly accurate inclinometer tilt sensor to allow the microprocessor to mathematically correct for tilt This electronic gimbaling eliminates moving parts and provides more information about the environment pitch and roll angles and three dimensional magnetic field measurement in addition to compass output This extra data allows the TCM2 to provide greater accuracy in the field by calibrating for distortion fields in all tilt orientations providing an alarm when local magnetic anomalies are present and giving out of range warnings when the unit is being tilted too far At the heart the TCM2 its patented magneto inductive magnetometers are the first major advance in compass magnetometers since the fluxgate was invented in the 1930 s Their solenoidal single winding construction provides a more compact reliable and cost effective solution than torroidal flu
41. en the inclination is less than the TCM2 tilt range 4 Command List All of the TCM2 commands are summarized in a list in Appendix B along with the default values for all of the user parameters that are set when you receive the TCM2 Help command All TCM2 commands are displayed using the command Special Commands The TCM2 ordinarily does not echo characters received over the RS232 interface You may enable echoing by typing control e or disable it by typing Query Commands These commands are used to request data from the TCM2 Command Compass Update Description Causes TCM2 to sample magnetometer and inclinometer sensors calculate and return compass heading This command can be used when in the Standby mode to query the compass reading regardless of whether compass data has been selected for inclusion in the output word Usage c lt cr gt Output Cnnn nEnnn checksum lt cr gt lt 1f gt when compass units are set to degrees CnnnnEnnn lt cr gt lt lf gt when compass units are set to mils Resolution 0 1 or 2 mils Valid Ranges 0 to 359 9 or from 0 to 6399 mils Example If TCM2 configured for degrees c lt cr gt C255 5Ennn checksum lt cr gt lt lf gt If TCM2 configured for mils c lt cr gt C4480Ennn checksum lt cr gt lt 1lf gt Related Commands CORPORATION 19 2 Electronic Compass Module User s Manual Rev 1 09 Command Magnetometer Update Description Causes
42. er and terminal program such as TELIX or PROCOMM that can communicate at 38400 Then you can set the TCM2 to the desired baud rate There is no other way to change the baud rate of the TCM2 from 38400 after it has been changed that is there is no hard reset which will change the baud rate NOTE The TCM2 EXE program CAN ONLY use baud rates up to 19200 Although it can give the command to change the baud rate to a faster baud rate the TCM2 EXE will not be able to communicate at a baud rate greater than 19200 The TCM2 needs to be set to the same baud rate as the communication program If you do not know the baud rate of the TCM2 try using COM1 and baud rate If none of those combinations work try using COM2 and each baud rate 2 The calibration score looks good but when move the TCM2 the output of heading only changes a few degrees when turn the TCM2 through 360 A good score is H9V9Mxx x where lt 30 0uT Any value of the H and V that is less than 9 is not a good score e Your previous calibration may have been bad and you probably did not clear the previous calibration cc command before starting a new calibration You may have softiron TCM2 s MPCAL is a hardiron calibration program and will not account for softiron Softiron effect is a magnetic anomaly PNI CORPORATION 36 2 Electronic Compass Module User s Manual Rev 1 09 vector that changes as you rotate it around the earth s field T
43. es For a full description of the magnetic distortion alarm see section 3 6 Usage ed n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Meaning e magnetic distortion alarm enabled d magnetic distortion alarm disabled Example ed e lt cr gt to enable magnetic distortion alarm lt cr gt lt lf gt Related Commands ed Command Query magnetic distortion alarm Description Queries the TCM2 to report whether the magnetic distortion alarm is enabled or disabled For a full description of the magnetic distortion alarm see section 3 6 Usage ed lt cr gt Output ed nEnnn lt cr gt lt l1f gt Valid Values Output Meaning magnetic distortion alarm enabled d magnetic distortion alarm disabled Example ed lt cr gt ed d lt cr gt lt 1f gt if magnetic distortion alarm is disabled Related Commands ed Select analog output mode Description Instructs the TCM2 to set the mode for analog output For a full description of analog output modes see section 3 3 4 Usage sao n lt cr gt Output Ennn lt cr gt lt 1f gt Valid Values Input Meaning PNI CORPORATION 32 2 Electronic Compass Module User s Manual Rev 1 09 d analog output disabled linear analog output enabled q quadrature analog output enabled Example sao l lt cr gt to set analog output mode to linear lt cr gt lt 1f gt Related Commands Query analog output mode sao Command Query analog output mode
44. first time or for a new installation 2 Updating the TCM2 s calibration You must be in Standby mode in order to issue calibration commands The TCM2 can accept other commands during the calibration procedure Calibrating the TCM2 for the first time or for a new installation After installation of the 2 a new system or after moving the TCM2 to a new location within its current system you should perform a new calibration which consists of the following steps Clear any previous calibration Enable multipoint calibration mpcal e put the TCM in continuous mode go and turn the vehicle around at least twice changing the pitch and roll as much as possible Each turn should take longer than 1 minute The turn doesn t need to be a perfect circle In the calibration mode the TCM2 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 You can exceed the range of the inclinometer If you can tilt 90 degrees that would be the best vertical field calibration Halt the TCM h Check the calibration score Ic If the calibration score is not satisfactory set the TCM in continuous mode go and take more data points for 1 or 2 turns If the score still does not improve much disable multipoint calibration mpcal d clear the last calibration and redo the multipoint calibration
45. g Fine control of the clock rate PNI CORPORATION 4 2 Electronic Compass Module User s Manual Rev 1 09 Adjustable clipping values for the inclinometer e Maximum baud rate is 38 400 e Magnetic fields output has 0 01 uT resolution 1 3 Getting Started with the TCM2 This manual contains all the information you need to design and install the TCM2 into your system and to customize its parameters for your particular application If you wish to begin quickly experimenting with your 2 refer to section 5 Evaluating the TCM2 1 4 Packing List Your TCM2 Evaluation Kit should contain the following items 1 TCM2 Electronic Compass Sensor Module 1 Interface Cable 1 User s Manual 1 3 5 floppy disk containing TCM2 evaluation software TCM2 Warning The TCM2 board is an ESD sensitive device and must be handled accordingly It has a one year warranty Interface Cable The interface cable has on one end the proper connector to interface to the TCM2 the other has 10 separate wires to be connected to a power supply and host system as desired The wires are color coded and the associated signals are described in section 5 4 User s Manual This manual contains all you need to install design for and utilize the TCM2 Floppy Disk and TCM2 Evaluation Software The 3 5 floppy is a high density disk formatted for DOS systems It contains the TCM2 EXE program that executes on any IBM AT compatible computer running DO
46. his is a much more complicated anomaly to fix 3 The heading from the TCM2 jumps around or just seems wrong First look for any error code Refer to section 3 3 2 for detailed error code e The heading of the TCM2 is calculated using the magnetometer outputs and 2 axis inclinometer It is important to identify the sensor that is noisy Send the following commands to enable all the sensor outputs em e ep e er e ec e go Check the values of pitch roll x y and z magnetometers Check if any of the sensors are noisy If the magnetometers are noisy look for changing external sources of magnetic fields that could be changing If the inclinometer is noisy check for vibration e Check for any distortion sensed by the 2 by checking if there is an error flag in the output word If there is an error flag including E001 or E004 then you may not have cleared the calibration cc before a new calibration If the error flag is then E400 then there is a serious EEPROM error and you must contact PNI Corp to determine how to restore the EEPROM coefficients Check whether the three magnetometer sensors are working by giving the following commands sdo r set data output to raw s get a single update of the output word The first line of the output will look like this Yannn nnnn Znnnn nnnn If both numbers nnnn n
47. ibration is not required for most purpose and better results will be obtained from re running the multipoint calibration This is an advanced calibration technique not required for most usage It continuously updates the estimated hard iron distortion vector At 10Hz the response time of the TCM will not be affected even with automatic calibration enabled However for example if the TCM is sampling faster than 10Hz and auto calibration is set the real time response of the TCM is not fully maintained PNI CORPORATION 14 2 Electronic Compass Module User s Manual Rev 1 09 This mode should be used with care there are a number of environmental characteristics that lead to incorrect results This mode should not be used in environments where there are many transient magnetic anomalies or the system has a continuous repetitive movement that does not cover much of a circle while pitching and or rolling Automatic calibration should be enabled after multipoint calibration The following commands are used to enable automatic calibration autocal e Enable automatic calibration go Run in this mode take data points h Update the EEPROM with the newly computed hard iron distortion autocal d Disable the autocal mode To check how well the automatic calibration improved the score use the last calibration command Ic Note that the EEPROM does not save the new autocal computed coefficients until the data acquisition is halted h
48. ils d t standard output word t n NMEA format m Mouse output e enabled d disabled e enabled d disabled e e enabled d disabled e e enabled d disabled d e enabled d disabled d e enabled d disabled d d disabled linear d q quadrature c corrected u uncorrected TCM2 Command List 7 23 97 Appendix C Dimensional Specification 1 05 0 95 PITCH 9 NO TES UNLESS O THERWISE SPEC IFIED 1 UNITS ARE IN U S INC HES 2 TOLERANCES 0 1 2 00 XXX 0 01 X XXX 0 005 3 THE COMPASS MODULE SHOULD BE ALIGNED ROLL WITHIN THE HO ST SYSTEM WITH RESPECT TO a THE CENTERS OF THE MOUNTING HOLES PART NOMENCLATURE IDENTFYING NO OR DESCRIPTION SPEC PARTS UST PNI Corporation sex oon 5662261 5464 SKYLANE BLVD SUITE A SANTA ROSA CA 95403 1084 TEL 707 566 2260 TCM2 DIMENSIONAL SPECIFICATIONS PROPRIETARY AND CONFIDENTIAL THE INFORMATION CONTAINED IN THIS X DRA PNI WING ISTHE SOLE PROPERTY OF I CORP ANY REPRODUCTION IN PART TE OR ASA WHOLE WITHOUT THE WRITTEN NEXTASSY SED 5 GERSON PERMISSION OF PN CORP IS PROFITED lt gt 4 8 7 6 5 4 3
49. ing mode In this mode the 2 is actively collecting sensor data at the prescribed sampling rate The principle means of output from the 2 is via RS232 serial communications You may configure the TCM2 either to output the latest sensor data on a continuous unprompted basis or to provide an update only upon demand Mouse digital and or analog signals may also be output instead of or in addition to the RS232 signal selected above when the go command is issued The TCM2 will return to the Standby mode when it receives the h command The TCM2 enters a Reset state if power is cycled or if an ax command is received After reset the TCM2 returns to the previous output mode and continues operation Mouse mode is not available in version 2 34 and higher 3 2 TCM2 Command Syntax There are three types of commands you may issue to the TCM2 commands to set user definable parameters commands to query the TCM2 for data or for the stored value of user definable parameters and action commands All commands must be followed with a lt cr gt or lt cr gt lt lf gt The lt lf gt characters are ignored by the 2 but are supported to allow compatibility with a variety of terminals TCM2 Commands Set TCM2 user parameters lt parameter gt lt value gt lt cr gt Query TCM2 data parameter or sensor values lt parameter gt lt cr gt Action command lt command gt lt cr gt Detailed descriptions of all command
50. ions of the inclinometer it could output angles within the range of the inclinometer even though they are not valid angles Magnetometer out of range The magnetometer sensors are detecting an ambient magnetic field that exceeds the maximum dynamic range of the magnetometer in any of the three axes Magnetic distortion alarm TCM2 is detecting a local magnetic anomaly that may be compromising the accuracy of compass and magnetometer readings See section 3 8 for more details on this feature PNI CORPORATION 9 2 Electronic Compass Module User s Manual Rev 1 09 3 3 3 Mouse Output SORRY ONLY AVAILABLE IN VERSIONS 2 34 AND 2 27 The 2 is used as a head tracker in many different Head Mount Displays 2 can output mickeys to emulate a Microsoft mouse The mouse output was added for demonstration purposes since many games use the mouse output to emulate head position The forward and backward motion of the mouse is emulated by the pitch motion of the TCM2 Note that the range of the forward and backward motion is limited by the tilt range of the inclinometer The side motions are translated by the change in the heading The roll motion is not output The most effective way to track head motion is to use the TCM2 standard output and interpret the heading pitch and roll in place of mouse mode The following commands have to be executed to put the TCM2 into mouse mode sdo m set output to mouse output m
51. is enabled Usage fast lt cr gt Output fast nnEnnn lt cr gt lt 1f gt Valid Values Output Meaning Enabled d Disabled Example fast lt cr gt fast e lt cr gt lt lf gt for fast enabled Related Commands fast PNI CORPORATION 23 2 Electronic Compass Module User s Manual Rev 1 09 Command Set Clock Rate Description Enables the user to have fine control of the clock rate The ability to sample at the higher speeds must be matched with the amount of data being output at each sample At 9600 baud each character requires about 1 millisecond to output so at 30 Hz at most 30 characters can be output which is not enough for all data outputs to be enabled in the output word Usage clock nn nn lt cr gt Output Ennn lt cr gt lt lf gt Valid Values From 5 Hz to 40 Hz Input value 5 5 Hz 40 40 Hz Example clock 30 lt cr gt clock rate is 30 Hz lt cr gt lt 1f gt Related Commands clock fast fast sp sp Command Query clock rate Description Queries the rate the clock is set to Usage clock lt cr gt Output clock nnEnnn lt cr gt lt 1f gt Valid Values From 5 Hz to 40 Hz Input value 5 5 Hz 40 40 Hz Example clock lt cr gt 16 lt gt lt 1 gt clock rate set to 16 Hz Related Commands clocks fast fast sp sp Command Set Digital Damping Description This mode can be set to filter the output The damping uses an IIR filter on the measured data I
52. me constant is set to 30 samples a reasonable value for skip is 15 3 7 Output Response Time The TCM2 samples the sensors at the rate selected by the clock command between 5 40Hz Measurement of the sensors requires about 50 milliseconds in normal mode fast d and about 30 milliseconds in fast mode fast e Refer to the command list in section 5 for details on the different modes and clock rates Computation is overlapped with measurement of the sensors and requires about 20 milliseconds If the data output time data output time is set by b commands and output word length exceeds the clock rate the TCM2 will skip a sensor measurement You must increase the baud rate or decrease the clock rate on message length Latency In continuous mode the maximum latency from the time a measurement starts to the end of the data transmission is as follows Normal Fast Measurement time 50 msec 30msec Computation time 20msec 20msec Output word length 30 at 9600 baud rate 30 msec 30msec Output word length 39 at 38400 baud rate 8 5msec 8 5msec Total time at 9600 baud rate 100msec 80msec Total time at 38400 baud rate 78 5msec 58 5msec In standby mode at a clock rate of 40Hz 25msec sample rate the maximum latency is increased by 25msec 3 8 Using the Magnetic Distortion Alarm How the magnetic detection alarm works The TCM2 s magnetic distortion alarm indicates magnetic anomalies that compromise compass and magnetometer accurac
53. mediately transmitted As discussed in section 3 4 the output word can either be NMEA or TCM2 Standard formats The continuous output mode should be utilized if you wish to have the TCM2 automatically provide a periodic output without being prompt by the host system 3 6 Digital Damping Digital damping is used to filter the output The damping uses an IIR filter on the measured data It is only enabled during continuous mode The digital damping feature computes the following output 1 f timeconst current measurement f timeconst oldmeasurements It outputs this as the current measurement and stores it in place of the old measurements The function f is as follows PNI CORPORATION 12 2 Electronic Compass Module User s Manual Rev 1 09 f 104 log 1 2 timeconst The time constant is set using the timeconstant n command The filter time constant over about n measurements If the sample rate is 16Hz n 32 filtering is done over about 32 measurements or for a damping period of 2 seconds The skip n command can be used with digital damping It allows the TCM2 to take fast continuous measurements but output every nth one This is useful if you want to filter the output over a large sample In this mode if every sample was output due to the low pass filter every output will not be significantly different from one another and hence it would be more useful to output every nth one l e if the sample rate is 16Hz and the ti
54. meter update i Temperature update 12 Example The 2 will return the following C328 3P28 4R 12 4X55 11Y12 332 18 43T22 3E001 checksum lt cr gt lt lf gt under the following conditions compass heading 328 3 true or magnetic depending on configuration pitch 28 4 roll 12 4 Bx 55 11uT x component of magnetic field By 12 33 uT y component of magnetic field Bz 18 43 uT z component of magnetic field Temperature 22 3 depending on configuration E001 Distortion flag is raised magnetic anomaly nearby PNI CORPORATION 11 2 Electronic Compass Module User s Manual Rev 1 09 Any parameters not enabled by the user are not included in the output word e g C328 3T22 3 checksum lt cr gt lt 1f gt for compass and thermometer information only If all data parameters are disabled no message will be output at all in response to s or in continuous output mode unless an error condition exists The checksum value is computed and reported identically to that for the NMEA output format 3 5 How to Configure the TCM2 Output Standby vs Continuous Sampling Modes As previously explained in section 3 1 in Standby mode the compass lies idle and does not sample the sensors whereas in the Continuous Sampling mode the compass is actively sampling its sensors at the sampling rate specified by the clock command Sampling in the Standby Mode You can activate and receiv
55. mpass MPCAL is convenient for most users because it does not require any precision positioning Some users may find the alternative routine CAL3 provides an easier accurate and quicker method of measuring the hard iron correction Description The CAL3 routine requires the user to take three measurements in three orientations It is very important for the accuracy of the routine that the orientations be as exact as possible Any error in positioning will translate directly into errors in the hard iron calibration This is why the MPCAL routine is more convenient for most users The CAL3 hard iron calibration requires the user to take one measurement turn their system 180 exactly take another measurement turn their system upside down exactly and take a third measurement The compass is taking two measurements on each axis with the directions reversed between them The average of the two measurements is the hard iron vector that the TCM2 needs to correct Procedure 1 Position your system to start Figure 1 2 Type CAL3 lt enter gt 3 TCM2 will take a measurement then ask you to turn your system 180 It is very important that this be as exact as possible In general this will require some sort of fixture to hold and position your sensor Turn your system exactly 180 Figure 2 4 When you have put your system the new position press the space bar The 2 will take a measurement and ask you to turn your
56. n ana au Waaa nu Gua Sa pa Y 6 3 3 1 TCM2 Command 6 3 22 2 yaykuq 7 23 3 MOUSE 8 3 3 4 Analog Outputs x uuu squa alas upa aah 8 3 4 TCM2 RS232 Data Output Word a 9 0183 yu Su 9 3 42 T CMA StamGard Mak S n ee A ua umay aaa 9 3 5 How to Configure the TCM2 Output 10 3 60 a 10 3 7 Output Response Tile uu uru qua assis aa a a EAE 11 3 8 Using the Magnetic Distortion 11 3 9 0 tee he ot alba Seay 12 3 9 1 What is User Calibration 12 3 9 2 User Calibration ProC Cures ccccccccececceeceeeeeeeceeeeeeeeeeeeeeeeeeseseeeeeeeeeees 14 3 10 Temperature Sensor 15 3 11 TCM2 Pitch and Roll 16 4 OJA aA aTe Laa IN DISE EE EP EAE AATE 17 5 Evaluation INStruCuOn s ee unusual 32 5 1 2 Default 32 5
57. nal Maritime Electronics Association 0183 specification which describes a standard RS232 bus format for exchange of a variety of navigation information GPS radar compass etc In the NMEA output format only compass heading information is available Inclinometer magnetometer thermometer data and the distortion detection warning are all unavailable SHCHDM lt compass gt M checksum lt cr gt lt 1f gt for magnetic heading e g SHCHDM 182 3 lt gt lt 1 gt for magnetic heading 182 39 The checksum value is the result of XOR ing the ASCII bytes between the and characters This byte value is reported in the output word by two ASCII characters representing two hex digits with the most significant nibble first For example _ A8 lt cr gt lt lf gt indicates that the output word has a decimal checksum value of 163 3 4 2 TCM2 Standard Output The TCM2 standard output format may be configured to provide all of the sensor data parameters available or only those parameters required by the user C lt compass gt P lt pitch gt R lt roll gt X lt Bx gt Y lt By gt Z lt Bz gt T lt temp gt E lt error code gt checksum lt cr gt lt 1f gt For detailed information regarding the character formatting and resolution of the values for each of the data parameters in the output word refer to the descriptions in section 4 for the following commands Compass update c Magnetometer update m7 Inclino
58. ng period Description Queries the sampling period which specifies the rate at which the TCM2 will sample its sensors in continuous sampling mode and the rate at which the TCM2 will transmit output words in continuous output mode The value is expressed in 0 125 second increments Usage sp nnn lt cr gt Output Ennn lt cr gt lt lf gt Resolution 0 125 second corresponds to input of 1 Valid Ranges 0 125 to 60 seconds corresponds to input of 1 to 480 Example sp lt cr gt sp l lt cr gt lt 1lf gt for sampling period 0 125 seconds PNI CORPORATION 26 2 Electronic Compass Module User s Manual Rev 1 09 PNI CORPORATION Related Commands sp Set baud rate Description Usage Output Ennn Valid Values Example Related Commands Sets the baud rate for the RS232 interface This new baud rate specified will not used immediately but only after the 2 has been reset with Warm reboot command or by cycling power on and off b n lt cr gt lt gt lt 1 gt Input Baud Rate 1 300 2 1200 3 2400 4 4800 5 9600 6 19200 7 38400 b 5 lt cr gt to set baud rate to 9600 baud lt cr gt lt 1f gt b Command Query baud rate Description Usage Output Ennn Valid Values Example Related Commands Queries the baud rate set for the RS232 interface Note that this command returns the baud rate that will be in effect after the TCM2 has been rese
59. nnn after X Y Z 0000 e g X 0000 0000 then that sensor or the drive circuitry is malfunctioning Please contact PNI Corp e To put the TCM2 back in normal operating mode give the sdo t command for the standard TCM2 output word or sdo n command for the NMEA 0183 output word 4 The pitch or roll output does not change e First make sure that the inclinometer is not set to clip at any particular angle with the cclip command Either set the clip to 0 cclip 0 or set the clip to a value that is greater than the tilt range of your system e g cclip 19 Make sure that you are giving the TCM2 power correctly refer to section 5 2 e Check the voltage level applied to the 2 The sensor accuracy depends on the current voltage level and current level 5 The output rate is slower than it should be e The output rate is a function of a number of commands clock sp and skip The sampling rate is equal to the clock divided by the sampling period clock sp The TCM2 uses the skip value even when damping PNI CORPORATION 37 2 Electronic Compass Module User s Manual Rev 1 09 is not enabled The actual output rate is equal to the sampling rate clock sp divided by the number of samples that the 2 is to skip skip Therefore the output rate is clock sp skip If you are not using the digital damping feature then use the skip 0 command so that the TCM2 does not
60. nput 2 4 Calibration for Distortion Fields After installation the TCM2 can be calibrated for local magnetic fields present in the host system The TCM2 can fully compensate for hard iron magnetic anomalies sources of static magnetic fields The User Calibration procedure described in section 3 9 provides a quick and easy means of canceling the effects of these local magnetic anomalies Calibration data is stored in the TCM2 s non volatile EEPROM memory so that it is preserved after power down 3 Using the TCM2 This section describes how to configure program and control the TCM2 in your target system 3 1 Compass Operating Modes Standby Mode The TCM2 is in Standby mode when the user issues an h halt command or ax reset During Standby mode the 2 is idle and not sampling any sensors You may PNI CORPORATION 7 2 Electronic Compass Module User s Manual Rev 1 09 configure and verify the TCM2 s user parameters in the Standby mode set sampling rate filter parameters etc You may also query the 2 for single updates of compass heading pitch and roll magnetic field strength and temperature Because the 2 5 sensors are not sampling continuously during Standby filtering is automatically disabled and power consumption is reduced Continuous Sampling Mode After configuring the TCM2 in the Standby mode issue the go command to send the 2 into Continuous Sampl
61. nteger value between 1 255 Value of the measurement time constant Example timeconst lt cr gt timeconst 100 lt cr gt lt 1f gt _ filtering is done over 100 measurements Related Commands damping skip Command Skip Measurements Description This command is used with the Set Digital Damping command This command will allow the TCM2 to take continuous measurements but output at a slower rate For instance you could set the time constant to 100 in the digital damping mode and set skip 50 and output every 50th measurement Usage skip n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Meaning integer value between 1 Skip n number of measurements Example skip integer lt cr gt setthe number of measurements to skip lt cr gt lt 1f gt Related Commands damping damping timeconst timeconst skip Command Query Skip Description Queries the number of measurements to skip Usage S skip lt cr gt Output skip nnEnnn lt cr gt lt lf gt Valid Values Output Meaning integer value between 1 Set to skip n number of measurements Example lt gt skip nnEnnn lt cr gt lt 1f gt nn number of measurements Related Commands damping timeconst timeconst skip PNI CORPORATION 25 2 Electronic Compass Module User s Manual Rev 1 09 Set Clip Value Description This command allows the user to set a clipping value for the
62. oll data for output word er Enable magnetometer for output word em Enable temperature data for output word et Command Query last calibration score Description Instructs the TCM2 to report 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 Use Test calibration status to check if the last calibration is still valid For a complete description of user calibration see section 3 8 Usage 1 lt gt Output HnVnMn nnEnnn lt cr gt lt l1f gt Valid Ranges 0 9 for each score digit Example 1 lt gt H7V8M8 00 lt cr gt lt 1f gt Related Commands multipoint calibration mpcal auto calibration autocal Action Commands Command Enter continuous sampling mode Description Instructs TCM2 to enter Continuous Sampling mode from the Standby mode The TCM2 will immediately begin sampling sensors at the rate specified by the clock command The TCM2 will automatically transmit data at the sampling rate and according to the output word format currently specified To exit the TCM2 and return to Standby mode issue the Halt Continuous Sampling h command Usage go lt cr gt Output Selected data output word Example go lt cr gt Related Commands Single update of output word s Halt continuous sampling h Command Halt continuous sampling enter standby Description Instructs TCM2
63. ord command and in continuous output mode For a full description of TCM2 output words see section 3 4 Usage sdo n lt cr gt Output lt gt lt 1 gt Valid Values Input Meaning t standard TCM2 output word n NMEA output format m mouse output format Example sdo s lt cr gt to set output word format to TCM2 standard lt cr gt lt l1lf gt Related Commands sdo Command Query RS232 output word format Description Queries the output word format to be used in response to the Single update output word command and in continuous output mode For a full description of TCM2 output words see section 3 4 Usage sdo lt cr gt Output sdo nEnnn lt cr gt lt l1f gt Valid Values Output Meaning t standard TCM2 output word n NMEA output format m mouse output format Example sdo lt cr gt sdo t lt cr gt lt lf gt for output word format set to TCM2 standard Related Commands sdo Command Enable compass data for output word Description Instructs the TCM2 to either enable or disable compass data for inclusion in the TCM2 standard output word For a description of the TCM2 standard output word format see section 3 4 2 Usage ec n lt cr gt Output Ennn lt cr gt lt 1f gt Valid Values Input Meaning compass data enabled will be included output word d compass data disabled will be excluded from output word Example ec e lt cr gt to enable compass data for inclusion in output word lt cr
64. r corresponding bit locations are given below 1st Bit 3 MSB EEPROM1 error Bit 2 2 error Bit 1 Reserved for future use always 0 Bit 0 LSB Reserved for future use always 0 2nd 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 available on current model of TCM2 3rd Bit 3 MSB Reserved for future use always 0 Bit 2 Magnetometer out of range Bit 1 Inclinometer out of range Bit 0 LSB Magnetic distortion alarm Thus if the following error conditions existed command parameter invalid and magnetic distortion alarm then the corresponding error message would be E041 Description of Error Conditions Command Parameter Invalid the command given to the 2 contains an invalid or out of range value Command invalid or not available on current model of TCM2 The command received is not recognized by the TCM2 The syntax is incorrect or you have entered a command which is not supported by the TCM2 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 or roll When this error flag is raised compass and inclinometer output data should be disregarded Note that extreme out of range conditions may not be detected i e when the inclinometer is upside down due to the physical dimens
65. s are in section 4 and a command summary is listed in Appendix B 3 3 TCM2 Output 3 3 1 TCM2 Command Responses The TCM2 will transmit data across the RS232 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 Response Valid parameter setting commands lt cr gt lt lf gt Valid action command varies according to command Valid parameter query commands lt parameter gt lt value gt lt cr gt lt lf gt Invalid or unrecognized command E lt code gt lt cr gt lt lf gt Valid sensor query command varies according to command The character signifies a successfully identified and executed command 3 3 2 TCM2 Error Codes PNI CORPORATION 8 2 Electronic Compass Module User s Manual Rev 1 09 Error codes are transmitted by the TCM2 during responses to commands or as part of TCM2 messages in continuous output mode See descriptions of TCM2 output formatting for location of these error codes within TCM2 output strings Error codes are given by three ASCII characters representing hexadecimal digits i e 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 The error conditions and thei
66. s to be able to tolerate inaccurate heading when acceleration is present A formula which relates acceleration to the error in tilt is as follows Acceleration 5 gravity tangent A where A is the error measured in degrees solve for A to get the error This equation only applies to the standard 20 dampened tilt sensor fluid used on the TCM2 The scale factor 5 will be different for different type of tilt sensor fluids For example with acceleration of about 0 84 m sec sec and gravitational force of 9 8 m sec sec then the error tilt will be about 1 The related error in heading will be from 1 to about 8 depending on where the compass is on earth Here Mountain View the error in heading for 1 of tilt will be about 2 1 Settling time After a sudden change in heading the settling time for the inclinometer which is the limiting factor is approximately 300 msec Shock The limiting factor for surviving shock is the inclinometer The vendor of the inclinometer provided the only test results we have for the inclinometer it was shown to withstand 20 g for 11 msec and to withstand 11g for 18 msec We do not have any test results for any other situations Vibration The natural frequency of the standard fluid in the inclinometer is approximately 20 Hz If the system has frequencies that are within a few hertz of this the tilt sensor will give inaccurate readings which means that the heading will also be
67. sponds to a 1 4 compass heading An output voltage of 2 5V corresponds to a compass heading of 179 5 Note that there is an abrupt switch in output voltage at 360 from 4 98 V to OV In the quadrature mode two DC voltages provide the sine and cosine of the heading angle thus eliminating voltage discontinuities Analog output 1 pin 9 is cosine of the heading analog output 2 pin 8 is sine of the heading 4 98 V corresponds to sin heading or cos heading equal to 1 OV corresponds to sin heading or cos heading equal to 1 If the compass is facing north 0 you will see 4 98 V at pin 9 cos 0 1 and 2 5 V at pin 8 sin 0 0 PNI CORPORATION 10 2 Electronic Compass Module User s Manual Rev 1 09 The user should always place a buffer between the TCM2 analog output and the input of an ADC analog output should swing from 0 V to 4 98 V If you do not see the maximum output reach 4 98 V you are probably loading the 2 analog output 3 4 TCM2 RS232 Data Output Word The TCM2 sends an output word in ASCII form across the RS232 serial link when issued the s single output word command or when in continuous sampling mode This data output word may be configured by the user for the desired format and configuration The user may select either NMEA 0183 or TCM2 standard output word formats with the sdo command 3 4 1 NMEA 0183 Format The TCM2 can be configured to conform to the NMEA Natio
68. sx nnnn nnn is from 0 to 32767 msy nnnn b 2 set baud rate to 1200 ax This will set the TCM2 to baud rate of 1200 You will also need to change the baud rate of your terminal program to be able to communicate with the TCM go Sets the unit to continuous mode Needs to be set to continuous for a mouse Mouse sensitivity is controlled by the msx and msy command msx 360 results in one mickey of output per 1 degree change 3 3 4 Analog Outputs The TCM2 supports analog output of compass heading data to provide compatibility with a wide range of existing systems The analog output is enabled by sao e However analog output modes do not provide full resolution error flags tilt data or magnetic field information so if you are implementing the TCM2 into a new design utilizing the RS232 interface is strongly recommended There are two analog output formats available linear and quadrature Use the Select analog output mode command sao to configure the TCM2 to provide the analog output mode that you desire In the linear mode the TCM2 s digital compass heading is converted to a DC voltage ranging from 0 to 4 98 V by an 8 bit digital to analog converter DAC Thus heading resolution is 8 bits 256 increments around a full circle Specifically the 5V range is divided into 19 6 mV increments where each increment corresponds to a 1 4 change in compass heading Thus an output voltage of 19 6 mV corre
69. t earth s field vector One major benefit you will enjoy from the TCM2 s triaxial magnetometer biaxial inclinometer system configuration is its ability to compensate for hard iron 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 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 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 which present a different local distortion field than that measured during calibration Automatic Calibration This is a new feature that has been added to the TCM2 The principal of automatic calibration is to correct for any deviations from the initial calibration corrections The magnetic anomalies of a system can change over time Hence after initial calibration you might need to re calibrate the system to get accurate compass data The automatic calibration feature allows the user to enable the TCM2 to automatically correct for magnetic anomalies in the system Automatic cal
70. t is only enabled during continuous mode Usage damping n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Meaning e Enable damping d Disable damping Example damping e lt cr gt to enable damping lt cr gt lt l1lf gt Related Commands damping skip timeconstant Command Query damping mode Description Queries whether damping is enabled Usage damping lt cr gt Output damping nnEnnn lt cr gt lt lf gt Valid Values Output Meaning e Enabled d Disabled Example damping lt cr gt damping e lt cr gt lt lf gt for damping enabled PNI CORPORATION 24 2 Electronic Compass Module User s Manual Rev 1 09 Related Commands damping skip timeconstant Command 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 Refer to Set Digital Damping command Usage timeconst n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Meaning integer value between 1 255 Set the measurement time constant Example timeconst 16 lt cr gt filtering is done over 16 measurements Or 1 second for 16 Hz sample rate lt cr gt lt l1lf gt Related Commands damping damping skip Command Query Time Constant Description Queries the value of the time constant Usage timeconst lt cr gt Output timeconst nnEnnn lt cr gt lt lf gt Valid Values Output Meaning i
71. t lf gt Related Commands Query last calibration score Ic Clear calibration data cc Multipoint calibration mpcal Automatic calibration autocal User Configuration Parameter Commands The following commands allow you to set and query the values of the TCM2 s user configuration parameters These parameters specify how the TCM2 will operate such as sampling rate baud rate etc The TCM2 stores all parameter values in EEPROM when specified so that after a reboot or power cycling it will return to the last configuration set Note that any parameter that specifies a numeric value must be specified with the current setting of the appropriate units The default values that are set for these configuration parameters at the factory are given in Appendix B Command Enable Fast Sampling Description Enable Fast sampling This command in conjunction with the clock command will allow the unit to sample up to 30Hz with less accurate magnetometer and compass measurements The random noise in the compass heading measurements increases to about 0 3 degrees in this mode Use this command at sample rates greater than 16 Hz Usage fast n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Meaning e Enable fast mode d Disable fast mode Example fast e lt cr gt to enable fast sampling mode lt gt lt 1 gt Related Commands fast Command Query fast sampling mode Description Queries whether fast sampling
72. t with a Warm reboot command or by cycling power on and off If the baud rate has been changed with the Set baud rate command and the TCM2 has not yet been reset this return value as stored in EEPROM not be the baud rate currently in use by the 2 b lt cr gt lt cr gt lt 1f gt Output Baud Rate 1 300 2 1200 3 2400 4 4800 5 9600 6 19200 7 38400 b lt cr gt b 5 lt cr gt lt lf gt for baud rate set to 9600 baud b Command Set temperature units Description Usage Output Ennn Valid Values Example Related Commands Sets the units to be used for input output of temperature data ut n lt cr gt lt cr gt lt lf gt Input Units f Fahrenheit Celsius ut f lt cr gt to set units to Fahrenheit lt cr gt lt lf gt ut Command Set temperature units 27 2 Electronic Compass Module User s Manual Rev 1 09 Description Queries the units currently used for input output of temperature data Usage ut lt cr gt Output ut nEnnn lt cr gt lt 1f gt Valid Values Output Units f Fahrenheit Celsius Example ut lt cr gt ut f lt cr gt lt lf gt for units set to Fahrenheit Related Commands ut Command Set compass units Description Sets the units to be used for input output of heading data Usage uc n lt cr gt Output Ennn lt cr gt lt lf gt Valid Values Input Units d degrees 360 in a full circle m mils 6400 mils in a full circle Example
73. the TCM2 will take about 430 msecs to respond after initial power up New commands Command Description sleep Put TCM2 in sleep mode wake Sample wake program to take the TCM2 out of sleep mode When the sleep command is executed the TCM2 enters the sleep mode of operation This command turns off the internal clocks and the RS232 chip The 2 is put into sleep mode by executing the sleep command via RS232 To wake the TCM2 a falling edge on the int2 interrupt 2 pin of the processor is required This is achieved by connecting pin 6 of the TCM2 connector previously the mouse pin to the RTS pin pin 4 on a DB25 and pin 7 on a DB9 of the COM port A sample wake c program is provided on the TCM2 EXE diskette 6 2 3 New Halt Command New commands Command Description PNI CORPORATION 41 2 Electronic Compass Module User s Manual Rev 1 09 halt e h command for halting the output halt d h cr command for halting the output default is halt d In previous versions of the TCM2 during go mode continuous output mode sometimes the halt command was not accepted This is because interrupts are disabled during inclinometer reading to synchronous the sensor readings Interrupts are off for several milliseconds potentially permitting a receive buffer overflow To correct this the halt command during go mode has optionally been made a single character command using the halt e command 6 2 4 Changes
74. the following command to change the output word to the raw outputs as opposed to the TCM2 standard output word or NMEA 0183 output word sdo r r stands for raw output Note that all commands are followed by hitting the lt enter gt key which is the carriage return of the keyboard Now when you ask for an update of the output word with the s or go command the TCM2 will output the raw pitch roll 3 axis magnetometers X Y and Z and temperature readings For example P0388 0077 ROOB8 0320 X57D8 6046 Y6680 5FB6 26328 631 T0269 2 Put the TCM2 in an environment with a known temperature in Celsius T1 For example T1 10 C 3 Ask the TCM2 for an update of the output word with the s command Write down the raw temperature reading which is the number at the end after the letter in the output word This temperature is TR1 4 Change temperature of the environment of the TCM2 to a new known temperature in Celsius T2 For example T2 20 C 5 Ask the TCM2 for an update of the output word with the 62 command Write down the raw temperature reading This is TR2 6 Solve the following two equations for the temperature constants KTO and KT1 PNI CORPORATION 17 2 Electronic Compass Module User s Manual Rev 1 09 T1 1 1 T2 KT1 TR2 KT0 THEN T1 T2 KT1 TR1 KT1 TR2 KT0 KT0 T1 T2 KT1 TR1 TR2 T1 T2 TR1 TR2 1T1 KT1 TR1
75. to exit Continuous Sampling mode and enter the Standby mode If this command is received while the TCM2 is transmitting an output word the remainder of the output word will be sent before the TCM2 changes modes Usage h lt cr gt Output lt cr gt lt 1f gt Command Warm reboot Description Instructs TCM2 to reset The TCM2 will halt its current activity and reset to the operational mode last specified Thus the output mode selected before the ax command will remain the same after the warm reboot Before resetting the TCM2 will return lt cr gt to indicate that is has received the command properly Usage ax lt cr gt PNI CORPORATION 21 2 Electronic Compass Module User s Manual Rev 1 09 Output lt cr gt Example ax lt cr gt Related Commands continuous sampling h Command Multipoint calibration Description Instructs TCM2 to take calibration points This command is valid only during continuous mode go The TCM2 will sample its sensors and add the data point to the current set of calibration data For a full description of the user calibration procedure see section 3 9 Usage mpcal e lt cr gt go lt cr gt te ae take data in continuos mode h lt cr gt mpcal d lt cr gt Input Meaning Valid Ranges e enable multipoint calibration d disable multipoint calibration Output HnVnMn nnEnnn lt cr gt lt l1f gt The TCM2 only reports a calibration score after it has been put
76. tometer readings output by the TCM2 will reflect corrections to ambient field as a result of user calibration If not corrected readings are selected the magnetometer readings output will reflect total ambient field including local fields Note that compass readings always are based upon corrected magnetometer readings Usage ma n lt cr gt Output Ennn lt cr gt lt 1f gt Valid Values Input Meaning choose corrected magnetometer readings u choose not corrected magnetometer readings Example ma c lt cr gt to choose corrected magnetometer readings lt cr gt lt 1f gt Related PNI CORPORATION 33 2 Electronic Compass Module User s Manual Rev 1 09 Commands Set magnetometer output option ma 5 Evaluation instructions The most convenient means of experimenting with the TCM2 is by connecting the TCM2 to a power supply and IBM AT compatible PC computer using the cable supplied with the evaluation kit You may then use the PC to configure and communicate with the TCM2 5 1 TCM2 Default Configuration The TCM2 is configured to output compass pitch and roll data at 9600 baud It will be in Standby mode All units will be configured for the default units Please refer to appendix B for the command list and default parameter values 5 2 Connecting the TCM2 Refer to section 2 4 for information on the TCM2 s electrical connections Attaching a single 9V battery to the unregulated supply and power ground pins of the TCM2
77. ur PC The algorithm is too large to fit on to the current 8 bit microprocessor used on the TCM2 hence the program allows for the algorithm to run on a PC and loads the coefficients into the EEPROM of the TCM2 Other limitations As discussed the TCM2 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 instance you may know that the TCM2 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 2 This is a limitation universal to all compasses However the TCM2 does present a warning when such local disturbances occur see section 3 8 on the magnetic distortion alarm Consider therefore the TCM2 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 etc PNI CORPORATION 15 2 Electronic Compass Module User s Manual Rev 1 09 The 2 can calibrate for any environment that creates a magnetic field that does not exceed the dynamic range of its magnetometers 3 9 2 User calibration procedures There are two basic operations related to user calibrations 1 Calibrating the TCM2 for the
78. xgates They also consume roughly an order of magnitude less power Their dynamic range and sensitivity can be easily tailored to the exact needs of any application The TCM2 s magnetometers provide a very large dynamic range and hence can be calibrated for systems that have extremely strong fields such as military vehicles TCM2 s advantages make it suitable for many applications including GPS systems requiring backup azimuth data Automobile and marine navigation systems e Virtual reality input devices Robotics Original equipment instrumentation for automobiles Aircraft compasses and avionics systems Scuba dive computers and compasses e Oceanographic buoys and data stations Tracking animal s migration patterns With its many potential applications the TCM2 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 will help you to achieve the greatest performance from your target system Thank you for selecting the TCM2 1 2 Differences Between the TCM2 and TCM1 The TCM2 is backward compatible with the TCM1 The following features have been added to make the TCM2 much more useful and robust for all applications 20 50 and 80 inclinometer values 16 Hz and 30 Hz output rates default is now 16Hz not 8Hz Digital dampin
79. y The process of user calibration see section 3 9 allows the TCM2 to measure the nominal local magnetic field This field value is then stored as a reference During continuous sampling the TCM2 evaluates the quality of magnetic environment by utilizing an algorithm that compares the instantaneous magnetic field information against the stored reference If significant deviations are detected the magnetic distortion alarm error flag is raised if enabled How to use the magnetic distortion alarm To utilize the alarm the user must first perform a user calibration This is described in section 3 8 Next the magnetic distortion alarm must be enabled by using the ed command From this point on TCM2 output of compass or magnetometer data will be flagged with the magnetic distortion alarm code if the distortion condition exists See the discussion of TCM2 error codes in section 3 3 2 PNI CORPORATION 13 2 Electronic Compass Module User s Manual Rev 1 09 How to interpret the magnetic distortion alarm The 2 raises the magnetic distortion alarm when it detects a local magnetic anomaly Your system should consider compass and magnetometer outputs to be suspect when the alarm is raised The alarm can indicate short term disturbances for example if TCM2 is placed next to a large source of ferrous metal or if a nearby piece of electrical equipment is activated The alarm can also indicate long term disturbances if for instan
Download Pdf Manuals
Related Search
Related Contents
Polycom SoundStation IP 6000 Phone User Guide 取扱説明書 - KAWAJUN FlexiDome IP GE TSP Data Sheet IBM SPSW-BRNZ-P-M LRB 4000CI LASER RANGE FINDER BINOCULARS NSN: 1240 Guía del usuario ExStikTM Modelo RE300 Medidor POR a Magna ChIP™ HT96 Copyright © All rights reserved.
Failed to retrieve file