Home

User Guide - Tri-M Technologies Inc.

image

Contents

1. Ulnt16 gt PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 40 kUserCalSampCount frame ID 17 This frame is sent from the module after taking a calibration sample point The payload contains the sample count with the range of 1 to 50 Payload gt Sample count lt Ulnt32 kUserCalScore frame ID 18 This frame s payload contains the calibration score which is a series of Float32 values stdDevErr xCoverage yCoverage zCoverage magBearth magHI Payload gt stdDevErr xCoverage yCoverage zCoverage magBearth magHI Float32 kr Float32 k Float32 kr Float32 k Float32 k Float32 gt StdDevErr The compass samples magnetic field standard deviation error XCoverage Percentage 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 frame is the response to kSetConfig frame The frame has no payload kSetParamDone frame ID 20 This frame is the response to kSetParam frame The frame has no payload kStartintervalMode frame ID 21
2. case 1 wait for length bytes to be received by the serial object if inLen gt 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 gt ReadBlock mInData 2 byte count is ALWAYS transmitted in big endian copy byte count to mExpectedLen to native endianess mExpectedLen mInData 0 lt lt 8 mInData 1 Ticks is a timer function 1 tick 10msec wait up to 1 2s for the complete frame mExpectedLen to be received mTime Ticks 50 mStep goto the next step in the process break case 2 wait for msg complete or timeout if inLen gt mExpectedLen 2 PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 52 Ulnt16 cre crcReceived calculated and received crcs Read block will return the number of requested or available bytes that are in the serial objects input buffer mSerialPort gt ReadBlock amp mInData 2 mExpectedLen 2 in CRC verification don t include the CRC in the recalculation 2 crc CRC mInData mExpectedLen 2 CRC is also ALWAYS transmitted in big endian crcReceived mInData mExpectedLen 2 lt lt 8 mInData mExpectedLen 1 if crc crcReceived the cre is correct so pass the frame up for processing if mHandler mHandler gt HandleComm mInData 2 amp mInData
3. kGetAcqParams frame ID 25 This frame queries the unit for the acquisition parameters The frame has no payload kAcqParamsDone frame ID 26 This frame is the response to kSetAcqParams frame The frame has no payload kAcqParamsResp frame ID 27 This frame is the response to kKGetAcqParams frame The payload should contain the same payload as the kSetAcqParams frame PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 42 kPowerDownDone frame ID 28 This frame is the response to kPowerDown frame This indicates that the unit successfully received the kPowerDone frame and is in the process of powering 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 sample during user calibration The frame has no payload PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 43 4 4 Code Examples 4 4 1 Binary TCM High Performance Protocol C Header File amp CRC 16 Function type declarations typedef struct UInt8 pollingMode flushFilter Float32 sensorAcqTime intervalRespTime attribute packed
4. User Guide TCM3 amp TCM5 Tilt Compensated Compass Module Table of Contents 1 COPYRIGHT 8 WARRANTY INFORMATION 0 ccssecceseeeseseeesseeeneeeeeeeeeeseeseseeenseeeseneeesnaesnseenenenees 3 2 PNI CORPORATION S TCM3 8 TCM ooncmccccinnnncrnncccc rc 4 2 1 PERFORMANCE SPECIFICATIONS 00 0c cccceeeeeeeeceeeeeceeeeeeaeeeeeeeseeeeesaaeeeeaaeseceeeseaeeeeaaeeeeeeeee 5 2 1 1 Heading Specifications oomcccnnnninnnnnnnccnoccnnonnnncnnnnneccnncn cnn nn 5 2 1 2 Magnetometer Specifications sessesseesseeiesiesinestnetrissttnttinttnnntnnntnnntnnntnnntnnntnn nentet 5 21 3 Tilt Specifications ss sce ar a tia 5 2 1 4 ele te BEE 5 2 1 5 Mechanical Specifications oonmnnnnidinnidinnnnnnnnnnnncnnncccncrcnnnrnnn arrancan rana 5 241 6 VO Specifications ciutadans de aie 6 2 1 7 Power Specifications AANEREN 6 2 1 8 Environmental Specifications ccccceeeceeceeeeeeeeeeeeeeseeeeecaeeesaaeeeeeeeseeeesaeessaeeeeneeees 6 22 MECHANICALS uta E ee aa 7 2 2 1 Mechanical Drawing sssessesesssssssssrnnnenssttitrtnnststttnnnnnnsststtnnntnnsnntn nnna nsnnnnnn anneanne ennn nn 7 2 2 2 18in CGableAesembly cn cnn cnn narco na nana 8 3 INSTALLATION OF THE TCM 220 2 0 0 eccesececntecestessnscecnnecectaeeeseceennecesnnceceencestceeneeeeennedessterssnesenneeeens 9 3 1 ELECTRICAL CONNECTIONS 00 0 ccccceceeeceeeeeeeeseeceeeeeceaeeeeaaeceeeeeseaeeecaaeeseaeesegeeeseaeessaeeneneeee 9 32 WHERE TO INSTALL cosita iaa 10 3
5. AcqParams typedef struct loat32 stdDevErr loat32 xCoverage loat32 yCoverage loat32 zCoverage loat32 magBearth WF FR 9 9 mi loat32 reservel 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 Jeje E kSetParam 12 kGet Param 13 kParamResp 14 kPowerDown 15 PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 44 kSaveDone 16 kUserCalSampCount I 2T kUserCalScore 18 kSetConfigDone 19 kSetParamDone 20 kStartIntervalMode 21 kStopIntervalMode 22 kPowerUp 14 28 kSetAcqParams 24 kGetAcqParams FI 25 kAcqParamsDone 26 kAcqParamsResp F 27 kPowerDoneDown 28 kFactoryUserCal 29 kFactoryUserCalDone 30 kTakeUserCalSample 31 Param IDs kFIRConfig 1 3 AxisID UInt8 Count UInt8 Value Float 64 Data Component IDs kHeading 5 5 type Float32 kTemperature 7 1 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 kZAl
6. The frame commands the module to output data push mode at a fixed time interval See kSetAcqParams The frame has no payload kStopIntervalMode frame ID 22 This frame commands the module to stop data output at a fixed time interval The frame has no payload PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 41 kPowerUp frame ID 23 This frame is sent from the module after wake up from power down mode The frame has no payload Since the module was previously powered down which drives the RS 232 driver TX line low break signal it is recommended to disregard the first byte kSetAcqParams frame ID 24 This frame sets the sensor acquisition parameters in the unit The payload should contain the following lt Payload gt PollingMode FlushFilter SensorAcqTime IntervalRespTime lt Ulnt8 kr UInt8 k Float32 kr Float32 gt PollingMode Flag to set push poll data output mode Default 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 module will push data out immediately after an acquisition cycle
7. The unit will need to be rotated through at least 180 degrees in the horizontal plane with a minimum of at least 1 positive and 1 negative Pitch and at least 1 positive and 1 negative Roll as part of the 12 points Enable 3D Model Some computer systems may not have the graphics capability to render the 3D Model for this reason it may be necessary to turn off this feature PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 18 Default This button will set the TCM Studio program back to the factory default settings Revert This button will have the TCM Studio program read the settings from the unit and display them on the screen 4 1 4 Calibration Tab Note The default settings of the unit are recommended for the highest accuracy and quality of calibration Samples 1 2 Click on the lt Start gt button to begin To take a sample point the unit will need to be held steady for a short time Once the window in dicates the next number the unit can be moved some distance and held steady for the next sam ple A minimum change of 30 degrees in heading or tilt is required for a sample to be taken The larger the distance between points the better The amount of Pitch and Roll during the calibration will determine the amount of Pitch and Roll the unit will be able to compensate for during use Once the pre set number of samples has been taken the calibration is complete Note The minimum
8. requestedirin UInt16 count UInt16 kDataCount return loop through and collect the elements while count The elements are received as type ie kHeading data switch data pntr read the type and go to the first byte of the data Only handling the 4 elements we are looking for case CommProtocol kHeading Move source destination size bytes Move copies the specified number of bytes from the source pointer to the destination pointer Store the heading Move amp data pntr amp 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 8 data pntr amp pitch sizeof pitch increase the pointer to point to the next data element type pntr sizeof pitch break case CommProtocol kRAngle Move source destination size bytes Move copies the specified number of bytes from the source pointer to the destination pointer Store the roll Move amp data pntr amp roll sizeof roll PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 57 increase the pointer to point to the next data element type pntr sizeof roll break case Com
9. 3 mExpectedLen kPacketMinSize else cre s don t match so clear everything that is currently in the input buffer since the data is not reliable mSerialPort gt InClear go back to looking for the length bytes mStep 1 else Ticks is a timer function 1 tick 10msec if Ticks gt mTime Corrupted message We did not get the length we were expecting within 1 2sec of receiving the length bytes Clear everything in the input buffer since the data is unreliable mSerialPort gt InClear mStep 1 Look for the next length bytes break default break PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 53 PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2011 Page 54 4 4 2 3 TCM5 h File For TCM3 TCM5 and TCM5L Modules pragma once include Processes h include CommProtocol h This file contains the object providing communication to the TCM It will set up the 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 5 protected CommProtocol mComm Ulnt32 mStep mTime mResponseTime void HandleComm UInt8 frameType void dataPtr NULL Ulnt16 data
10. Product is defective transportation charges for the return of the Product to OEM within the United States and Canada will be paid by PNI For all other locations the warranty excludes all costs of shipping customs clearance and other related charges PNI will have a reasonable time to make repairs or to replace the Product or to credit OEM s account PNI warrants any such repaired or replacement Product to be free from defects in material and workmanship on the same terms as the Product originally purchased Except for the breach of warranty remedies set forth herein or for personal injury PNI shall have no liability for any indirect or speculative damages including but not limited to consequential incidental punitive and special damages relating to the use of or inability to use this Product whether arising out of contract negligence tort or under any warranty theory or for infringement of any other party s intellectual property rights irrespective of whether PNI had advance notice of the possibility of any such damages including but not limited to loss of use revenue or profit In no event shall PNI s total liability for all claims regarding a Product exceed the price paid for the Product PNI neither assumes nor authorizes any person to assume for it any other liabilities Some states and provinces do not allow limitations on how long an implied warranty lasts or the exclusion or limitation of incidental or consequential damage
11. being dropped In the case where the Acquire Time is set to a value it would be prudent to set the unit to flush the filter prior to calculating the heading This flushing will require the unit to take 32 new samples to use for the calculation User Cal Settings Stability Checking By default the unit will wait for the readings to be stable for 3 consecutive readings when in calibration mode prior to saving the sample for use in the calibration This is why the unit must be held steady between points during the User Calibration This stability helps to ensure a proper heading and allow for higher accuracy but 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 the point will be taken then Auto Sampling should be deselected Once deselected the lt Take Sample gt button on the Calibration tab will be active Selecting the lt Take Sample gt button will indicate to the unit to take a sample once the minimum requirements are met Calibration Points The user can select the number of points to take during a calibration The minimum number of points needed for a successful calibration is 12
12. board in a vertical position the X axis magnetic sensor is vertical and rotated 90 degrees clockwise from the front of the host system X Sensor Up Plus 180 Degrees When selected the unit is to be mounted with the main board in a vertical position the X axis magnetic sensor is vertical and rotated 180 degrees from the front of the host system X Sensor Up Plus 270 Degrees When selected the unit is to be mounted with the main board in a vertical position the X axis magnetic sensor is vertical and rotated 270 degrees clockwise from the front of the host system Y Sensor Up When selected the unit is 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 board in a vertical position the Y axis magnetic sensor is vertical and rotated 180 degrees from the front of the host system Y Sensor Up Plus 270 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 270 degrees clockwise from the front of the host system Z Sensor Down When selected the unit is to be mounted with the main board in a vertical posit
13. characters read in until we are ready for them CommProtocol CommProtocol CommHandler handler SerPort serPort Process CommProtocol mHandler handler store the object that will parse the data when it is fully received mSerialPort serPort Init j 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 dataPtr the data to send UInt32 index 0 our location in the frame we are putting together UInt16 cre the CRC to add to the end of the packet UInt16 count the total length the packet will be count UInt16 len kPacketMinSize exit without sending if there is too much data to fit inside our packet if len gt kBufferSize kPacketMinSize return PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 50 Store the total len of the packet including the len bytes the data and the cre 2 If mOutData indext len count gt gt 8 mOutData index count amp OxFF store the frame ID mOutData index frameType copy the data to be sent while len mOutData index compute and add
14. points 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 has been covered during the cali bration The only way to get a Z value greater than 50 would be to take some points with the unit upside down The value shown in uT refers to the standard deviation of the measured sam ples when compared to the calculated values The smaller the number the better If a better score is needed click on the lt Start gt button to begin a new calibration Note The value in uT only refers to the quality of the calibration and NOT the accuracy of the heading It is possible to have a good calibration but poor accuracy if the field the unit is exposed to during use is not the same as that which was present during the calibration If the calibration is sufficient then click on the lt Save gt button to save the calibration If this button is not selected then the unit will need to be recalibrated after a power cycle PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 19 Current Configuration Stability Checking Indicates if the Stability Checking option has been
15. selected Automatic Sampling Indicates if the Automatic Sampling option has been selected Number of samples is Indicates the number of samples to be taken for the current calibration Options Audible Feedback If selected the TCM Studio will give an audible signal once a 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 lt GO gt button is selected the unit will begin outputting Heading Pitch and Roll information Selecting the lt Stop gt button or changing tabs will halt the output of the unit Contrast Reverses the background color of the current reading window Acquisition Settings This window indicates the pertinent setting information 3D Model The helicopter will follow the movement of the attached module and give a clear representation of the module s orientation PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 20 4 1 6 Data Logger Tab Select the data to log in the Data window Use Shift Ctrl Click and Ctrl Click to select multiple items Click on the lt GO gt button to start logging click the lt STOP gt button to stop logging Click on the lt Export gt button to save the data to a file Click on the lt Clear gt button to clear the data from the window OMAN Note The data logger u
16. time this process gets a turn to execute void 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 in 1s mStep go to next step of process break case 2 Ticks is a timer function 1 tick 10msec if Ticks gt mTime tell the unit to take a sample SendComm CommProtocol kGetData mTime Ticks 100 take a sample every second mStep PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 59 break case 3 Ticks is a timer function 1 tick 10msec if Ticks gt mResponseTime Message No response from the unit Check connection and try again r n mStep 0 break default break PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 60
17. 0 ECH s 443 002 G 113000 CLEARANCE FOR 4 40 UNC FASTENER 37 00010 025 1 4571 001 MOUNTING BLOCK STAKING EUREN gx 1192008 29 00040 025 MILLIMETERS i 44420001 INCHES PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 11 Mounting Options The 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 Z DOWN O STD 270 X UP 270 me UP 270 Z DOWN 270 PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 12 4 Using the TCM e TCM Studio e User Calibration e Binary Protocol e Code Examples 4 1 TCM Studio The TCM Evaluation software communicates with the TCM through the COM port of your PC It puts an easy to use interface onto the Binary command language used by the TCM so that instead of issuing command codes manually you can use buttons check boxes and dialog boxes It reads the Binary responses of the TCM output strings and formats its sensor data into labeled and easy to read data fields The program also includes the ability to log and save 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 th
18. 1 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 PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 8 3 Installation of the TCM This section describes how to configure program and control the TCM in your host system To install the TCM into your system follow these steps e Make electrical connections to the TCM e Evaluate the TCM using the included TCM Studio Program e Choose a mounting location e Mechanically mount the TCM e Perform user calibration Before you install the module 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 connector attached Please contact PNI Corporation for purchas ing information 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 PNI Sensor Corporation Doc 1007537 r12 T
19. 3 MECHANICALLY MOUNTING THE TOM 11 4 USING THE TCM ici is 13 4 1 TOM STUDIO E 13 4 1 1 Install the TCM Studio program onto a Windows system ssesseesseeesreesrnesrssrreees 13 41 2 Connection TAD imita iii caida 14 4 1 3 Configuration Tab miii lcd ba 14 41 4 Calibration Tab EE 19 AO TOSUT a EE 20 4 1 6 Datalogger Tabs seirer rien craneo criar 21 4 1 7 System Log Tab 21 4 2 USER CAUIBRATION 22 4 2 1 Calibration Theory 00 eeccecececceeeeeeeceeeeeeeneeeceaeeeeaaeeeeneeceaeeesaaeeeeaaeseeeeeseaeessaeeseeesennees 23 4 2 2 Hard and Soft Iron Effects 0 2 ececeeeceeeeeeeceeeeeeaeeeeeeeceeeeseaeeeeaaeseeeeeceaeesseaeeseaeeeeeees 23 4 23 PICMG ROI di EIEE NE 24 4 2 4 Recommended Calibration Procedure For Taking The Minimum Number Of Sample Points 25 4 2 5 Declination ValU8 ooonmnoccnnnncccnnnnncconnneccnnnnennnr ner 27 4 2 6 Other Limitations ooonoonnnccinnncnnnnnnnnnccnnnccnrerccnn nr 28 4 3 BINARY PROTOCOL RS232 INTERFACE coccciccccconinononcnnnncccnncnnnnannnnnnnnncccnn rra ranma 29 4 3 1 Datagram Structure c oooncicinccnnccnnnccnnnncnrnrccn nc 29 4 3 2 Parameter FOrM tS coioniinnsaia en ec 29 4 3 3 Commands 8 Communication Frames oomocnnnicinnnnnnncccnnncnnccnn nar cnnc crac 32 44 CODE EXAMPLES a 44 4 4 1 Binary TCM High Performance Protocol C Header File amp CRC 16 Function 44 4 42 Binary TCM Protocol C Communication Examples oocnnnnninnnnnnncccnnncnnocinanccnncn 47 PNI Sensor Corpor
20. 6 Standard When selected the unit is to be mounted with the main board in a horizontal position the Z axis magnetic sensor is vertical X Sensor Up When selected the unit is to be mounted with the main board in a vertical position the X axis magnetic sensor is vertical Y Sensor Up When selected the unit is to be mounted with the main board in a vertical position the Y axis magnetic sensor is vertical Standard 90 Degrees When selected the unit is to be mounted with the main board in a horizontal position but rotated so the arrow is pointed 90 degrees counterclockwise to the front of the host system Standard 180 Degrees When selected the unit is to be mounted with the main board in a horizontal position but rotated so the arrow is pointed 180 degrees counterclockwise to the front of the host system Standard 270 Degrees When selected the unit is to be mounted with the main board in a horizontal position but rotated so the arrow is pointed 270 degrees counterclockwise to the front of the host system kUserCalStableCheck This 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 uT in either axis If set to TRUE the unit will take a point if the magnetic field has a stability of 30uT in each direction and the previous point changed more than 5uT and acceleration vector delta within 2 mg kUserCalNumPoints The maximum number samples taken during user calibration
21. CM3 A TCM5 User Manual Sept 2012 Page 9 3 2 Where to Install The TCM 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 TCM with the following considerations in mind The TCM s magnetometers should not saturate The TCM can be user calibrated to correct for large static magnetic fields created by the host system However each axis of the TCM s magnetometers has a maximum dynamic range of 80 uT if the total field exceeds this value for any axis the TCM will not give accurate heading information When mounting the TCM consider the effect of any sources of magnetic fields in the local environment that when added to the earth s field may saturate the TCM s sensors For example large masses of ferrous metals such as transformers and vehicle 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 nearby ferrous bodies that will be changing positions Make sure the TCM is not mounted close to cargo or payload areas that may be loaded with large sources of local magnetic fi
22. Filter 04 6708657655334e 2 04 5329134234467e 1 04 5329134234467e 1 04 6708657655334e 2 8 Tap Filter 01 9875512449729e 2 06 4500864832660e 2 01 6637325898141e 1 02 4925036373620e 1 02 4925036373620e 1 01 6637325898141e 1 06 4500864832660e 2 01 9875512449729e 2 16 Tap Filter 07 9724971069144e 3 01 2710056429342e 2 02 597 139003451 6e 2 04 6451949792704e 2 07 1024151197772e 2 09 5354386848804e 2 01 1484431942626e 1 01 2567124916369e 1 01 2567124916369e 1 01 1484431942626e 1 09 5354386848804e 2 07 1024151197772e 2 04 6451949792704e 2 02 5971390034516e 2 01 2710056429342e 2 07 9724971069144e 3 32 Tap Filter 01 4823725958818e 3 02 0737124095482e 3 03 2757326624196e 3 05 3097803863757e 3 08 3414139286254e 3 01 2456836057785e 2 01 7646051430536e 2 02 3794805168613e 2 03 0686505921968e 2 03 8014333463472e 2 04 5402682509802e 2 05 2436112653103e 2 05 8693165018301e 2 06 3781858267530e 2 06 7373451424187e 2 06 9231186101853e 2 06 9231186101853e 2 06 7373451424187e 2 06 3781858267530e 2 05 8693165018301e 2 05 24361 126531 03e 2 04 5402682509802e 2 03 8014333463472e 2 03 0686505921968e 2 02 3794805168613e 2 01 7646051430536e 2 01 2456836057785e 2 08 3414139286254e 3 05 3097803863757e 3 03 2757326624196e 3 02 0737124095482e 3 01 4823725958818e 3 PNI Sensor Corporation TCM3 A TCM5 User Manual Sept 2012 Doc 1007537 r12 Page 39 kGetParam frame ID 13 This frame queries t
23. Len 0 void SendComm UInt8 frameType void dataPtr NULL UInt16 dataLen 0 void Control PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 55 4 4 2 4 TCM5 cp File For TCM3 TCM5 amp TCM5L Modules tinclude TCM h include TickGenerator h const UInt8 kDataCount 4 We will be requesting 4 componets Heading pitch roll temperature This object polls the TCM unit once a second for heading pitch roll and temperature TCM TCM SerPort serPort Process TCM Let the CommProtocol know this object 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 L void TCM HandleComm Ulnt8 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 UInt32 pntr 1 Used to retrieve the returned elements The data elements we requested Float32 heading pitch roll temperature if count kDataCount Message is a function that displays a C formatted string similar to print PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 56 Message Received u data elements instead of the Bu
24. anual Sept 2012 Page 25 Module with large negative pitch lt 45 e 60 with 10 20 positive roll e 150 with 10 20 negative roll e 240 with 10 20 positive roll e 330 with 10 20 negative roll 5 Hold the module level and stable 6 Press the Start button and wait for a sample to be taken 7 Rotate the module to the next heading approximately 90 degrees and hold the module stable until the next sample is taken 8 Repeat this until all 12 samples are taken Press the Save button 10 Calibration 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 result of 0 1uT or better The Std Deviation score represents how well the distortion was able to be described and compensated for A poor score will result if sources of distortion to be calibrated out moved during the user calibration relative to the module A magnetically noisy environment will also result in a poor calibration PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 26 Top Views Side Views Minimum 12 good user re calibration points Additional points can be added includ
25. ation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 2 1 Copyright 8 Warranty Information O Copyright PNI Sensor Corporation 2005 All Rights Reserved Reproduction adaptation or translation without prior written permission is prohibited except as allowed under copyright laws Revised March 2011 For most recent version visit our website at www pnicorp com PNI Sensor Corporation 133 Aviation Blvd Suite 101 Santa Rosa CA 95403 USA Tel 707 566 2260 Fax 707 566 2261 Warranty and Limitation of Liability PNI Sensor Corporation PNI manufactures its TCM products Products from parts and components that are new or equivalent to new in performance PNI warrants that each Product to be delivered hereunder if properly used will for one year following the date of shipment unless a different warranty time period for such Product is specified i in PNI s Price List in effect at time of order acceptance or ii on PNI s web site www pnicorp com at time of order acceptance be free from defects in material and workmanship and will operate in accordance with PNI s published specifications and documentation for the Product in effect at time of order PNI will make no changes to the specifications or manufacturing processes that affect form fit or function of the Product without written notice to the OEM however PNI may at any time without such notice make minor changes to specifications or manufact
26. ding 5 Float32 degrees 0 0 to 359 9 kTemperature 7 Float32 Celsius 40 to 85 False Default kDistortion 8 Boolean True or False no distortion False Default kCalStatus 9 Boolean True or False not calibrated kPCalibrated 21 Float32 G 1 0 to 1 0 kRCalibrated 22 Float32 G 1 0 to 1 0 klZCalibrated_ 23 Float32 G 1 0 to 1 0 kPAngle 24 Float32 degrees 90 0 to 90 0 kRAngle 25 Float32 degrees 180 0 to 180 0 KXAligned 27 Float32 uT KYAligned 28 Float32 uT KZAligned 29 Float32 uT Component Types for kSetDataComponents amp 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 uT kCalStatus Read only flag that indicates user calibration status False Default Not calibrated kPCalibrated kRCalibrated amp kIZCalibrated Factory calibrated Earth s acceleration vector G component output kPAngle kRAngle Pitch and Roll angle outputs Pitch is equal to 90 0 to 90 0 and Roll is equal to 180 0 to 180 0 kXAligned kYAligned kZAligned User calibration Earth s magnetic field M vector component output PNI Sensor Corporation Doc 1007537 r12 TCM3 8 TCM5 User Manual Sept 2011 Page 34 kGetData frame ID 4 This frame queries
27. e 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 i Drag the TCM Studio exe to the working directory of your computer 2 Move the Quesa plug in Quesa dll into either the Windows System or System32 folder Quesa is the OpenGL rendering engine and the 3D Model of the TCMStudio will not run without it e For Windows 2000 NT copy to WinNT System32 folder e For Windows XP copy to Windows System32 folder To install the TCM Studio program onto a Mac OSX system 1 Drag the TCM Studio to the working directory of your computer 2 Move the Quesa plug in Quesa to Library CFMSupport PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 13 4 1 2 Connection Tab Initial Connection Select 38400 as the baud rate Select the serial port the unit is plugged into Click on the lt Connect gt button Once a connection is made the Connected light will turn green and the Module Firmware Ver sion and Serial Number will be displayed PoON gt Change Baud Rate 1 Select new baud rate for the module 2 Click on the lt Power Down button 3 Select same baud rate for the computer 4 Click on the lt Power Up gt button Change Modules Once connection has been made the TCM Studio will remember the last settings Any time a module is switched out cl
28. elds The TCM should be mounted in a physically stable location Choose a location that is isolated from excessive shock oscillation and vibration Testing Testing should be performed in the early stages of development to understand the range of any distortion fields and transients so that component placement can take this into consideration To determine the range of field distortion place the compass in a fixed position then move energize suspect components while observing the output to determine when they are an influence PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 10 To determine if the mounting locations magnetic field is within the dynamic range of the compass the following test should be performed With the compass mounted rotate and tilt the systems in as many positions as possible While doing so monitor 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 holes as shown below thus it must be aligned within the host system with respect to these mounting holes not the board edges 3 00020 026 2X 1124001 nf t 2 87
29. er for proper communication with a TCM3 TCM5 or TCM5L module NOTE The follwing files are not included in the samples code SystemSenPort h Processes h TickGenerator h 4 4 2 1 CommProtocol h File pragma once include SystemSerPort h include Processes h Ll This file contains objects used to handle the serial communication with the unit Unfortunately these files are not available 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 CommHandler public Call back to be implemented in derived class virtual void HandleComm UInt8 frameType void dataPtr NULL Ulnt16 datalen 0 D I CommProtocol handles the actual serial communication with the unit Process is a base class that provides CommProtocol with cooperative parallel processing The Control method will be called by a process manager on a continuous basis if class CommProtocol public Process public enum PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 47 Frame IDs Commands kGetModInfo 1 If 2 kModInfoResp 2 kSetDataCo
30. f pitch and roll then 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 iron object within close proximity to the sensors This type of distortion will remain constant and in a fixed location relative to the sensors for all heading orientations Hard iron distortions will add a constant magnitude field component along each axis of sensor output and can be easily compensated for using a simple saturation method Soft iron distortions are the result of interactions between the Earth s magnetic field and any magnetically soft material within close proximity to the sensors In technical terms soft materials have a high permeability The permeability of a given material is a measure of how well it serves as a path for magnetic lines of force relative to air which has an assigned permeability of one The TCM 3 axis digital compass features soft iron and hard iron correction PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 23 4 2 3 Pitch and Roll The TCM uses accelerometers to measure the orientation of the compass with respect to gravity Since the c
31. g RMS Repeatability 0 05 0 05 Deg RMS Max Dip Angle 85 85 Deg 1 Repeatability is based on statistical data at 3 sigma limit about the mean 2 1 2 Magnetometer Specifications Parameter TCM3 TCM5 Units Calibrated Field Measurement Range 80 80 uT Magnetic Resolution 0 05 0 05 uT Magnetic Repeatability 0 1 0 1 uT 2 1 3 Tilt Specifications Parameter TCM3 TCM5 Pitch Accuracy 0 2 0 2 o 0 2 for pitch lt 65 Roll Accuracy A a Ae SC 0 5 for pitch lt 80 Deg RMS EA 1 0 for pitch lt 86 90 pitch Tilt Range 80 1802 roll Deg Tilt Resolution lt 0 01 lt 0 01 Deg Tilt Repeatability 1 0 05 0 05 Deg RMA 1 Repeatability is based on statistical data at 3 sigma limit about the mean 2 1 4 Calibration Parameter TCM3 TCM5 Hard Iron Calibration Yes Yes Soft Iron Calibration Yes Yes 2 1 5 Mechanical Specifications Parameter TCM3 TCM5 Units Dimensions LxWxH 3 5 x 4 3 x 1 3 3 5 x 4 3 x 1 3 cm Weight lt lt grams Mo ntina Options Screw mounts Standoffs Screw mounts Standoffs g Yp Horizontal Horizontal or vertical Connector for RS 232 9 pin 9 pin PNI Sensor Corporation Doc 1007537 r12 Page 5 TCM3 A TCM5 User Manual Sept 2012 2 1 6 I O Specifications Parameter TCM3 TCM5 Units GEN Good Data from lt 210 lt 210 me E aa Good Data from
32. hat are generated by the local environment which we wish to subtract out The end goal of the procedure for the TCM 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 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 accurately calibrate Because the TCM 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 TCM 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 This presents a different local distortion field than that measured during calibration Key Points e The minimum points the unit can use for a successful calibration is 12 e The unit will need to be rotated through at least 180 degrees in the
33. he FIR filter settings for the magnetometer and accelerometer sensors The first byte of the payload is the kFIRConfig ID followed by the vector axis ID byte Payload gt gt Axis IDs kXAxis Parameter ID Axis ID kYAxis lt Ulnt8 gt Unts gt kZAxis kPAxis kRAxis KIZAxis 6 kParamResp frame ID 14 This frame contains the current FIR filter settings for either magnetometer or accelerometer sensors The second byte of the payload is the vector axis ID the third byte is the number of filter taps then followed by the filter taps Each tap is a Float64 lt Payload Parameter ID Axis ID Count Value Value Value Value count Filter Top ID ID ID lt ZS SS SR de SI ey Value de Specific zs Specific ES Specific 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 sent to the module causes it to exit power down mode It is recommended to send the byte oxFFh kSaveDone frame ID 16 This frame is the response to kSave frame The payload contains a Ulnt16 error code 0000h indicates no error 0001h indicates error when attempting to save data into non volatile memory Payload _ gt Error code lt
34. horizontal plane including at least 1 positive and 1 negative Pitch and Roll movement e Tilt as much as possible during the calibration This allows the compass to take full advantage of the 3 axis magnetometer e You are trying to get an even sampling of the magnetic field over as many headings and tilts as possible including upside down if possible e Pay attention to the coverage percentage The lower the percentage the less accurate the com pass PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 22 4 2 1 Calibration Theory The exact calibration method will depend on the actual settings of the calibration parameters An example of the various settings and their effect can be seen in the TCM Studio Evaluation Software section The main object of the calibration is to allow the TCM to calibrate out any distortions to the magnetic field caused by the host system To that end the TCM needs to be mounted within the host system and the entire application needs to be moved as a single unit during the calibration Movement should include at least 180 of horizontal rotation but to achieve the highest accuracy a full 360 of horizontal rotation with as many different tilt angles as possible during the rotation is required To achieve the highest accuracy throughout the TCM s entire tilt range the unit will need to be tilted through the entire range For example if the unit is only tilted through 40 o
35. icking on the lt Connect gt button once the new module is attached will reestablish a connection as long as the module baud rate is the same as the previous unit 4 1 3 Configuration Tab 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 position the Z axis magnetic sensor is vertical Standard 90 Degrees When selected the unit is to be mounted with the main board in a horizontal position but rotated so the arrow is pointed 90 degrees clockwise from the front of the host system Standard 180 Degrees When selected the unit is to be mounted with the main board in a horizontal position but rotated so the arrow is pointed 180 degrees from the front of the host system Standard 270 Degrees When selected the unit is to be mounted with the main board in a horizontal position but rotated so the arrow is pointed 270 degrees clockwise from the front of the host system PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 14 X Sensor Up When selected the unit is to be mounted with the main board in a vertical position the X axis magnetic sensor is vertical X Sensor Up Plus 90 Degrees When selected the unit is to be mounted with the main
36. igned 29 type Float32 Configuration Parameter IDs kDeclination 1 1 type Float32 kTrueNorth 2 type boolean kMountingRef 10 10 type Ulnt8 kUserCalStableCheck 11 type boolean kUserCalNumPoints 12 type UInt32 kUserCalAutoSampling 13 type boolean PNI Sensor Corporation TCM3 A TCM5 User Manual Sept 2012 Tans Doc 1007537 r12 Page 45 y kBaudRate 14 UInt8 Mounting Reference IDs kMountedStandard 1 1 kMountedXUp 2 kMountedYUp 3 kMountedStdPlus90 4 kMountedStdPlus180 LES kMountedStdPlus270 6 Result IDs kErrNone 0 0 kErrSave Ve ak function to calculate CRC 16 UInt16 CRC void data Ulnt32 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 cre 0 while len cre unsigned char cre gt gt 8 cre lt lt 8 ere dataPtr index cre unsigned char cre amp Oxff gt gt 4 Cra SS arc lt lt 8 lt lt As ere iere amp Oxff lt lt 4 lt lt 1 return crc PNI Sensor Corporation TCM3 amp TCM5 User Manual Sept 2011 Doc 1007537 r12 Page 46 4 4 2 Binary TCM Protocol C Communication Examples The following 4 example files CommProtocol h CommProtocol cp TCM5 h and TCM5 cp would be used togeth
37. ing it ei upside down if possible N 1 N Little X Pitch 2 J 3 en oe ca Large Positive Pitch gt Y Alternate Roll between points odd number points positive roll even negative roll 4 2 5 Declination Value Declination also called magnetic variation is the difference between true and magnetic north relative to a point on the earth It is measured in degrees east or west of true north Correcting for declination is accomplished by storing the correct declination angle and then changing the heading reference from magnetic north to true north 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 and longitude http www ngdc noaa gov geomagmodels Declination jsp PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 27 4 2 6 Other Limitations As discussed the TCM 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 example you may know that the 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 i
38. ion the Z axis magnetic sensor is vertical Z Sensor Down Plus 90 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 90 degrees clockwise from the front of the host system PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 15 Z Sensor Down Plus 180 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 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 PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2011 Page 16 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
39. kUserCalAutoSampling This flag is used during user calibration If set to TRUE the module continuously takes calibration sample points until the set number of calibration samples If set to FALSE the module waits for kTakeUserCalSample frame to take a sample with the condition that a magnetic field vector component delta is greater than 5 micro Tesla from the last sample point kBaudRate Baud rate index value A power down power up cycle is required when changing the baud rate kGetConfig frame ID 7 This frame queries the module for the current internal configuration value The payload contains the configuration ID requested Payload gt Config ID lt Ulnt8 _ kConfigResp frame ID 8 This frame is the response to kGetConfig frame The payload contains the configuration ID and value Payload gt Config ID Value ID Specific Ulnt8 k Example If a request to get the set declination angle the payload would look like PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 37 1 10 0 Declination ID Declination Angle Float32 kSave frame ID 9 This frame commands the module to save internal configurations and user calibration to non volatile memory Internal configurations and user calibration is restored on power up The frame has no payload This is the ONLY command that causes the
40. logy 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 advantages make it suitable for many applications including High performance solid state navigation equipment High performance attitude measurement IMU system integration 3 axis magnetic field sensing Robotics systems Laser range finders Drilling applications With its many potential applications the TCM 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 TCM will help you to achieve the greatest performance from your target system Thank you for selecting PNI s TCM compass manual the term TCM refers to the TCM 3 and TCM 5 Other versions available from PNI include the current TCM XB and TCM 5LT and the legacy TCM 2 5 and TCM 2 6 Availability subject to change PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 4 2 1 Performance Specifications 2 1 1 Heading Specifications Parameter TCM3 TCM5 Units Accuracy with lt 65 of tilt 0 5 0 3 Deg RMS Accuracy with lt 80 of tilt 0 8 0 52 Deg RMS Resolution 0 12 0 12 De
41. lt 80 lt 80 mseg Maximum Sample Rate 30 30 samples sec RS 232 Communication Rate 300 to 115200 300 to 115200 baud Output Formats 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 Supply Voltage 3 8 to 5 V unregulated 3 8 to 5 V unregulated Current Draw at maximum sample rate Sleep Mode 0 6 typical 0 6 typical mA 20 typical 20 typical mA 2 1 8 Environmental Specifications Parameter Operating Temperature 40 to 85 40 to 85 Storage Temperature 40 to 85 40 to 85 C PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 6 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 Pi Cor Gee 1 378 CR i E a e 111 J 319 27 023 1 064 000000 000000 Su JL C1 ses MATES WITH MOLEX 0525 P N 51146 0900 ones PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 7 2 2 2 18 in Cable Assembly be 1800 25 j Z 00 P N 12415 L 300 20 al Molex p n 51146 0900 Molex p n 5064
42. lue O positive 1 negative byte Unsigned 32 bit Integer Ulnt32 Ulnt32 based parameters are unsigned 32 bit numbers 31 24 23 1615 87 0 msb Isb Big Endian 7 0 15 8 23 1631 24 Isb msb Little Endian Unsigned 16 bit Integer Ulnt16 Ulnt16 based parameters are unsigned 16 bit numbers 15 87 0 msb Isb Big Endian 7 0 15 8 Isb msb Little Endian Unsigned 8 bit Integer Ulnt8 Ulnt8 based parameters are unsigned 8 bit numbers byte PNI Sensor Corporation TCM3 A TCM5 User Manual Sept 2012 Doc 1007537 r12 Page 31 Boolean Boolean is a 1 byte parameter that MUST have the value 0 false or 1 true byte 4 3 3 Commands amp Communication Frames Overview Frame ID Command kGetModInfo Description Queries the modules type and firmware revision number 2 kModInfoResp Response to kGetModInfo 3 kSetDataComponents Sets the data components to be output 4 kGetData Queries the module for data 5 kDataResp Response to kGetData 6 kSetConfig Sets internal configurations in the module 7 kGetConfig Queries the module for the current internal configuration value 8 kConfigResp Response to kGetConfig 9 kSave Commands the module to save internal and user calibration 10 kStartCal Commands the module to start u
43. mProtocol kTemperature Move source destination size bytes Move copies the specified number of bytes from the source pointer to the destination pointer Store the heading Move amp data pntr amp temperature sizeof temperature increase the pointer to point to the next data element type pntr sizeof temperature break default Message is a function that displays a formatted string similar to printt 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 Temperature f r n heading pitch roll temperature mStep send next data request break default Message is a function that displays a formatted string similar to printf Message Unknown frame 02X received r n UInt16 frameType break PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 58 Have the CommProtocol build and send the frame to the unit void TCM SendComm UInt8 frameType void dataPtr Ulntl1l6 dataLen if mComm mComm gt SendData frameType dataPtr dataLen Ticks is a timer function 1 tick 10msec mResponseTime Ticks 300 Expect a response within 3 seconds This is called each
44. 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 calibration points sampling and calculate the calibration score and coefficients PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 38 kSetParam frame ID 12 This frame sets the FIR filter settings for the magnetometer and accelerometer sensors The second byte of the payload indicates the x vector component of either the magnetometer or accelerometer This is to differentiate whether to apply the filter settings to the magnetometer or accelerometer The third byte in the payload indicates the number of FIR taps to use then followed by the filter taps Each tap is a Float64 The maximum number of taps that can be set is 32 and the minimum is 0 no filtering See Recommended FIR Filter Taps Payload gt Parameter ID Axis ID Count Value Value Value Value count ID ID ID ID ine re I ars CIN E Specific Specific Specific Parameter Identifiers Settings KFIRConfig Parameter ID Format AxisID Ulnt8 Count Ulnt8 Value Float64 Value Float64 Recommended FIR Filter Tap Value 2 Count OANOAARWND 4 Tap
45. mponents 113 kGetData 4 kDataResp if 5 Data Component IDs kHeading 5 5 type Float32 kTemperature 7 7 type Float32 kPCalibrated 21 21 type Float32 kRCalibrated 22 type Float32 kIZCalibrated 23 type Float32 kPAngle 24 type Float32 kRAngle 25 type Float32 y enum kBufferSize 512 maximum size of our input buffer kPacketMinSize 5 minimum size of a serial packet y SerPort is a serial communication object abstracting the hardware implementation CommProtocol CommHandler handler NULL SerPort serPort NULL void Init UInt32 baud 38400 ll o void SendData UInt8 frame void dataPtr NULL Ulnt32 len void SetBaud UInt32 baud protected CommHandler mHandler SerPort mSerialPort UInt8 mOutData kBufferSize mInData kBufferSize UInt16 mExpectedLen UInt32 mOutLen mOldInLen mTime mStep Ulnt16 CRC void data UInt32 len void Control PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 48 PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 49 4 4 2 2 CommProtocol cp File tinclude CommProtocol h import an object that will provide a 10mSec tick count through a function called Ticks include TickGenerator h SerPort is an object that controls the physical serial interface It handles sending out the characters and buffers the
46. nation Angle Float32 Configuration Identifiers Default Values kDeclination 1 Float32 180 to 180 0 kTrueNorth 2 Boolean True or False False kBigEndian 6 Boolean True or False True 1 Standard 2 X axis up 3 Y axis up 90 heading offset 180 heading offset 270 heading offset 7 Z down 8 X 90 9 X 180 10 X 270 11 Y 90 12 Y 180 13 Y 270 14 Z down 90 15 Z down 180 16 Z down 270 kUserCalStableCheck 11 Boolean True or False True kUserCalNumPoints 12 Ulnt32 12 50 50 kUserCalAutoSampling 13 Boolean True or False True 0 300 1 600 2 1200 3 1800 4 2400 5 3600 6 4800 kBaudRate 14 Ulnt8 7 7200 12 8 9600 9 14400 10 19200 11 28800 12 38400 13 57600 14 115200 Settings Fanos cae Format Units Range kMountingRef 10 Ulnt8 kDeclination This sets the declination angle to determine True North heading Positive declination is easterly declination and negative is westerly declination This is not applied until TrueNorth is set to true kTrueNorth Flag to set compass heading output to true north heading by adding the declination angle to the magnetic north heading kBigEndian Flag to set the Endianness of packets kMountingRef This sets the reference orientation for the module PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 3
47. ng to the unit or other issues refer to the quick start guide or users manual This calibration sequence demonstrates a good distribution of the minimum sample points additional points may be added 1 With the TCM module connected and communicating with TCMStudio go to 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 with auto sampling enabled You will move the module to the following positions noting that these are not absolute heading directs but rather approximate heading changes referenced to your first heading sample You do not need to know which way north is The following 12 samples points will be taken Module with slight pitch 5 to 5 e 0 yaw with 10 20 positive roll initial starting position e 90 yaw with 10 20 negative roll e 180 yaw with 10 20 positive roll e 270 yaw with 10 20 negative roll Module with large positive pitch gt 45 e 30 with 10 20 positive roll e 120 with 10 20 negative roll e 210 with 10 20 positive roll e 300 with 10 20 negative roll PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User M
48. ompass also measures the complete magnetic field the TCM can correct for the tilt of the compass to provide an accurate heading The TCM utilizes Euler angles as the method for determining 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 the plane body For the TCM a positive pitch is when the front edge of the board is rotated upward and a positive roll is when the right edge of the board is rotated downward NORTH HEADING OR DIRECTION OF TRAVEL ROLL AXIS Z NEGATIVE A POSITIVE PITCH AXIS TCM Standard Mounting PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 24 4 2 4 Recommended Calibration Procedure For Taking The Minimum Number Of Sample Points This procedure provides instructions for performing a user calibration of the TCM 3 5 5L family of modules using the TCMStudio application and demo cable All of the TCMStudio application functions are available in the TCM unit s binary protocol allowing for this procedure to be translated into a user s imbedded solution The scope of this procedure covers the calibration process only for connecti
49. s so the above limitations or exclusions may not apply to you This warranty gives you specific legal rights and you may have other rights that vary by state or province PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 3 2 PNI Corporation s TCM3 8 TCM5 Thank you for purchasing PNI s TCM3 pn 12606 or TCM5 pn 12608 tilt compensated compass module You have chosen a product that represents the largest step forward in compass technology for many years The TCM is a state of the art low power high performance electronic tilt compensated compass sensor module The TCM uses advanced algorithms with hard iron and soft iron corrections to provide highly accurate heading information in any orientation TCM5 only at latitudes up to 85 The output information of the unit will indicate accurate attitude position of the module and can be used in systems requiring full 360 rotation TCM5 only This has been accomplished by integrating 3 axis magnetic field sensing 3 axis tilt sensing and compass heading into a single module which is one of the smallest in the market With its small size the TCM is capable of fitting into today s size sensitive systems These advantages make PNI Corporation s TCM the choice for applications that require the highest accuracy and performance anywhere in the world The TCM combines PNI Corporation s patented Magneto Inductive MI sensors and measurement circuit techno
50. s 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 electrical equipment that may be turned on and off and so on The TCM can calibrate for any environment that creates a magnetic field that does not exceed the dynamic range of its magnetometers PNI Sensor Corporation Doc 1007537 r12 TCM3 8 TCM5 User Manual Sept 2011 Page 28 4 3 Binary Protocol RS232 Interface 4 3 1 Datagram Structure Transport Layer for RS 232 communication ByteCount Packet Frame CRC 16 Ulnt16 1 4092 Ulnt8 Ulnt16 ge e Payload Ulnt8 1 4091 Ulnt8 Note 1 ByteCount is the total number of bytes in the packet including the CRC 16 2 CRC 16 is calculated starting from the ByteCount 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 reverse order in 4 byte groups ie big endian ABCDEFGH little endian DCBA HGFE 63 62 5251 0 S Exponent Mantissa S p Exponen
51. se ticks for time reference A tick is 1 60 second 4 1 7 System Log Tab Export Select the lt Export gt 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 the environment measured by the TCM module as well as cor rected output after a user calibration has been performed PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 21 4 2 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 TCM 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 TCM takes a series of magnetic field measurements lt 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 t
52. ser calibration 11 kStopCal Commands the module to stop user calibration 12 kS Sets the FIR filter settings for the magnetometer amp accelerometer etParam sensors Queries for the FIR filter settings for the magnetometer amp 13 eae accelerometer sensors 14 kParamResp Contains the FIR filter settings for the magnetometer amp 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 kSetConfigDone Response to kSetConfig 20 kSetParamDone Response to kSetParam 21 kStartintervalMode Commands the module to output data at a fixed interval 22 kStopIntervalMode Commands the module to stop data output at a fixed interval 23 kPowerUp Sent after wake up from power down mode 24 kSetAcqParams Sets the sensor acquisition parameters 25 kGetAcqParams Queries for the sensor acquisition parameters 26 kAcqParamsDone Response to kSetAcqParams 27 kAcqParamsResp Response to kGetAcqParams 28 kPowerDownDone Response to kPowerDown 29 kFactoryUserCal Clears user calibration coefficients 30 kFactorUserCalDone Response to kFactoryUserCal 31 kTakeUserCalSample Commands the unit to take a sample during user calibration PNI Sensor Corporation TCM3 amp TCM5 User Manual Sept 2011 Doc 1007537 r12 Page 32 kGetModinfto frame ID 1 This frame queries the module s type and firm
53. t 1023 The value v is determined as if and only if O lt Exponent lt 2047 v 1 4 Mantissa PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 29 32 Bit single precision floating point Shown below is the 32 bit float format in big endian in little endian all 4 bytes are in reverse order LSB first 3130 2322 0 S Exponent Mantissa ER Exponent 1 27 The value v is determined as if and only if 0 lt Exponent lt 255 v 1 4 Mantissa Note Please refer to ANSIIEEE Std 754 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 O positive 1 negative 31 24 23 1615 87 0 msb Isb Big Endian 7 0 15 8 23 1631 24 Isb msb Little Endian Signed 16 bit Integer Sint16 SInt16 based parameters are signed 16 bit numbers 2 s compliment Bit 15 represents the sign of the value O positive 1 negative 15 87 0 msb Isb Big Endian 7 0 15 8 Isb msb Little Endian PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Sept 2011 Page 30 Signed 8 bit Integer SInt8 Ulnt8 based parameters are unsigned 8 bit numbers Bit 7 represents the sign of the va
54. the crc crc CRC mOutData index mOutData index cre gt gt 8 mOutData index cre amp OxFF Write block will mSerialPort gt WriteBlock mOutData void CommProtocol SetBaud UInt32 baud mSerialPort gt SetBaudRate baud mSerialPort gt InClear buffer Update the CRC for transmitted and received data using the CCITT 16bit algorithm AS t D UInt16 CommProtocol CRC void data UInt8 dataPtr d UInt8 data UInt32 index UInt16 cre 0 while len cre unsigned char cre gt gt 8 crc dataPtr index crc unsigned char cre Oxff PNI Sensor Corporation TCM3 A TCM5 User Manual Sept 2012 copy and send the data out the serial 2 the frame ID no data is sent the min len is 5 1 datat port index Call the functions in serial port necessary to change the baud rate clear any data that was already waiting in the X 16 X 12 UInt32 len cre lt lt 8 gt gt Ss Doc 1007537 r12 Page 51 cro cra lt lt 8 lt lt 4 cre Ze cre UREE lt lt 4 lt lt 1 return cre This is called each time this process gets a turn to execute void CommProtocol Control Inten returns the number of bytes in the input buffer of the serial object that are available for us to read UInt32 inLen mSerialPort gt InLen switch mStep
55. the module for data The frame has no payload The complete packet for the kGetModInfo command would be 00 05 04 BF71 with 0005 being the byte count 04 kGetData command BF71 CRC 16 checksum kDataResp frame ID 5 The frame is the response to kGetData frame The first byte of the payload indicates the number of data components then followed by the data component ID value pairs The sequence of the components Ids follows the sequence set in the kSetDataComponents frame Payload Count 1D Value p 1D Value po ID count Value acount lt Ulnt8 we Ulnt8 ip va ints gt lt iD p lt Uints ke S gt lt Specific Specific Specific 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 Pitch ID Pitch Output Output Float32 Float32 kSetConfig frame ID 6 This frame sets internal configurations in the module The first byte of the payload is the configuration ID followed by a format specific value These configurations can only be set one at time m Payload gt gt Config ID Value ID Ulnt8 rie Specific Example To configure the declination the payload would look like PNI Sensor Corporation TCM3 A TCM5 User Manual Sept 2012 Doc 1007537 r12 Page 35 1 10 0 Declination ID Decli
56. uring processes that do not affect the form fit or function of the Product This warranty will be void ifthe Products serial number or other identification marks have been defaced damaged or removed This warranty does not cover wear and tear due to normal use or damage to the Product as the result of improper usage neglect of care alteration accident or unauthorized repair THE ABOVE WARRANTY IS IN LIEU OF ANY OTHER WARRANTY WHETHER EXPRESS IMPLIED OR STATUTORY INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF MERCHANTABILITY FITNESS FOR ANY PARTICULAR PURPOSE OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL SPECIFICATION OR SAMPLE PNI NEITHER ASSUMES NOR AUTHORIZES ANY PERSON TO ASSUME FOR IT ANY OTHER LIABILITY 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 1 OEM promptly notifies PNI in writing that such Product is defective and furnishes an explanation of the deficiency 11 such Product is returned to PNI s service facility at OEM s risk and expense and 111 PNI is satisfied that claimed deficiencies exist and were not caused by accident misuse neglect alteration repair improper installation or improper testing If a
57. 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 e 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 O then the TCM Studio will request the data as soon as the previous request has been fulfilled e 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 O 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 PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 17 Flush Filters The filtering is set to only update the filter with the last sample taken for example once the initial 32 samples are taken any new sample is added to the end with the first sample
58. ware revision number The frame has no payload The complete packet for the kGetModInto command would be 0005 01 EFD4 with 0005 being the byte count 01 kGetModInfo command EFD4 CRC 16 checksum kModinfoResp frame ID 2 This frame is the response to kGetModinfo frame The payload contains the module type identifier followed by the firmware revision number Frame ID gt lt Payload _ gt 2 Type Revision kUInt8 k Ulnt32 Ulnt32 gt 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 lt Payload gt Count ID ID ID IDeount Ulnt8 ric Ulnt8 Pie Ulnt8 rid Ulnt8 gt lt Ulnt8 gt Example To query the heading and pitch the payload should contain Payload gt 3 2 5 24 Frame ID ID Count Heading ID Pitch ID When querying for data kGetData frame the sequence of the data component output follows the sequence of the data component IDs as set in this frame PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Sept 2012 Page 33 Component Identifiers DataComponentID Component Format Units Range decimal kHea

Download Pdf Manuals

image

Related Search

Related Contents

Más información HT6050  ロータリーエンコーダ  User Manual  取扱説明書 スマートコントローラー ご使用前に必ずご確認    Técnicas de elaboración y registro de datos por Encuestas  ライオンGRLC-J  三宅村 防災マップ  EverFocus EQH5201 surveillance camera  Notice d'instruction  

Copyright © All rights reserved.
Failed to retrieve file