Home

- Precision Navigation

image

Contents

1. 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 lt Payload Count ID Value p ID Valug c IDoount Value pcount lt Uint8 unis D lt P uns a D ple UInts gt le P ES Specific Specific Specific 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 lt lt Payload _ gt Config ID Value lt Ulnt8 k ID Specific Example To configure the declination the payload would look like PNI Sensor Corporation TCM3 amp TCM5 User Manual Doc 1007537 r12 Page 34 1 10 0 Declination ID Declination 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
2. User Guide TCM3 amp TCM5 Tilt Compensated Compass Module Table of Contents COPYRIGHT amp WARRANTY INFORMATION eeseERSREEEREEEEEREEEEEREEEREREEEREEEEEREEEEEREEEEEEEER REENEN 3 PNI CORPORATION S TCM3 amp TCM5 csccccsceessseeesneeeneeeeeeeeesneesaseeeeeeeaescaesesaeeenseeeseaeeessaesaseeneneeaes 4 2 1 SPECIFICA He 5 2 1 1 Performance Specifications u sssseseerere serene nerne nen 5 2 1 2 Absolute Maximum Ratings 222205 SES KERNER SERENE SEE NE KNR SEKS ERIE SANDERS 5 2 1 3 Electrical Requirements 4250207 EIDE Ar EEA 5 234 VO Characteristics ae eee rear Are lerne eee 6 2 1 5 Environmental Requirements A 6 2 1 6 Mechanical Characteristce renere nerne 6 22 MECHANICAL 22 ae eee nens seeren a eaaa Shang a aoaaa ddr RERS 7 22 1 Mechanical Drawing w c cceccccccecscsseeseencccceceessaneuensccreesedeaensensnereanessdueveuencheeneeedeeensantedes 7 2 2 2 18 in Cable Assembly 22k seks MERE EEK ccanseteed debenaceacsvereedevuedseansvaneddeddatensaaentes 8 INSTALLATION OF THE TCM csccssseecsseeeeeeeeesseeeeseeeenseeeseaeseseeesnseeeenseeescaesaseaeenseaeeeesessaeseseenenseaes 9 3 1 ELECTRICAL CONNECTIONS MG succeer renerne reen 9 32 WHERE TO INSTALL oiianing eee adia ren det degen dE ENEE 10 3 3 MECHANICALLY MOUNTING THE TOM 11 USING THE iM ee Ee 13 4 1 TOM STUDIO E 13 4 1 1 Install the TCM Studio program onto a Windows system 13 412 COMNCCUION TAD EE 14 4 1 3 Configuration TaD ET 14 414 Calibration
3. Tab EE 19 4 1 5 Test Ta icvzcceses ceinaite vxcansas henyaceenag aces sseect eegen sadn einen ca sub ege REENEN 20 416 Data Logger Tab ba ani AEN a E iE S EAEN 21 41 7 System Log TaD 555 rar sth eds ceteeaandtiey aaia naaa a aaien 21 42 USERGALIBRATION WE 22 4 2 1 Calibration TNEOry EE 23 4 2 2 Hard and Soft Iron Effects 4221222 ED EN NE DN EDER 23 42 3 Pitch ANG Roll seirian sonniers eanan idian eaa aaa aieia aedini 24 4 2 4 Recommended Calibration Procedure Using Minimum Number Of Sample Points 25 4 2 5 Declination Value cceeececcccceceeeeceeeenceeeeeeeeeeeecaaeaeeeeeeeseeeaaaeeeeeeeeeseeeeeaeeeeeeeeesseennaees 27 4 2 6 Other Limitations 0 0 0 ecccssscesssssccecssaeeecsesaececsscaececseneecesseneeeessenaecesseneecesseaeesessnaes 27 4 3 BINARY PROTOCOL RS232 INTERFACE u u usseeeeerer reen 28 4 3 1 Datagram Structure ceccccccccececeeeeeee cence eceaeeeeaaeseeeecaeeeeaaeseeaaesseeeeseaeeseaaesseaeeeseees 28 4 3 2 Parameter Formats ccccccccecceeeeeeeenececeeeeeeeeeeaaeeeceeeeeceeeanaeeeseseedseeaeaeeeseeeeeeseeanaeees 28 4 3 3 Commands amp Communication Frames u ssseeseeeere kernen erne rn kreere enken 31 44 GODE EXAMPLES eege arenaer sk tatere eeh ab es senere ele a el ns ert be ate ae ele aoaaa GES ed 43 4 4 1 Binary TCM High Performance Protocol C Header File amp CRC 16 Function 43 4 4 2 Binary TCM Protocol C Communication Examples cceceeseeeeeeseeeeeeee
4. 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 EE 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 Page 35 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
5. 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 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 Page 4 2 1 Specifications lt 65 tilt 0 3 rms Heading TOMS lt 80 tilt 0 5 e rms Accuracy lt 65 tilt 0 5 2 rms TEM lt 80 tilt 0 8 rms Heading Re
6. 6451949792704e 2 02 5971390034516e 2 01 2710056429342e 2 07 9724971069144e 3 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 24361 12653103e 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 0686505921 968e 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 amp TCM5 User Manual Doc 1007537 r12 Page 38 kGetParam frame ID 13 This frame queries the 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 lt lt Payload _ Axis IDs kXAxis Parameter ID Axis ID kYAxis d Uinta gt lt 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 filte
7. Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 44 Result IDs kErrNone 0 0 kEr r Save 1 k function to calcul ate CRC 16 Ul nt 16 CRO void data Ul nt32 en U nt8 dataPtr Unt8 data Ul nt 32 index 0 Update the CRC for transmitted and received data using the CCITT 16bit al gorithm X 16 X 12 X 5 1 Ulnt 16 cre 0 whi e en crc unsigned char crce gt gt 8 cre lt lt 8 crc dat aPtr index 4 crc unsigned char crc amp Oxff gt gt 4 crc crc lt lt 8 lt lt 4 crc cre amp Oxff lt lt 4 lt lt 1 return crc PNI Sensor Corporation TCM3 amp TCM5 User Manual Doc 1007537 r12 Page 45 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 together 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 i ncl ude Syst enSer Port bi i ncl ude Processes h e This file contains objects used to handle the serial communication wth 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 yo
8. 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 Z POSITIVE PITCH AXIS TCM Standard Mounting PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 24 4 2 4 Recommended Calibration Procedure Using 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 connecting 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 St
9. 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 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 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 degre
10. function 1 tick 10msec mli me Ticks 100 Taking a sample in 1s n6t ep go to next step of process br eak case 2 Ticks is a timer function 1 tick 10msec if Ticks gt mi me tell the unit to take a sanple SendConm CommPr ot ocol kGet Dat ai mli me Ticks 100 take a sanple every second n6t ep br eak case 3 Ticks is a timer function 1 tick 10msec if Ticks gt mResponseTi me Message No response fromthe unit Check connection and try again r n nSt ep 0 br eak def ault br eak PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 56
11. 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 amp TCM5 User Manual Page 42 4 4 Code Examples 4 4 1 Binary TCM High Performance Protocol C Header File amp CRC 16 Function type declarati ons typedef struct Ul nt8 pollingMode fl ushFil ter Fl oat 32 sensor AcqTi me interval RespTi ne attribute packed AcqPar ars typedef struct Fl oat 32 st dDevErr Fl oat 32 xCover age FI oat 32 yCover age Fl oat 32 zCover age Fl oat 32 magBear th Fl oat 32 reservel attribute packed Cal Score enum Frame Ds Commands kGet Mdl nfo 1 1 kModl nf oResp 2 kSet DataConponents 3 kGet Dat a II 4 kDat aResp 5 kSet Config 6 kGet Conf i g 7 kConf i gResp 8 kSave II 9 kSt art Cal 10 kSt opCal 11 kSet Par am 12 kGet Par am 13 kPar anResp 14 k Power Down 15 kSaveDone 16 kUser Cal SanpCount 17 kUser Cal Score 18 kSet Conf i
12. 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 lt Payload gt Parameter ID Axis ID Count Value Value Value Value count lt Ulnt8 lt Ulnt8 K Ulnt8 ri 9 d d d Specific Specific Specific Specific Parameter Identifiers Format AxisID Ulnt8 Count UInt8 Value Float64 Value Float64 Parameter ID Settings KFIRConfig Recommended FIR Filter Tap Value 4 Tap Filter 8 Tap Filter 16 Tap Filter 32 Tap Filter 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 1484431942626e 1 01 2567124916369e 1 01 2567124916369e 1 01 1484431942626e 1 09 5354386848804e 2 07 1024151197772e 2 04
13. 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 amp TCM5 User Manual Page 19 Current Configuration Stability Checking Indicates if the Stability Checking option has been 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 t
14. r12 TCM3 amp TCM5 User Manual 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 amp TCM5 User Manual 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 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 un
15. 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 SUT and acceleration vector delta within 2 mg kUserCalNumPoints The maximum number samples taken during user calibration 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
16. 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 fields 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 distorti
17. 2 TCM3 amp TCM5 User Manual Page 27 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 in e Payload Uint8 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 Exponent 1023 The value v is determined as if and only if 0 lt Exponent lt 2047 v 1 1 Mantissa PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 28 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 E
18. CM Let the ConmProtocol know this obj ect wll handle any serial data returned by the unit mom new CommPr ot ocol this ser Port nTime 0 nBtep 1 TCM TCM Called by the ConmProtocol obj ect when a frame is completely received voi d TCM Handl eCom Ul nt 8 frameType void dataPtr Ulnt16 dat aLen Unt8 data Ulnt8 dataPtr sw t ch f r ameType case Comfr ot ocol kDat aResp Parse the data response Ul nt8 count dat al 0 The number of data elements returned Ul nt 32 pntr 1 Used to retrieve the returned el erent s The data elerents we requested Fl oat 32 heading pitch roll temperature if count kDat aCount Message is a function that displays a C formatted string similar to printf Message Received data elements instead of the requested r n Ul nt 16 count Ul nt 16 kDat aCount return PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 53 loop through and collect the el ements whi e count The elerents are received as type ie kHeading data sw t ch dat a pntr read the type and go to the first byte of the data Qly handling the 4 elements we are ooking for case CommPr ot ocol kHeadi ng Move source destination size bytes Move copies the specified number of bytes fromthe source pointer to the destination pointer Store the headi ng Move amp dat a
19. 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 klZCalibrated 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 amp TCM5 User Manual Page 33 kGetData frame ID 4 This frame queries 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 Example
20. ability 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 O0 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 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 PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual Page 25 5 6 7 8 9 Hold the module level and stable Press the Start button and wait for a sample to be taken Rotate the module to the next heading approximately 90 degrees and hold the m
21. ample 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 Doc 1007537 r12 Page 31 kGetModinfo frame ID 1 This frame queries the module s type and firmware revision number The frame has no payload The complete packet for the kGetModInfo 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 kGetModlInfo frame The payload contains the module type identifier followed by the firmware revision number lt Frame ID gt lt Payload _ gt 2 Type Revision r lt kUInt8 k Ulnt32 ka U
22. aps 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 5 Environmental Requirements Parameter Value Units Operating Temperature 40 to 85 C Storage Temperature 40 to 85 C 2 1 6 Mechanical Characteristics Parameter Value Units Dimensions LxWxH 3 5 x 4 3 x 1 3 cm Weight 12 grams i i Screw mounts Standoffs Mounting Options Horizontal Connector for RS 232 9 pin PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual 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 Fg on 071 e 111 J 319 Ea FT 35 000 Hr 1 378 Do 406 E t OL 1 064 2000600 2060000 MAT ES WITH MOLEX P N 51146 0900 nenes PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 7 2 2 2 18 in Cable Assembly e 1800 25 j E 00 PN 12415 L 300 20 al 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 PNI Se
23. ction 1 tick 10msec wait up to 1 2s for the compl ete frame nExpectedLen to be received mli me Ticks 50 n6t ep goto the next step in the process wait for msg conplete or ti meout if inLen gt mExpectedLen 2 are in the kPacket M nSi ze Ul nt 16 crc crcRecei ved calculated and received crcs Read block wll return the number of requested or available bytes that serial objects input buffer meri al Port gt ReadBl ock amp m nDat al 2 mExpectedLen 2 in CRC verification don t include the CRC in the recalculation 2 crc CRO mnData nExpectedLen 2 CRC is also ALWAYS transmitted in big endi an crcRecei ved m nDat a nExpect edLen 2 lt lt 8 m nDat af nExpect edLen 1 if crc crcRecei ved the crc is correct so pass the frane up for processi ng i f rrHandl er mHandl er Hand eComm m nDat al 2 amp m nData 3 nExpect edLen else PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 50 cre s don t match so clear everything that is currently in the input buffer since the data is not reliable nSeri al Port gt nC ear go back to looking for the length bytes nStep 1 else Ticks is a timer function 1 tick 10msec if Ticks gt mime Corrupted message W did not get the length we were expecting within 1 2sec of receiving the length bytes Gear everything in the input buffe
24. d 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 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 compass 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
25. 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 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 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 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 r1
26. er Manual 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 A TCM5 User Manual 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 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 i Drag the TCM Studio exe to the working directory of your computer 2 Move the Quesa plug in Que
27. es 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 position 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
28. esting If a 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 conseque
29. 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 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 at
30. gDone II 19 PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 43 kSet Par anDone 20 ko artlnterval Mode 21 kSt opl nt er val Mode 22 kPower Up 23 kSet AcqPar ars II 24 kGet AcqPar ans II 25 kAcqPar ams Done 26 kAcqPar ans Resp 27 kPower DoneDown 28 kFact or yUser Cal 29 kFact or yUser Cal Done 30 kTakeUser Cal Sample 31 Param Ds kFI RConfig 1 3 Axi sl D Ul nt 8 Count Ul nt 8 Val ue FI oat 64 Data Component Ds kHeadi ng 5 5 type FI oat 32 kTenper ature 7 7 type Fl oat 32 kDi stortion 8 8 type bool ean kPCali brated 21 21 type Fl oat 32 kRCal i br at ed 22 type Fl oat 32 kl ZCal i br at ed 23 type Fl oat 32 kPAngl e 24 type Fl oat 32 kRAngl e 25 type Fl oat 32 kXAI i gned 27 27 type Fl oat 32 kYAI i gned 28 type Fl oat 32 kZAI i gned 29 type FI oat 32 Configuration Parameter IDs kDecli nation 1 1 type FI oat 32 kTr ueNor th 2 type bool ean kMountingRef 10 10 type Ulnt8 kUser Cal St abl eCheck 11 type bool ean kUser Cal NunPoi nts 12 type Ulnt 32 kUser Cal Aut oSanpling 13 type bool ean kBaudRat e 14 Unt8 Mounting Reference Ds kMbunt edSt andard 1 1 kMount edXUp 2 kMount edYUp 3 kMount edSt dPI us90 II 4 kMount edSt dPI us180 5 kMount edSt dPI us270 6 PNI Sensor
31. he unit voi d CommPr ot ocol SendDat a Ul nt 8 frameType void dataPtr Ulnt 32 len Unt8 data Ulnt8 dataPtr the data to send Ul nt 32 index 0 our location in the frare we are putting together Ul nt 16 crc the CRC to add to the end of the packet Ul nt 16 count the total length the packet wll be count Ulnt16 l en kPacket M nSi ze exit without sending if there is too much data to fit inside our packet if len gt kBufferSize kPacketMnSi ze return Store the total len of the packet including the len bytes 2 the frame ID 1 the data len and the cre 2 If no data is sent the mn lenis 5 mOut Dat af i ndex count gt gt 8 mOut Dat af i ndex count A OxFF store the frame ID PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 48 mOut Dat a i ndex frameType copy the data to be sent whi l e l en mQut Dat afi ndex dat a compute and add the crc crc CRO mt Data index mOut Dat a i ndex crc gt gt 8 mOut Dat af i ndex crc amp DEE Wite block wll copy and send the data out the serial port meri al Port gt Wi t eBl ock nt Data index Call the functions in serial port necessary to change the baud rate voi d CommPr ot ocol Set Baud Ul nt 32 baud ner i al Por t gt Set BaudRat ei baud ner i al Port gt l nQ ear clear any data that was already wai
32. he 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 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 OM PB GON Note The data logger use 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 wel
33. it 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 PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual 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 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 f
34. l as cor rected output after a user calibration has been performed PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual 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 It analyzes these total field measurements in order to identify the components that are created by the earth s field which is the desired signal from those components that are generated by the local environment which we wish to subtract out The end goal of the procedure for the 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
35. l pntr amp heading si zeof headi ng increase the pointer to point to the next data el erent type pntr si zeof heading br eak case ComPr ot ocol kPAngl e II Move source destination size bytes Move copies the specified nunber of bytes fromthe source pointer to the destination pointer Store the pitch Move amp dat a pntr amp pitch si zeof pitch increase the pointer to point to the next data element type pntr si zeof pitch br eak case CommPr ot ocol kRAngl e II Move source destination size bytes Move copies the specified nunber of bytes fromthe source pointer to the destination pointer Store the roll Move amp dat al pont ri amp roll sizeof roll increase the pointer to point to the next data element type pntr si zeof roll br eak case CommPr ot ocol kTenper at ur e II Move source destination size bytes Move copies the specified nunber of bytes fromthe source pointer to the destination pointer Store the headi ng Move amp dat a pntr amp temperature si zeof tenperature PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 54 increase the pointer to point to the next data element type pntr si zeof temperature br eak default Message is a function that displays a formatted string simlar to printf Message Unknown type 02xX r n data pntr 1 u
36. lnt32 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 ID count lt Ulnt8 ric Ulnt8 Pie Ulnt8 K Ulnt8 K Ulnt8 gt Example To query the heading and pitch the payload should contain lt 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 Page 32 Component Identifiers DataComponentID Component Format Units REWI decimal kHeading 5 Float32 degrees 0 0 to 359 9 kTemperature 7 Float32 Celsius 40 to 85 i 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
37. module for the current internal configuration value The payload contains the configuration ID requested lt 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 lt 4 Ulnt8 k Example If a request to get the set declination angle the payload would look like PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 36 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 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 Page 37 kSetParam frame ID 12 This frame sets the FIR filter settings for the
38. nded 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 Ulnt8 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 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 A TCM5 User Manual Page 41 kPowerDownDone frame ID 28 This frame is the response to kPowerDown frame This indicates that the unit successfully received the
39. neeeneees 46 PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 2 1 Copyright amp 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 July 2013 For most recent version visit our website at www pnicorp com PNI Sensor Corporation 2331 Circadian Way Santa Rosa CA 95407 USA Tel 707 566 2260 Fax 707 566 2261 Warranty and Limitation of Liability 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
40. nknown data type so size is unknown so skip everything return br eak count e less element to readin Message is a function that displays a formatted string simlar to printf Message Heading Pitch Roll Temperature r n heading pitch roll t emper at ure n6t ep send next data request br eak def aul t Message is a function that displays a formatted string simlar to printf Message Unknown frame 2X received r n Ulnt16 franeType br eak Have the ComProtocol build and send the frame to the unit void TCM SendConm Ul nt 8 frameType void dataPtr Ulnt16 dat aLen i f mComm nConm gt SendDat a frameType dataPtr dat aLen Ticks is a timer function 1 tick 10msec mResponseli me Ticks 300 Expect a response wthin 3 seconds This is called each time this process gets a turn to execute void TCM Control swi t ch n6t ep case 1 PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 55 Ul nt 8 pkt kDat aCount 1 the compents we are requesting preceded by the number of components being request ed pkt 0 kDat aCount pkt 1 CommPr ot ocol kHeadi ng pkt 2 ComProtocol kPAngl e pkt 3 CommPr ot ocol kRAngl e pkt 4 ConmPr ot ocol kTenper at ure SendConm CommPr ot ocol kSet Dat aComponents pkt kDataCount 1 Ticks is a timer
41. nsor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual 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 TCM3 amp TCM5 User Manual 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
42. ntial damages 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 amp TCM5 User Manual Page 3 2 PNI Corporation s TCM3 amp 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 es 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
43. odule stable until the next sample is taken 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 Top Views Side Views Minimum 12 good user ra calibration points Additional points can be added including e upside down if possible ASK 1 N Little vw Pitch 2 y be 3 ca ee g Large Positive j Pitch k Alternate Roll between points odd number points positive roll even negative roll 9 Large Negative alt Pitch e PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 26 4 2 5 Declination Value Declination also called magnetic variation is the difference between true and magnetic north relative to a point on the
44. ommPr ot ocol ConmmHandl er handler NULL SerPort serPort NULL void Init Unt32 baud 38400 voi d SendDat a Ul nt 8 frame void dataPtr NULL Ulnt32 len 0 voi d Set Baud Ul nt 32 baud pr ot ect ed Command er mHandl er Ser Port meri al Port Ul nt 8 Out Dat af kBuf f er Si ze m nDat af kBuf f er Si ze Ul nt 16 nExpect edLen Ul nt 32 nmQutLen nA di nLen mii ne n6t ep Ul nt 16 OO void data Ulnt32 len void Control PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 47 4 4 2 2 CommProtocol cp File i ncl ude CormPr ot ocol h import an obj ect that wll provide a 10nSec tick count through a function called Ti cks i ncl ude Ti ckGener at or h II II SerPort is an object that controls the physical serial interface It handles sending out the characters and buffers the characters read in until we are ready for them II Comfr ot ocol ComPr ot ocol ConmHandl er handler SerPort ser Port Pr ocess ConnPr ot ocol mHandl er handler store the obj ect that wll parse the data when it is fully recei ved nSeri al Port ser Port Init II Initialize the serial port and variables that wll control this process II voi d CommPr ot ocol I nit Ul nt 32 baud Set Baud baud nA di nLen 0 no data previously recei ved nStep 1 goto the first step of our process Put together the frame to send to t
45. on 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 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 CH 1184 001 10 051 2 870 0 000 443 002 113 oo CLEARANCE FOR 4 40 UNC FASTENER 37 00020 028 1 457 001 MOUNTING BLOCK STAKING t _ Bows 2X 1182001 9 29 00020 025 MILLIMETERS r senor INCHES PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 Us
46. or manufacturing processes that do not affect the form fit or function of the Product This warranty will be void if the 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 i OEM promptly notifies PNI in writing that such Product is defective and furnishes an explanation of the deficiency ii such Product is returned to PNI s service facility at OEM s risk and expense and iii PNI is satisfied that claimed deficiencies exist and were not caused by accident misuse neglect alteration repair improper installation or improper t
47. or 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 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 thi
48. r since the data is unreliable nSeri al Port gt I nC ear nBtep 1 Look for the next length bytes break default break PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 51 4 4 2 3 TCM5 h File For TCM3 TCM5 and TCM5L Modules pragma once i ncl ude Processes h i ncl ude ConmPr ot ocol h This file contains the object providing communication to the TCM It will set up the unit and parse packets recei ved Process is a base class that provides TCMwth cooperative parallel processing The Control method wll be called by a process manager on a conti nuous basis class TCM public Process publ ic ConmHandl er public TCM Ser Port serPort TCM pr ot ect ed CommPr ot ocol mom Ul nt 32 nSt ep mli me mResponseTi ne voi d Handl eCom Ul nt 8 frameType void dataPtr NULL Ulnt16 dataLen 0 voi d SendConm Ul nt 8 frameType void dataPtr NULL Ulnt16 dataLen 0 void Control PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 52 4 4 2 4 TCM85 cp File For TCM3 TCM5 amp TCMS5L Modules i ncl ude TCM h Hi ncl ude Ti ckGener at or h const Ulnt8 kDataCount 4 V wll be requesting 4 conponets Heading pitch roll t enper at ure This obj ect polls the TCMunit once a second for heading pitch roll and temperature TCM TCM Ser Port ser Port Pr ocess T
49. r 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 mie Mins ey Value Wi 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 lt Payload _ gt Error code wv Uinti gt PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 39 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 a Payload Sample count lt lt uintz2 gt 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 lt Payload gt stdDevErr
50. s reason it may be necessary to turn off this feature PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual 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 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
51. sa 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 amp TCM5 User Manual 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 BR NDE Change Baud Rate 1 Select new baud rate for the module 2 Click on the lt Power Down gt 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 clicking 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
52. solution 0 1 2 Heading Repeatability 0 05 2 rms Pitch Accuracy 0 2 rms lt 65 tilt 0 2 e rms Roll TCM5 SCH E o5 i rms lt 86 tilt i e rms DEE lt 65 tilt 0 2 a rms lt 80 tilt 0 5 e rms 90 pitch a Tilt Range ae 180 roll TCM3 80 e Tilt Resolution lt 0 01 2 Tilt Repeatability 0 05 rms Max Dip Angle 85 2 Calibrated Field Measurement Range 80 uT Magnetic Resolution 0 05 uT Magnetic Repeatability 0 1 uT 1 Repeatability is based on statistical data at 3 sigma limit about the mean 2 1 2 Absolute Maximum Ratings Parameter Minimum Maximum Units Supply Voltage 0 3 10 VDC Temperature 40 85 mA CAUTION Stresses beyond those listed above may cause permanent damage to the device These are stress ratings only Operation of the device at these or other conditions beyond those indicated in the operational sections of the specifications is not implied 2 1 3 Electrical Requirements Parameter Value Units Supply Voltage 3 8 to 9 0 VDC Current Draw at maximum sample rate 20 typical mA Sleep Mode 0 6 typical mA PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 5 2 1 4 I O Characteristics Parameter Value Units EN Good Data from lt 210 msec Time to Initial Good Data from Sleep Mode el eee Maximum Sample Rate 30 samples sec RS 232 Communication Rate 300 to 115200 baud 1 FIR t
53. tention to the coverage percentage The lower the percentage the less accurate the com pass PNI Sensor Corporation Doc 1007537 r12 TCM3 A TCM5 User Manual 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 of 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 cause
54. ters are unsigned 8 bit numbers byte PNI Sensor Corporation TCM3 amp TCM5 User Manual Doc 1007537 r12 Page 30 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 user 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 SE 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 s
55. ting in buf f er the Update the CRC for transmitted and received data using the CCITT 16bit al gorithm X 16 X12 X45 1 Ul nt 16 CommPr ot ocol CRC void data Ulnt 32 en Ulnt8 dataPtr Ulnt8 data Ul nt 32 index 0 Ul nt16 cre 0 whi e l en cre unsigned char cre gt gt 8 cre lt lt 8 crc dat aPtr i ndex 4 crc unsigned char cre A Oxff gt gt 4 cre crc lt lt 8 lt lt 4 crc cre amp Oxff lt lt 4 lt lt 1 return crc This is called each time this process gets a turn to execute voi d ComPr ot ocol Cont rol Inten returns the number of bytes in the input buffer of the serial avai able PNI Sensor Corporation TCM3 amp TCM5 User Manual obj ect that Doc 1007537 r12 Page 49 are for us to read Ul nt 32 i nLen sw t ch n6t ep case 1 n6er i al Port gt l nLen wait for length bytes to be received by the serial obj ect if inLen gt 2 are in the mExpect edLen to break case 2 Read block wll return the number of requested or available bytes that serial obj ects input buffer read the byte count mer al Port gt ReadBl ock m nData 2 byte count is ALWAYS transmitted in big endian copy byte count to native endi aness mExpect edLen mnData 0 lt lt 8 m nDatalf 1 Ticks is a timer fun
56. u can wite this section for your specific platform For exanple wth the Ti ckGener ator h you would need to wite a routing that generates 10msec ticks II CormHandler is a base class that provides a callback for incom ng messages class CommHandl er public Call back to be impl erented in derived class virtual void Handl eCom Ul nt 8 frameType void dataPtr NULL Ulnt16 dataLen 0 ke hy CormProtocol handles the actual serial comuni cation wth the unit Process is a base class that provides ComProtocol wth cooperative parallel processing The Control method wll be called by a process manager on a continuous basis class ComProtocol public Process public enum Frame Ds Commands kGet Mdl nfo 1 as kModli nf oResp td 2 kSet Dat aConponent s Lf 8 PNI Sensor Corporation Doc 1007537 r12 TCM3 amp TCM5 User Manual Page 46 kGet Dat a II 4 kDat aResp 7 5 Data Component Ds kHeadi ng 5 5 type Fl oat 32 kTenper ature 7 7 type Fl oat 32 kPCali brated 21 21 type Fl oat 32 kRCal i br at ed 22 type FI oat 32 kl ZCal i br at ed 23 type Fl oat 32 kPAngl e 24 type Fl oat 32 kRAngl e 25 type FI oat 32 Je enum kBuf f er Si ze 512 maxi mum size of our input buffer kPacket M nSi ze 5 m ni mum size of a serial packet SerPort is a serial communication obj ect abstracting the hardware i mpl erent ati on C
57. xCoverage yCoverage zCoverage magBearth magHI lt Float32 k Float32 k Float32 k Float32 Ka Float32 gt lt 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 kStartIintervalMode frame ID 21 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 amp TCM5 User Manual Page 40 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 recomme
58. xponent lt 255 v 1 1 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 A TCM5 User Manual Page 29 Signed 8 bit Integer SInt8 Ulnt8 based parameters are unsigned 8 bit numbers Bit 7 represents the sign of the value O positive 1 negative byte Unsigned 32 bit Integer UInt32 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 UInt16 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 UInt8 Ulnt8 based parame

Download Pdf Manuals

image

Related Search

Related Contents

Progress Lighting P5729-20 Installation Guide  antes de comenzar funciones de juego cómo se juega 1  Tri-Electronics GXL-18 Gold Tester User Manual    Manual de instalación y funcionamiento  D3E803D02EB-Generic_..  Scanning Patients with MRI Conditional Pacemakers from St  USER MANUAL - Kramer Electronics  

Copyright © All rights reserved.
Failed to retrieve file