last updated by Alex Olivier (original author) on 4/24/2012
PNI Corp's FieldForce TCM IMU is a high-end compass module designed to provide "reliable, pinpoint accurate pitch, roll, and compass heading". This module allows accurate and robust navigation in areas where GPS is unavailable (such as inside buildings, underwater, or underground). The PNI website advertises below 1 degree accuracy in field conditions.
PNI provides a very detailed manual for using the TCM module, which can be found on the sensor's webpage (after signing up with PNI). The sensor report summarizes much of the manual in addition to providing my perspective on using the sensor.
At a steep price of $996.00 (even more if you get the cable or the complete evaluation board), the FieldForce TCM is clearly not designed for the hobbyist's budget. However, that doesn't mean you can't obtain a FieldForce TCM for a student or hobbyist project. After contacting PNI Corp by emailing firstname.lastname@example.org, I learned that they have a formal educational outreach program. If you agree to write a sensor report (much like this one) and give them some details about your completed project, they will happily send you one of their sensors!
One recommendation, be sure to fully investigate your options before requesting a sensor. You may find (as I did) that you will need to request helpful accessories, development boards, and cables besides your main sensor. PNI also offers two types of FieldForce TCM module - the XB and the MB. The XB module uses RS232 Serial logic, while the MB module uses TTY Serial logic. I recommend the MB, as you will be able to communicate with it using an FTDI chip. With the XB module, you will most likely have to use a Serial converter chip (more on this later).
This sensor features an on-board processor as well as accelerometers and compass modules. All parts are produced by PNI.
|Supply Voltage||3.6 to 5v DC|
|Average Current Draw (8 Hz sample rate)||16 mA typical|
|Average Current Draw (max sample rate)||20 mA typical|
|Peak Current Draw||120 mA peak, 60 mA average over 2ms|
|Sleep Mode Current Draw||0.3 mA typical|
With the FieldForce TCM, there are only four important connections to make: 5v, GND, RX, and TX. On the XB module you will need to connect three pins to GND instead of just one.
|Pin Number||TCM XB 9-Pin Connector||TCM XB Evaluation Cable Pigtail Color||TCM MB 4-Pin Connector|
Pin 1 is shown in the following technical drawing.
Additional Parts Needed to Use It
If you are using the FieldForce TCM-XB module, you'll most likely want a MAX232 serial converter chip, capacitors, and an FTDI cable.
If you are using the FieldForce TCM-MB module, you will need an FTDI cable.
Physically Connecting to the Sensor
Because the FieldForce TCM has an on-board microcontroller, we don't necessarily have to connect our sensor to an Arduino. We can connect our sensor directly to our computer or to any microcontroller. In fact, for testing purposes, I recommend connecting the sensor to a computer before involving any additional microcontrollers. To connect your computer to a FieldForce TCM sensor (either the XB or the MB module), I would very strongly recommend using PNI's Evaluation Cable (can be found on FieldForce webpage). This cable will make it much easier to make the connection to the delicate Molex connector on the TCM's board. The cable seems to connect your sensor directly to USB.
If you do not obtain an evaluation cable, you will have to manually connect to the sensor's Molex connector to access the important pins.
On the FieldForce TCM-XB model, there is a very small 9-pin Molex male connector (Part no. 53780-0970) that mates with a female Molex connector (Part no. 5116-0900). You can attach 30-32 gauge wire to ultra-small crimp connectors (Part no. 0507538041 or 0506418041), then insert the wire with crimp connectors attached into the female Molex connector. For a tutorial on using crimp connectors, see this tutorial.
Unfortunately because the crimp connectors, 30-gauge wire, and the female Molex housing itself are all so delicate, they can be infuriating to use successfully. I had difficulty with the thin wire snapping frequently. As a last result, you could solder directly to the pins, as I did. Thesesolder connections can be easily removed using solder wick.
Connecting to a Computer or a Microcontroller
The FieldForce TCM-XB module uses RS232 Serial to communicate, while the FieldForce TCM-MB module uses TTY Serial to communicate. When we think about "serial", we are usually referring to the TTY Serial. Depending on the type of communication, we will want to connect to the FieldForce module in a different way.
RS232 Serial vs. TTY Serial
A lot of times when we say that sensors communicate through "serial", we mean that they use 0v-5v TTY logic levels. We can communicate with these sensors with our computer using an FTDI cable (available at Sparkfun or AdaFruit) or via our Arduino using Serial and the Arduino's RX and TX pins. However, RS-232 Serial (which actually communicates through the serial port of a computer) uses completely different logic levels to communicate. To communicate using RS232 Serial using a computer, we must either have a serial port on our computer, or use a USB-to-Serial converter cable. To communicate using RS232 Serial using a microcontroller, we must use a serial converter chip (like the MAX232).
|RS232 Serial||TTY Serial|
|Logical LOW||-3 to -15v||0v|
|Logical HIGH||3 to 15v||5v|
Connecting to the FieldForce-TCM MB Module
If you have obtained the TCM MB module, you can use an FTDI cable to talk to your chip. The wiring diagram for this setup is straightforward (as seen in the diagram below).
Connecting to the FieldForce-TCM XB Module
If you have obtained the TCM XB module (like I did), you will need to use a serial-level converter chip so that your computer or Arduino can both talk and listen to the logic levels of the sensor. I used the Max232 chip, available from SparkFun, DigiKey, or your other favorite electronics distributor (AKA Eric Rosenthal).
The Max232 chip can convert between RS232 Serial and TTY logic levels in both direction. You will want to wire your module up as follows:
|Number of Data Bits||8|
Notice that several additional capacitors are needed - these capacitors allow the MAX232 chip to act as a voltage doubler, outputting more than 5v even though the chip's power source is only 5v.
Module Tx ---> RS232-to-TTY converter ---> TTY output connects to FTDI Rx FTDI Tx ---> TTY-to-RS232 converter ---> RS232 output connects to TCM XB Rx
TCM Binary Protocol
On top of either an RS232 or TTY Serial protocol, the FieldForce TCM sensors also use an additional "PNI Binary Protocol". You can use the PNI Binary Protocol to send various commands to the sensor, including requesting sensor data, starting a calibration session, or setting various configurations. When communicating with your sensor via a terminal application, the settings should be as follows:
|Number of Data Bits||8|
An example packet for performing a 2D calibration using the kStartCal command:
|ByteCount||Frame ID||CalOption||CalOption (2D Calibration)||Checksum|
|00 09||0A||00 00||00 14||5C F9|
An example packet for the kGetModInfo command (which has no payload):
|00 05||01||EF D4|
|1||kGetModInfo||Queries the module's type and 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|
|7||kSetConfig||Sets internal configurations in the module|
|8||kGetConfig||Queries the module for the current internal configuration value|
|9||kConfigResp||Response to kGetConfig|
|10||kSave||Commands the module to start user calibration|
|11||kStartCal||Commands the module to start user calibration|
|12||kStopCal||Commands the module to stop user calibration|
|13||kSetParam||Sets the FIR filter settings for the magnetometer & accelerometer sensors|
|14||kGetParam||Queries for the FIR filter settings for the magnetometer & accelerometer sensors|
|15||kParamResp||Contains the FIR filter settings for the magnetometer & accelerometer sensors|
|16||kPowerDown||User to completely power-down the module|
|17||kSaveDone||Response to kSave|
|18||kUserCalSampCount||Sent from the module after taking a calibration sample point|
|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 paramters|
|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 magnetometer calibration coefficients|
|30||kFactoryUserCallDone||Response to kFactoryUserCall|
|31||kTakeUserCalSample||Commands the module to take a sample during user calibration|
|36||kFactoryInclCal||Clears user accelerometer calibration coefficients|
|37||kFactoryInclCallDone||Respond to kFactoryInclCall|
|46||kSetModeResp||Response to kSetMode|
|49||kSyncRead||Queries the module for data in Sync Mode|
TCM Studio: A GUI for your Chip
From the PNI website, you can download "TCM Studio" free of charge. TCM Studio is a GUI for testing and using your sensor. It creates messages using the PNI binary protocol so you don't have to! Once you install the GUI, you can ensure that your sensor is working properly. Select the serial port your sensor is connected to, then select 38400 for the baud rate. If all is well, your sensor should connect automatically after you configure these settings. If not, something's not right. If you are using the MB module and connecting via FTDI, ensure your Rx/Tx connections are correct. If you are using the XB module and connecting via FTDI through a MAX232 chip, double check the circuit's connections.
When the sensor connects properly, a digital LED on the GUI will turn green. At this point, you can try out the GUI's features, including the handy "test" mode. The test mode lets you manipulate a digital helicopter's heading by moving your sensor in space. It's an intuitive way to see the sensor's outputted roll, pitch, and yaw data.
With the GUI, you can also calibrate your sensor, log data and graph data in real time, and configure your sensor's settings (including telling the on-board processor how your sensor is mounted). See the sensor handbook for more detailed information.
The PNI website lists several application areas for the FieldForce TCM sensor, including:
UAVs and Drones
Surveillance and security drones
Autonomous search and rescue
Tilt sensing for rollover avoidance (stabilization)
Explosive Ordnance Disposal (EOD)
Offshore rig service
Mine detection and disarmament
Far Target Location and Designation
Laser Range Finding
Night Vision Systems
Scientific and Ocean Systems
Oil Drilling and Downhole applications
Speed Detection Systems
Remote Vehicle Detection
Intelligent Traffic Control Systems
For hobbyist and artistic purposes, we can think of other applications, such as gesture recognition, head tracking, etc.
I will be working on an Arduino library to use most of the PNI Binary Protocol commands. Check back soon!
Keywords for this sensor include: inertial navigation, heading, compass, magnetometer, accelerometer, AHRS, IMU