PNI TCM3 User Manual Download Page 17

 

 

PNI Sensor Corporation  

Doc #1007537 r12 

TCM3 & TCM5 User Manual 

– Sept 2012 

Page 17 

North Reference: 

Magnetic: 

 

When the “Magnetic” radio button is selected, heading will be relative to Magnetic North. 

 

True:

  

When the “True” radio button is selected, heading will be relative to True North.  To use North 

Heading in “True” mode, the declination needs to be set in the “Declination” window.  Refer to “Using 

the TCM 

Declination Value” section for more information. 

 

Endianess: 

Use to select either Big Endian or Little Endian; default is Big Endian. 

 

Filter Settings: 

Taps:

  Use to select either a 0 (no filter), 4, 8, 16, or 32 samples and apply the values to a FIR filter 

prior to calculating the heading.  These filters allow for a much more stable reading, but can make the 

acquisition of the data by the program slower.  The default setting is 32. 

 

Acquisition Parameters: 

Mode:

   

 

When “Poll” is selected the TCM Studio program requests the data from the unit, and once it 
has been sent, the program will request the data again at the interval set in the “Poll Time” 
box.  If the time is set to 0 then the TCM Studio will request the data as soon as the previous 
request has been fulfilled. 

 

 

When “Push” is selected the unit will be in 

Interval Mode

, which is internal to the unit.  Once 

the  unit  has  been  set  to 

Interval  Mode

 

and  the  interval  time  has  been  set  in  the  “Interval 

Time

” setting box, the unit will send out the preset data at the desired interval without prompt-

ing.    If  the  interval  is  set  to  0  then  the  unit  will  send  the  data  as  soon  as  the  previous  data 
stream has been sent. 

 

Acquire Time:

   

The  “Acquire  Time”  setting  box  sets  the  time  between  samples  taken  by  the  unit.    This  is  an 

internal  setting  that  is  NOT  tied  to  the  time  with  which  the  unit  transmits  the  data  out  to  the 

program or host. 

 

Summary of Contents for TCM3

Page 1: ...User Guide TCM3 TCM5 Tilt Compensated Compass Module ...

Page 2: ...ALLY MOUNTING THE TCM 11 4 USING THE TCM 13 4 1 TCM STUDIO 13 4 1 1 Install the TCM Studio program onto a Windows system 13 4 1 2 Connection Tab 14 4 1 3 Configuration Tab 14 4 1 4 Calibration Tab 19 4 1 5 Test Tab 20 4 1 6 Data Logger Tab 21 4 1 7 System Log Tab 21 4 2 USER CALIBRATION 22 4 2 1 Calibration Theory 23 4 2 2 Hard and Soft Iron Effects 23 4 2 3 Pitch and Roll 24 4 2 4 Recommended Cal...

Page 3: ...IABILITY If any Product furnished hereunder fails to conform to the above warranty OEM s sole and exclusive remedy and PNI s sole and exclusive liability will be at PNI s option to repair replace or credit OEM s account with an amount equal to the price paid for any such Product which fails during the applicable warranty period provided that i OEM promptly notifies PNI in writing that such Product...

Page 4: ...nywhere in the world The TCM combines PNI Corporation s patented Magneto Inductive MI sensors and measurement circuit technology with a 3 axis MEMS accelerometer for unparalleled cost effectiveness and performance The magnetic sensors and accelerometers are calibrated to operate from 40 to 85 C hence the measurement is very stable over temperature and inherently free from offset drift The TCM s ad...

Page 5: ...epeatability 0 1 0 1 µT 2 1 3 Tilt Specifications Parameter TCM3 TCM5 Units Pitch Accuracy 0 2º 0 2º Deg RMS Roll Accuracy 0 2º for pitch 65º 0 5º for pitch 80º 0 2º for pitch 65º 0 5º for pitch 80º 1 0 for pitch 86º Deg RMS Tilt Range 80º 90º pitch 180º roll Deg Tilt Resolution 0 01º 0 01º Deg Tilt Repeatability 1 0 05º 0 05º Deg RMA 1 Repeatability is based on statistical data at 3 sigma limit a...

Page 6: ...ts Binary High Performance Protocol 1 FIR taps set to 0 2 The maximum sample rate is dependent on the strength of the magnetic field and typically will be from 25 to 32 samples sec 2 1 7 Power Specifications Parameter TCM3 TCM5 Units Supply Voltage 3 8 to 5 V unregulated 3 8 to 5 V unregulated VDC Current Draw at maximum sample rate 20 typical 20 typical mA Sleep Mode 0 6 typical 0 6 typical mA 2 ...

Page 7: ...ser Manual Sept 2012 Page 7 2 2 Mechanicals 2 2 1 Mechanical Drawing The default orientation for the TCM is for the silk screened arrow to point in the forward direction That puts the edge opposite of the Molex connector as the front edge of the board ...

Page 8: ...al Sept 2011 Page 8 2 2 2 18 in Cable Assembly Molex p n 51146 0900 Molex p n 50641 8141 TCM Pin Descriptions Pin Wire Color Description 1 Black Power Ground 2 Gray NC 3 Green R2 232 Ground 4 Orange NC 5 Violet NC 6 Brown NC 7 Yellow TxD 8 Blue RxD 9 Red 5 VDC ...

Page 9: ...dule it can be evaluated with the TCM Studio outside of your system Please see section 4 1 TCM Studio 3 1 Electrical Connections Included with the TCM Interface Kit is a cable to allow for the unit to be connected to your host system On one end of the cable is the connector needed to mate with the TCM3 5 The cable s wires are color coded as indicated below PNI also has a 6 foot cable with a DB9 co...

Page 10: ...cle chassis large electric currents permanent magnets such as electric motors and so on Locate the TCM away from local sources of changing magnetic fields It is not possible to calibrate for changing magnetic anomalies Thus for greatest accuracy keep the TCM away from sources of local magnetic anomalies that will change with time for instance electric equipment that will be turned on and off or ne...

Page 11: ...or the magnetometer outputs observing if the maximum dynamic range is exceeded It is preferable to have some margin before hitting the dynamic range limit of the module 3 3 Mechanically Mounting the TCM Refer to the TCM Dimensional Specification later in this manual for the TCM board dimensions and the orientation of the reference frame The TCM is factory calibrated with respect to the mounting ho...

Page 12: ... TCM is able to be mounted in various positions to allow for greater flexibility All reference points are based on the white silk screened arrow on the top side of the board Note The board depicted below is for illustration purposes only and does not show the actual TCM board TCM3 5 Mounting Options ...

Page 13: ...ave the outputs of the TCM to a file All of this is so that you may begin to learn the capabilities of the TCM while using the TCM Studio program s more friendly interface Check the PNI website for the latest updates at www pnicorp com 4 1 1 Install the TCM Studio program onto a Windows system 1 Drag the TCM Studio exe to the working directory of your computer 2 Move the Quesa plug in Quesa dll in...

Page 14: ...ion Tab Note No settings will be changed in the unit until the SAVE button has been selected Mounting Options Note If the selection is grayed out or not listed the unit connected does not support this feature Refer to Mechanically Mounting mounting option section for additional information on mounting options Standard When selected the unit is to be mounted with the main board in a horizontal posi...

Page 15: ... to be mounted with the main board in a vertical position the Y axis magnetic sensor is vertical Y Sensor Up Plus 90 Degrees When selected the unit is to be mounted with the main board in a vertical position the Y axis magnetic sensor is vertical and rotated 90 degrees clockwise from the front of the host system Y Sensor Up Plus 180 Degrees When selected the unit is to be mounted with the main boa...

Page 16: ...h the main board in a vertical position the Z axis magnetic sensor is vertical and rotated 180 degrees from the front of the host system Z Sensor Up Plus 270 Degrees When selected the unit is to be mounted with the main board in a vertical position the Z axis magnetic sensor is vertical and rotated 270 degrees clockwise from the front of the host system ...

Page 17: ...am slower The default setting is 32 Acquisition Parameters Mode When Poll is selected the TCM Studio program requests the data from the unit and once it has been sent the program will request the data again at the interval set in the Poll Time box If the time is set to 0 then the TCM Studio will request the data as soon as the previous request has been fulfilled When Push is selected the unit will...

Page 18: ... it also takes more time If the user de selects the check box then the unit will NOT wait for a stable reading and instead take a reading once the minimum change between points threshold has been met Automatic Sampling When selected the unit will take a point once the minimum change requirement and the stability check if selected has been satisfied If the user wants to have more control over when ...

Page 19: ...ints the unit can use for a successful calibration is 12 The unit will need to be rotated through at least 180 degrees in the horizontal plane with minimum of at least 1 positive and 1 negative Pitch and Roll as part of the 12 points Results 1 Once the calibration is complete the Coverage window will indicate the quality of the calibration The X Y and Z values show a percentage of each vector that...

Page 20: ...calibration point has been taken Clear This button will clear the user calibration in the unit Once selected the unit will revert back to its factory calibration 4 1 5 Test Tab Current Reading Once the GO button is selected the unit will begin outputting Heading Pitch and Roll information Selecting the Stop button or changing tabs will halt the output of the unit Contrast Reverses the background c...

Page 21: ...tton to save the data to a file 5 Click on the Clear button to clear the data from the window Note The data logger use ticks for time reference A tick is 1 60 second 4 1 7 System Log Tab Export Select the Export button to save the system log to a file Graph The graph provides a 2 axis X Y plot of the measured field strength The graph can be used to visual ly see hard and soft iron effects within t...

Page 22: ... yield the resultant earth s field vector One major benefit from the TCM s triaxial magnetometer triaxial accelerometer system configuration is its ability to compensate for distortion effects in all orientations throughout its usable tilt range As we have mentioned a compass must measure the local field vector generated by the host system at its current position within the system in order to accu...

Page 23: ...hen the heading information from the TCM will only be accurate through 40 of pitch and roll For maximum performance the TCM should be exposed to tilt angles covering a full 360 meaning upside down Recommended calibration procedure for taking the minimum number of sample points follows 4 2 2 Hard and Soft Iron Effects Hard iron distortions are caused by permanent magnets and magnetized steel or iro...

Page 24: ...g accurate orientation This method is the same used in aircraft orientation where the outputs are Heading Yaw Pitch and Roll When using Euler angles pitch and roll are defined as the angle rotated around an axis through the center of the fuselage pitch is rotation around an axis through the center of the wings These two rotations are independent of each other since the rotation axes rotate with th...

Page 25: ...the configuration page 2 Configure the unit as follows In the Filter Settings window set Taps to 32 Calibration Settings Select Stability Checking check box Select Automatic Sampling Choose Calibration points 12 3 Press the Save button 4 Go to the calibration page Note Once you begin taking calibration points pausing between desired calibration points will cause unintentional points to be taken wi...

Page 26: ...tion results will be displayed in the Results window with Coverage X Y and Z in and Std Deviation of Magnetic Field Magnitude in uT The Coverage score is how much of the sphere was each sensor exposed to in percent to describe the shape of the distortion to be corrected for You want a score of 85 or better for X and Y with the above method Z will be below 50 The Std Deviation score should have a r...

Page 27: ...west of true north Correcting for declination is accomplished by storing the correct declination angle and then changing the heading reference from magnetic north to true north Declination angles vary throughout the world and change very slowly over time For the greatest possible accuracy go to the National Geophysical Data Center web page below to get the declination angle based on your latitude ...

Page 28: ...TCM 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 TCM This is a limitation universal to all compasses Consider therefore the TCM 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 electr...

Page 29: ...Count to the last byte of the Packet Frame see in cluded C function at end of document 3 ByteCount and CRC 16 are always transmitted in BIG ENDIAN 4 3 2 Parameter Formats Floating Point The floating point based parameters are in the IEEE standard format ANSI IEEE Std 754 1985 64 Bit double precision floating point Shown below is the 64 bit float format in big endian in little endian bytes are in r...

Page 30: ...4 1985 for more information It is also recommended that you refer to the compiler you are using on how it implements floating point formats Signed 32 bit Integer SInt32 SInt32 based parameters are signed 32 bit numbers 2 s compliment Bit 31 represents the sign of the value 0 positive 1 negative msb 31 24 23 16 15 8 lsb 7 0 Big Endian lsb 7 0 15 8 23 16 msb 31 24 Little Endian Signed 16 bit Integer...

Page 31: ...gative byte 7 0 Unsigned 32 bit Integer UInt32 UInt32 based parameters are unsigned 32 bit numbers msb 31 24 23 16 15 8 lsb 7 0 Big Endian lsb 7 0 15 8 23 16 msb 31 24 Little Endian Unsigned 16 bit Integer UInt16 UInt16 based parameters are unsigned 16 bit numbers Big Endian msb 15 8 lsb 7 0 Little Endian lsb 7 0 msb 15 8 Unsigned 8 bit Integer UInt8 UInt8 based parameters are unsigned 8 bit numbe...

Page 32: ...3 kGetParam Queries for the FIR filter settings for the magnetometer accelerometer sensors 14 kParamResp Contains the FIR filter settings for the magnetometer accelerometer sensors 15 kPowerDown Used to completely power down the module 16 kSaveDone Response to kSave 17 kUserCalSampCount Sent from the module after taking a calibration sample point 18 kUserCalScore Contains the calibration score 19 ...

Page 33: ... the firmware revision number Type Revision UInt32 UInt32 Payload 2 Frame ID kUlnt8 kSetDataComponents frame ID 3 This frame sets the data components in the module s data output This is not a query for the module s data see kGetData The first byte of the payload indicates the number of data components followed by the data component IDs Count ID1 ID2 ID3 IDCount UInt8 UInt8 UInt8 UInt8 UInt8 Payloa...

Page 34: ... T KYAligned 28 Float32 T KZAligned 29 Float32 T Component Types for kSetDataComponents kDataResp frames kHeading Compass heading output kTemperature This is sampled from the internal temperature sensor of the module Its value is in Celsius and has an accuracy of 3 C kDistortion Read only flag that indicates that at least one magnetometer axis reading is beyond 80 µT kCalStatus Read only flag that...

Page 35: ...ce of the components Ids follows the sequence set in the kSetDataComponents frame Count ID1 ValueID1 ID2 ValueID2 UInt8 UInt8 ID Specific UInt8 ID Specific IDCount ValueIDCount UInt8 ID Specific Payload Example If the response contains the heading and pitch output the payload would look like 2 5 359 9 24 10 5 ID Count Heading ID Heading Output Float32 Pitch ID Pitch Output Float32 kSetConfig frame...

Page 36: ...Z down 270 1 kUserCalStableCheck 11 Boolean True or False True kUserCalNumPoints 12 UInt32 12 50 50 kUserCalAutoSampling 13 Boolean True or False True kBaudRate 14 UInt8 0 300 1 600 2 1200 3 1800 4 2400 5 3600 6 4800 7 7200 8 9600 9 14400 10 19200 11 28800 12 38400 13 57600 14 115200 12 kDeclination This sets the declination angle to determine True North heading Positive declination is easterly de...

Page 37: ... flag is used during user calibration If set to FALSE the module will take a point if the magnetic field has changed more than 23 µT in either axis If set to TRUE the unit will take a point if the magnetic field has a stability of 30µT in each direction and the previous point changed more than 5µT and acceleration vector delta within 2 mg kUserCalNumPoints The maximum number samples taken during u...

Page 38: ...and user calibration is restored on power up The frame has no payload This is the ONLY command that causes the module to save information into non volatile memory kStartCal frame ID 10 This frame commands the module to start user calibration with the current sensor acquisition parameters internal configurations and FIR filter settings kStopCal frame ID 11 This frame commands the module to stop cal...

Page 39: ... 22 23 24 25 26 27 28 29 30 31 32 04 6708657655334e 2 04 5329134234467e 1 04 5329134234467e 1 04 6708657655334e 2 01 9875512449729e 2 06 4500864832660e 2 01 6637325898141e 1 02 4925036373620e 1 02 4925036373620e 1 01 6637325898141e 1 06 4500864832660e 2 01 9875512449729e 2 07 9724971069144e 3 01 2710056429342e 2 02 5971390034516e 2 04 6451949792704e 2 07 1024151197772e 2 09 5354386848804e 2 01 148...

Page 40: ...a Float64 Parameter ID Axis ID Count Value1 Value2 UInt8 UInt8 UInt8 Filter Top Value ID Specific Value3 ValueCount ID Specific ID Specific Payload kPowerDown frame ID 15 This frame is used to completely power down the module The frame has no payload The unit will power down all peripherals including the RS 232 driver but the driver chip has the feature to keep the Rx line enabled Any character se...

Page 41: ...tage of how much of the X magnetometer axis was covered by the sampling YCoverage Percentage of how much of the Y magnetometer axis was covered by the sampling ZCoverage Percentage of how much of the Z magnetometer axis was covered by the sampling MagBearth The calculated Earth s magnetic field magnitude from the calibration samples MagHI Reserved value always 0 kSetConfigDone frame ID 19 This fra...

Page 42: ... is TRUE poll mode FlushFilter Flag to set FIR filter flushing every sample Default is FALSE no flushing SensorAcqTime The internal time interval between sensor acquisitions Default is 0 0 seconds this means that the module will reacquire immediately right after the last acquisition IntervalRespTime The time interval the module output data in push mode Default is 0 0 seconds this means that the mo...

Page 43: ...ering down The frame has no payload kFactoryUserCal frame ID 29 This frame clears the user calibration coefficients The frame has no payload This frame must be followed by the kSave frame to change in non volatile memory kFactoryUserCalDone frame ID 30 This frame is the response to kFactoryUserCal frame The frame has no payload kTakeUserCalSample frame ID 31 This frame commands the unit to take a ...

Page 44: ...2 sensorAcqTime intervalRespTime __attribute__ packed AcqParams typedef struct Float32 stdDevErr Float32 xCoverage Float32 yCoverage Float32 zCoverage Float32 magBearth Float32 reserve1 __attribute__ packed CalScore enum Frame IDs Commands kGetModInfo 1 1 kModInfoResp 2 kSetDataComponents 3 kGetData 4 kDataResp 5 kSetConfig 6 kGetConfig 7 kConfigResp 8 kSave 9 kStartCal 10 kStopCal 11 kSetParam 12...

Page 45: ...fig 1 3 AxisID UInt8 Count UInt8 Value Float64 Data Component IDs kHeading 5 5 type Float32 kTemperature 7 7 type Float32 kDistortion 8 8 type boolean kPCalibrated 21 21 type Float32 kRCalibrated 22 type Float32 kIZCalibrated 23 type Float32 kPAngle 24 type Float32 kRAngle 25 type Float32 kXAligned 27 27 type Float32 kYAligned 28 type Float32 kZAligned 29 type Float32 Configuration Parameter IDs k...

Page 46: ...Plus180 5 kMountedStdPlus270 6 Result IDs kErrNone 0 0 kErrSave 1 function to calculate CRC 16 UInt16 CRC void data UInt32 len UInt8 dataPtr UInt8 data UInt32 index 0 Update the CRC for transmitted and received data using the CCITT 16bit algorithm X 16 X 12 X 5 1 UInt16 crc 0 while len crc unsigned char crc 8 crc 8 crc dataPtr index crc unsigned char crc 0xff 4 crc crc 8 4 crc crc 0xff 4 1 return ...

Page 47: ...as the program was written on a non PC computer The comments in the code should explain what is expected to be sent or received from these functions so that you can write this section for your specific platform For example with the TickGenerator h you would need to write a routing that generates 10msec ticks CommHandler is a base class that provides a callback for incoming messages class CommHandl...

Page 48: ...e 25 type Float32 enum kBufferSize 512 maximum size of our input buffer kPacketMinSize 5 minimum size of a serial packet SerPort is a serial communication object abstracting the hardware implementation CommProtocol CommHandler handler NULL SerPort serPort NULL void Init UInt32 baud 38400 void SendData UInt8 frame void dataPtr NULL UInt32 len 0 void SetBaud UInt32 baud protected CommHandler mHandle...

Page 49: ...PNI Sensor Corporation Doc 1007537 r12 TCM3 TCM5 User Manual Sept 2012 Page 49 ...

Page 50: ...ll parse the data when it is fully received mSerialPort serPort Init Initialize the serial port and variables that will control this process void CommProtocol Init UInt32 baud SetBaud baud mOldInLen 0 no data previously received mStep 1 goto the first step of our process Put together the frame to send to the unit void CommProtocol SendData UInt8 frameType void dataPtr UInt32 len UInt8 data UInt8 d...

Page 51: ...ndex crc 8 mOutData index crc 0xFF Write block will copy and send the data out the serial port mSerialPort WriteBlock mOutData index Call the functions in serial port necessary to change the baud rate void CommProtocol SetBaud UInt32 baud mSerialPort SetBaudRate baud mSerialPort InClear clear any data that was already waiting in the buffer Update the CRC for transmitted and received data using the...

Page 52: ...h bytes to be received by the serial object if inLen 2 Read block will return the number of requested or available bytes that are in the serial objects input buffer read the byte count mSerialPort ReadBlock mInData 2 byte count is ALWAYS transmitted in big endian copy byte count to mExpectedLen to native endianess mExpectedLen mInData 0 8 mInData 1 Ticks is a timer function 1 tick 10msec wait up t...

Page 53: ...mInData mExpectedLen 1 if crc crcReceived the crc is correct so pass the frame up for processing if mHandler mHandler HandleComm mInData 2 mInData 3 mExpectedLen kPacketMinSize else crc s don t match so clear everything that is currently in the input buffer since the data is not reliable mSerialPort InClear go back to looking for the length bytes mStep 1 else Ticks is a timer function 1 tick 10mse...

Page 54: ...PNI Sensor Corporation Doc 1007537 r12 TCM3 TCM5 User Manual Sept 2011 Page 54 ...

Page 55: ... unit and parse packets received Process is a base class that provides TCM with cooperative parallel processing The Control method will be called by a process manager on a continuous basis class TCM public Process public CommHandler public TCM SerPort serPort TCM protected CommProtocol mComm UInt32 mStep mTime mResponseTime void HandleComm UInt8 frameType void dataPtr NULL UInt16 dataLen 0 void Se...

Page 56: ...ct will handle any serial data returned by the unit mComm new CommProtocol this serPort mTime 0 mStep 1 TCM TCM Called by the CommProtocol object when a frame is completely received void TCM HandleComm UInt8 frameType void dataPtr UInt16 dataLen UInt8 data UInt8 dataPtr switch frameType case CommProtocol kDataResp Parse the data response UInt8 count data 0 The number of data elements returned UInt...

Page 57: ...r of bytes from the source pointer to the destination pointer Store the heading Move data pntr heading sizeof heading increase the pointer to point to the next data element type pntr sizeof heading break case CommProtocol kPAngle Move source destination size bytes Move copies the specified number of bytes from the source pointer to the destination pointer Store the pitch Move data pntr pitch sizeo...

Page 58: ...to the next data element type pntr sizeof temperature break default Message is a function that displays a formatted string similar to printf Message Unknown type 02X r n data pntr 1 unknown data type so size is unknown so skip everything return break count One less element to read in Message is a function that displays a formatted string similar to printf Message Heading f Pitch f Roll f Temperatu...

Page 59: ...TCM Control switch mStep case 1 UInt8 pkt kDataCount 1 the compents we are requesting preceded by the number of components being requested pkt 0 kDataCount pkt 1 CommProtocol kHeading pkt 2 CommProtocol kPAngle pkt 3 CommProtocol kRAngle pkt 4 CommProtocol kTemperature SendComm CommProtocol kSetDataComponents pkt kDataCount 1 Ticks is a timer function 1 tick 10msec mTime Ticks 100 Taking a sample ...

Page 60: ...c 1007537 r12 TCM3 TCM5 User Manual Sept 2011 Page 60 break case 3 Ticks is a timer function 1 tick 10msec if Ticks mResponseTime Message No response from the unit Check connection and try again r n mStep 0 break default break ...

Reviews: