Ryan Mechatronics CHIMU User manual

CHIMU User Manual Rev F.
CHIMU Micro AHRS User Manual

CHIMU User Manual Rev F.
Table of Contents
Contents
1. Introduction ................................................................................................................................5
1.1 Limitations ..........................................................................................................................5
1.1.1 Rate limits.....................................................................................................................5
1.1.2 Acceleration limits.........................................................................................................5
1.1.3 Magnetic field limits.......................................................................................................5
1.1.4 BIT and User Responsibility..........................................................................................5
1.2 Theory of Operation............................................................................................................6
1.2.1 Startup Conditions ........................................................................................................6
1.2.2 Dynamic Operation –Centripetal Acceleration..............................................................7
1.3 Modes of Operation ............................................................................................................7
2. Specifications and Characteristics..............................................................................................8
2.1 Performance Specifications ................................................................................................8
2.2 Electrical Characteristics ....................................................................................................9
2.3 Absolute Maximum Ratings ................................................................................................9
2.4 Mechanical and Pin Assignments .....................................................................................10
2.4.1 Dimensions.................................................................................................................10
2.4.2 Recommended Connectors ........................................................................................10
2.4.3 Coordinate System and Orientation ............................................................................11
2.4.4 Pin Assignments .........................................................................................................12
3. Hardware Integration................................................................................................................14
3.1 Power ...............................................................................................................................14
3.1.1 Input Power ................................................................................................................14
3.1.2 Output Power..............................................................................................................14
3.2 Special Interface Pins .......................................................................................................14
3.2.1 External Speed Select –Pin 3 –DIO_1 ......................................................................14
3.2.2 Com Select –Pin 4 - SSEL .........................................................................................14
3.2.3 Special –Pin 11 –ISP ................................................................................................15
3.2.4 Speed Indicator –Pin 18 –ANA1................................................................................15
3.3 Communication.................................................................................................................15
3.3.1 UART..........................................................................................................................15
3.3.2 SPI Bus.......................................................................................................................15
3.4 Feedback LED..................................................................................................................15
4. Software Interface ....................................................................................................................16
4.1 Basic Message Structure..................................................................................................16
4.1.1 Message format ..........................................................................................................16
4.1.2 Number Formats.........................................................................................................16
4.1.3 CRC Checksum Code.................................................................................................17
5. Input Message Details..............................................................................................................18
5.1 Input Message –Device ID IS Required! ..........................................................................18
5.2 Input Message Summary..................................................................................................18
5.2.1 PING (ID 0x00) ...........................................................................................................19
5.2.2 BIAS AND SCALEFACTOR (ID 0x01) ........................................................................20
5.2.3 DAC MODE (ID 0x02).................................................................................................21
Note that in CHIMU –J and later versions, there are no native DAC voltage outputs. A separate
I2C device must be used to create voltage outputs. .................................................................21
5.2.4 ACCELEROMETER CALIBRATION MODE (ID 0x03) ................................................22
5.2.5 MAGNETOMETER CALIBRATION MODE (ID 0x04)..................................................23
5.2.6 TEMPERATURE CALIBRATION MODE (ID 0x05) .....................................................24
5.2.7 CONFIGURATION CLEAR (ID 0x06) .........................................................................25

CHIMU User Manual Rev F.
5.2.8 CONFIGURATION SET (ID 0x07) ..............................................................................26
5.2.9 GYRO BIAS SAVE (ID 0x08) ......................................................................................27
5.2.10 ESTIMATOR TYPE SET (ID 0x09) .............................................................................28
5.2.11 GYRO SCALE FACTOR CHECK (ID 0x0A)................................................................29
5.2.12 CENTRIPETAL VELOCITY INPUT (ID 0x0B) .............................................................30
5.2.13 GYRO INITIALIZATION (ID 0x0C) ..............................................................................31
5.2.14 DEVICE ID (ID 0x0D)..................................................................................................32
5.2.15 MAGNETIC REFERENCE VECTOR (ID 0x0E) ..........................................................33
5.2.16 SOFTWARE RESET (ID 0x0F)...................................................................................35
5.2.17 UART SETTINGS (ID 0x10)........................................................................................36
5.2.18 RESERVED (ID 0x11) ................................................................................................38
5.2.19 USER PIN OPTION SET (ID 0x12).............................................................................39
5.2.20 GPS / Substituted Heading Replacement (ID 0x13)....................................................40
6. Output Message Details ...........................................................................................................41
6.1 Fixed Message Output......................................................................................................41
6.2 Output Messages .............................................................................................................41
6.2.1 PING (ID 0).................................................................................................................43
6.2.2 IMU RAW (ID 1)..........................................................................................................44
6.2.3 IMU FP (ID 2)..............................................................................................................45
6.2.4 Attitude (ID 3)..............................................................................................................46
6.2.5 Bias and Scale Factor (ID 4) .......................................................................................49
6.2.6 Mode / BIT (ID 5) ........................................................................................................50
6.2.7 MAG CAL (ID 6)..........................................................................................................51
6.2.8 GYRO BIASES (ID 7) .................................................................................................52
6.2.9 TEMPERATURE CALIBRATON DATA (ID 8) .............................................................53
6.2.10 DAC OFFSET READ (ID 9) ........................................................................................54
6.2.11 USER PIN OPTIONS READ (ID 10) ...........................................................................55
6.2.12 MAGNETIC REFERENCE VECTOR (ID 14)...............................................................56
6.2.13 RATE SENSOR SF CHECK (ID 15) ...........................................................................57
7. Software Reprogramming.........................................................................................................58
8. Appendix A: Quaternion vs. Euler Estimator............................................................................59
9. Appendix B: Temperature Calibration......................................................................................60
10. Appendix C: Set Point Calibration........................................................................................61
11. Appendix D: Accelerometer Calibration ...............................................................................62
12. Appendix E: Magnetometer Calibration ...............................................................................63

CHIMU User Manual Rev F.
Release Notes
Title
CHIMU
Subtitle
CHIMU User Manual
Type
Manual
Document number
UM1000
Revision Index
Date
Name
Status / Comments
Initial Release
6/2009
MR
Initial release
A
9/2009
MR
Updates to DAC offsets, message structure
B
10/2009
MR
Updated temperature and bias calibration / save
appendices.
C
12/9/09
MR
Updated CRC information (start value added)
Updated mechanical drawing to show space
between pin rows
D
12/28/09
MR
SW Version 1.4 additions include:
Temperature calibration made more robust
Euler angles are now output at 20 Hz update
rate even if quaternion estimator is selected
Added user pin select message input (0x12)
and output (0x0A)
Added substitute (GPS) heading use
message (0x13) to replace magnetometer
corrections in high magnetic environments
Noted: Yaw angle reported is True North if
magnetic reference vector has been applied,
else magnetic north is reported
General text cleanup
D2
3/4/10
MR
Output Message 2, floating point data, had incorrect
sequence of values. Previous manual showed accel,
mags, then rate. Actual software has always been
accel, rate, mags. Documentation updated only.
D3
3/8/10
MR
Pin 17 and 18 were incorrectly swapped in the
documentation.
Pin 17 was incorrectly called out as the analog input.
Pin 18 is the analog input pin for speed if using that for
centripetal calculations (vs. software messages). Fixed
in this revision (documentation change only)
E
4/20/11
MR
Revision for CHIMU –J (Josephine) module.
Significant changes to messages, endianess, sensor
capability
Reported software version will be 2.0 or
higher
Secondary connector description added
Euler filter no longer an option
DAC output no longer a feature (contact us
for instructions on how this can be
accomplished however)
Temperature calibration of rate sensors now
standard in basic module
Acceleration and Magnetometer calibration
procedures included in Appendices
New serial boot loader reprogramming
feature
F
12/27/11
MR
Corrections to manual
100 Hz UART output now supported if
messages are reduced (no raw, no bias)
Correction to secondary connector
(MISO/MOSI lines were incorrect)

CHIMU User Manual Rev F.
IMPORTANT DISCLAIMERS
This document and the use of any information contained therein, is subject to the acceptance of the Ryan Mechatronics terms and
conditions. They can be downloaded from www.ryanmechatronics.com.
Ryan Mechatronics LLC makes no warranties based on the accuracy or completeness of the contents of this document and reserves the
right to make changes to specifications and product descriptions at any time without notice.
Ryan Mechatronics LLC assumes no liability for damages or otherwise due to use of the information in this document or application of any
device described in this document.
Ryan Mechatronics LLC stresses end user compliance with all applicable laws and regulations when using devices of this nature. Use by
an end user in violation of any applicable laws is automatic basis for termination of warranty, technical support and future sales.
Ryan Mechatronics LLC reserves all rights to this document and the information contained herein. Reproduction, use or disclosure to third
parties without express permission is strictly prohibited.
Copyright © 2009 - 2011, Ryan Mechatronics LLC

CHIMU User Manual Rev F.
5
1. Introduction
The CHIMU is a miniature, low cost Attitude Heading Reference System (AHRS). AHRS units
employ rate, acceleration, and magnetic sensing to provide a full inertial attitude and heading
estimate, even under stationary conditions. The CHIMU is intended for use in motion sensing
applications including, but not limited to:
UAVs (AUVs, UAS, etc)
Robotics
Sports training and analysis
Education
Rocket science
1.1 Limitations
The unit, like any IMU / AHRS, can be pushed beyond the limits of its ability to sense any of the
measurements it needs to operate correctly. The following list includes results that are known to
occur if operation exceeds the limits listed later in this document.
1.1.1 Rate limits
Saturation of maximum rate in any axis for any amount of time will result in an incorrect attitude
estimate. The longer the saturation duration, the more error will be present in the attitude
determination. The attitude estimate shall recover once saturation has stopped and the internal filter
has time to reconverge on the correct solution.
1.1.2 Acceleration limits
Excessive acceleration can include acceleration above the rated levels in continuous application
(static / low frequency g’s), more elusive vibration (sinusoidal / random) or shock (impulse / random)
events that may not show full saturation of the accelerometers in data output, but have affected the
sensors internally and corrupted the values. Continued acceleration above the limits or excessive
vibration / shock events can corrupt the computation of rate sensor biases, leading to poor bias
estimates and a corrupt attitude estimate.
1.1.3 Magnetic field limits
Saturation of the local magnetic field can result in a pervasive attitude estimate error as well.
Calibration of the unit in the final configuration will help prevent errors introduced by hard iron in the
local area. However, induced magnetic fields from high current devices or high power RF circuitry
can result in operational errors. After a proper calibration, no axis should exceed a +/- 1 value.
1.1.4 BIT and User Responsibility
Automatic sensing of limits being exceeded is difficult. However, the CHIMU does have some
internal capability to discern these conditions. Magnetic sensor saturation is reported in the Built In
Test (BIT) message. Future software revisions may include an indication of saturation or other
errors on other sensors. No system is fool proof however, and all correct use and planning for
events in case of failure are the responsibility of the user.

CHIMU User Manual Rev F.
6
1.2 Theory of Operation
The CHIMU is an integrated set of MEMS sensors that are managed via an onboard CPU to provide
attitude and heading information, along with raw sensor data and other useful information. A top
level flow of the primary components are shown in this figure:
1.2.1 Startup Conditions
The most difficult operation for a MEMS based IMU to perform occurs at turn on. In order to provide
a fast, reliable estimate of attitude, some systems require the unit to be held motionless during turn
on. This is to provide a “zero” for immediate calibration.
The CHIMU-J does not require this turn on requirement. Static calibration values across the
operating temperature range are preprogrammed prior to delivery (or are calibrated / recalibrated
after delivery if necessary). In-run biases for the unit sensors are calculated as part of the internal
processing after turn on, and compensate for minor changes that may have occurred over time from
factory defaults and operational conditions.
Rate
•3 axis rate
measurements
•Two sensor
combination for all
axes on planar
baord
•Measure angular
rotation
Acceleration
•3 axis
accelerometer
•Measures linear
acceleration forces
Magnetic flux
•3 axis
magnetometer
•Scalable for
sensitivity
(application
specific)
•Measureas earth
magnetic field (and
surrounding
environment)
CPU
•Handles sensor
reads
•200 Hz quaternion
attitude estimator
•Centripetal
corrections
•Temperature
calibration
Output / User
Interface
•Attitude, heading,
raw sensor data
output
•UART
•SPI - 200Hz

CHIMU User Manual Rev F.
7
1.2.2 Dynamic Operation –Centripetal Acceleration
Operation of an IMU in a dynamic platform like an airplane can lead to incorrect attitude
computations unless centripetal accelerations are accounted for. Many low cost MEMs based IMUs
do not address this.
The CHIMU allows two methods for compensation of centripetal accelerations. Both require an
external input of vehicle velocity. The first, and most useful for many applications, is an external pin
that allows input of forward speed as an analog voltage. The second requires a full 3 axis velocity
message to be provided to the unit via the serial port or SPI port.
External computation of velocity can be provided by airspeed sensors or a GPS unit (typically).
1.3 Modes of Operation
The CHIMU has been designed to be simple and effective at providing attitude and heading
information with minimal or no user intervention. However, there are some modes for calibration that
likely will be used. Below is a top level description of the typical operating modes for the unit. This
diagram may be useful in understanding the software commands to the module found in this section.
INIT Mode
-Flash load
-Start Bit
-Hardware config
RUN
Mode
Background
BIT
Accelerometer Calibration Mode
Position unit
X
up/down
Y
up/down
Z
up/down
Magnetometer
Calibration
Mode
3 axis
revolution,
constant
update
Temp
Calibration
Mode
Rate sensors
Flash Ops:
Settings
Change and
Commit

CHIMU User Manual Rev F.
8
2. Specifications and Characteristics
Presented in this section are the sensor and system specifications for the CHIMU. All parameters
specified are @ VDD = 3.0 V and Ta = 25°C.
2.1 Performance Specifications
Characteristics
Conditions
Min
Typical
Max
Units
Attitude and Heading
(steady state)
Roll
Range
Accuracy
Resolution
0 to 360
0.5
0.0004
°
° RMS
°
Pitch
Range
Accuracy
Resolution
+/-90
0.5
0.0004
°
° RMS
°
Yaw
Range
Accuracy
Resolution
0 to 360
0.5
0.0004
°
° RMS
°
Angular Rate
Range
All axes
±2000
° / sec
Rate noise density
All axes
0.03
° /sec /
Bandwidth
All axes
10
188
256
Hz
Resolution
All axes
<±0.07
° / sec
Acceleration
Range
All axes
±2
±4
±8
g
Noise density
All axes
218
Bandwidth
All axes
37
292
780
Hz
Resolution
All axes
<±1
<±2
<±4
mg
Magnetic Flux
Range
All axes
±1.3
±1.3
±8.1
Gauss
Bandwidth
All axes
10,000
Resolution
All axes
7
milligauss
Specifications are subject to change at any time without notice

CHIMU User Manual Rev F.
9
2.2 Electrical Characteristics
Characteristics
Conditions
Min
Typical
Max
Units
Power
Supply Voltage
Range
Vdd
Referenced to GND
3.1
3.3
6.5
V
Current
Average, measured at 3.3V
30
33
36
mA
Time
Time to first valid
data
Power on to first message out
0.1
sec
Bias settling time
Static test step change condition
<10
sec
Specifications are subject to change at any time without notice
2.3 Absolute Maximum Ratings
Parameter
Rating
Acceleration (any axis, 0.5 ms)
Unpowered
2000g
Vdd
-0.3V to +7V
Output Short-Circuit Duration
(Any Pin to Common)
TBD
Operating Temperature Range
-30°C to +85°C
Storage Temperature Range
-40°C to +125°C
Specifications are subject to change at any time without notice
Stresses above those listed under the Absolute Maximum Ratings may cause permanent damage to
the device. This is a stress rating only; functional operation of the device at or near these or any
other conditions above those indicated in the operational section of this specification is not implied.
Exposure to absolute maximum rating conditions for extended periods of time may affect device
reliability.
Drops onto hard surfaces can cause shocks of greater than 2000 gand can exceed the absolute
maximum rating of the device. Exercise care during handling to avoid damage.

CHIMU User Manual Rev F.
10
2.4 Mechanical and Pin Assignments
2.4.1 Dimensions
2.4.2 Recommended Connectors
2.4.2.1 Main Connector
The main connectors on the CHIMU are located on the sides of the board and are intended to allow
plug into a board or socket. These pins have a 0.05” spacing. Specifically, the CHIMU pins are Digi-
Key part number S9014E-12-ND.
The recommended mate (socket) that custom designs should use to plug CHIMU into is Digi-Key
part number S9005E-12-ND. For reference, a picture of this connector is shown here:
1”
0.11 x
2
0.72”
0.11”
0.8”
X
Y
Z (out)
PIN 1
PIN 12
PIN
24
0.05”
All units shown in inches
0.9”
X1 (alternate connector)
PIN 1

CHIMU User Manual Rev F.
11
2.4.2.2 Secondary Connector (X1)
The secondary connector is located on the top of the CHIMU and has a limited set of connections for
power and communication. This connector is an 8 pin Molex socket. The mating connector for this
is Digi-Key part number WM1726-ND, but this is just the connector housing. Pre-crimped wires can
be found at Newark, part number 06-66-0013. For reference, a picture of this connector is shown
here:
2.4.3 Coordinate System and Orientation
Orientation shown (X/Y/Z) frame is the local body frame, using standard aircraft axes. The unit with
applied axes coordinate frame is shown below.
It is assumed for the rest of this manual that this axis corresponds to a standard vehicle axis. All
rotations obey the “right hand rule”. In this case, the following terms are defined:
Pitch rate / angle ( , θ) – positive pitch rate is rotation about the Y axis from the Z towards
the X axis.
Roll rate / angle ( , Φ) – positive roll rate is rotation about the X axis from the Y to the Z axis.
Yaw rate / angle ( , Ψ) –positive rate is rotation in a clockwise direction about the Z axis
from the X to the Y axis.

CHIMU User Manual Rev F.
12
2.4.4 Pin Assignments
Table 1 –Main Connector Pin Assignments
Pin #
Pin Name
I/O
Pin
Connection
Required
for Typical
Operation?
Description
1
Vin
N/A
X
Input power
2
GND
N/A
X
3
DIO_1
I
External Speed Sensor enable
(ground pin if external analog speed sensor available)
4
NSS
I
COM Select
5
MOSI
O
SPI –Master Out Slave In
6
SENSOR RX
I
UART com TO CHIMU
3.3V level
7
SENSOR TX
O
X
UART com FROM CHIMU
3.3V level
8
MISO
I
SPI –Master In Slave Out
9
SCK
O
SPI –Clock
10
GND
N/A
X
11
ISP
I
Special –Hold low for boot loader operation in event of
software reprogram. Do not connect in typical
application
12
SWCLK
I
Special –Programming use, do not connect in typical
application
13
NC
N/A
No function
14
SCL
O
Internal I2C Clock –Do Not Connect
15
SDA
O
Internal I2C Data –Do Not Connect
16
GND
N/A
X
17
ANA2
I
Reserved for future use
18
ANA1
I
X axis velocity input
Enabled by Pin 3
19
GND
N/A
X
20
DIO_2
I
Reserved for future use
21
GND
N/A
X
22
SWDIO
I
Special –Programming use, do not connect in typical
application
23
RESET
I
Soft reset –active low reset holds CPU in reset
24
3.0V Out
O
Limited 3.0V supply (50mA max)

CHIMU User Manual Rev F.
13
Table 2 –Secondary (X1) Pin Assignments
Pin #
Pin Name
I/O
Pin
Connection
Required
for Typical
Operation?
Description
1
Vin
N/A
X
Input power
2
GND
N/A
X
3
SENSOR RX
I
UART com TO CHIMU
3.3V level
4
SENSOR TX
O
X
UART com FROM CHIMU
3.3V level
5
SSEL
I
Slave select
6
MISO
I
SPI –Master In Slave Out
7
MOSI
I
SPI –Master Out Slave In
8
RESET (OR)
SCK
O
Hardware dependent.
Basic: This pin is the soft reset
SPI: SPI –Clock
Note: Hardware type selected when purchased

CHIMU User Manual Rev F.
14
3. Hardware Integration
Presented in this section are selected hardware interface comments to help ease integration of the
unit in the end user system.
3.1 Power
3.1.1 Input Power
The CHIMU module operates off a nominal 3.3V input. However, up to 6.5V may be applied. A
higher voltage may result in more thermal dissipation on the board, but this should not affect
operation. Do not exceed 6.5V or damage may result.
The system draws very little power; typically it will require 30 mA of supply for operation. More will
be required if the output power pin is used.
If the 3.0V output pin is used to power external devices, then the input power current will need to be
increased to support this additional use.
3.1.2 Output Power
The module outputs 3.0V from its onboard regulator on pin 24. This is not intended to be used to
drive any high current or critical loads, but may be useful for pull up / down or LED operation. Total
current from this output should be limited to less than 50mA. More than this risks interfering with
operation of the unit.
3.2 Special Interface Pins
The CHIMU utilizes external pins to help configure the unit if software interfacing is not possible.
These pins are described here.
3.2.1 External Speed Select –Pin 3 –DIO_1
Pin 3 indicates to the unit that the external voltage on Pin 18 (ANA1) should be treated as the
forward (X) velocity indicator.
High / not connected
oNo external hardware speed input
oDO NOT EXCEED 3.0 VOLTS ON THIS PIN
Low / Grounded
oPin 18 (ANA1) acts as a direct indicator of forward (+X) velocity according to the bias
and scale factor associated with this input
oScale ranges from 0 to 3.0V
oStandard bias and scale factor result in a linear scale of:
0 V = 0 m/s
3.0V = 66 m/s (147 mph)
3.2.2 Com Select –Pin 4 - SSEL
Pin 4 indicates to the unit which communication structure should be used. Currently, SPI
communication is only as a master device. This pin is reserved for future use in an SPI slave
configuration.

CHIMU User Manual Rev F.
15
3.2.3 Special –Pin 11 –ISP
This pin, when held low, will force the on board CPU into a boot loader mode for accepting software
uploads via serial port. In a normal application, leave unconnected. DO NOT DRIVE HIGH!
3.2.4 Speed Indicator –Pin 18 –ANA1
Described previously, this pin (when enabled by Pin 3) will accept a voltage in the range of 0 to 2.5V
to represent a forward speed of 0 to 66 m/s to allow centripetal corrections.
This pin may be interfaced (with proper scaling) directly to a pitot tube airspeed sensor output for
example.
If more complex velocities are present, or if a hardware interface is not desired, then software input
of the vehicle velocity should be used. For aircraft, a forward speed indicator should be sufficient for
most applications.
3.3 Communication
The CHIMU has two means of communication - a standard UART and an SPI port.
3.3.1 UART
The UART is a 3.3V level interface. The unit does not use hardware handshaking. It is always 8
bits, no parity, and one stop bit (8-N-1). Do NOT interface with a standard RS-232 port, as the
voltages on that port will damage the unit. An external adapter that uses 3.3V to convert to RS-232
levels can be powered from the onboard 3.3V regulator.
Standard operation is at 115k baud with a message output rate of 25Hz. Currently, this is a fixed
baud rate. However, the data output rate can be varied from 0 to 50Hz and a message mask allows
selective output of data.
3.3.2 SPI Bus
The SPI bus is configured as a master device. The SPI bus outputs all data at the full 200Hz data
rate. Further details, including C source code for interfacing to this bus and receiving data, is
available upon request from customers.
3.4 Feedback LED
There is one (1) informational LED on the unit. This LED is for information only, and is not
necessary to view during operation. The LED operation is as follows:
Boot / Initialize –Solid on
Normal operation –toggling of on/off at ½ the UART interface output rate
Failed operation in use –Solid on or solid off

CHIMU User Manual Rev F.
16
4. Software Interface
The CHIMU hardware com interfaces have been described already. Details on software setup and
communication are presented here.
4.1 Basic Message Structure
Input and Output messages from the unit are identical. Both include header and checksum and
other information to protect data integrity and allow easier decoding by the end user.
4.1.1 Message format
Both input and output messages have a defined structure that consists of the following:
(2) header bytes (0xAE 0xAE)
(1) Message length byte –one byte representing the payload length only (i.e. no header,
length, device id, message id or checksum included)
(1) Device ID byte (useful when multiple units are used in a single application)
(1) Message ID byte
(xxx) Data bytes (varies with message)
(1) Checksum byte
The checksum byte is the LSB of a 32 bit CRC checksum calculated for the entire message,
including header bytes, length, id, and data bytes. Details and code for calculating this checksum
are provided later in this section.
4.1.2 Number Formats
Much of the data messages use single bytes and unsigned integers, which are typically easy to
understand. A number format list is presented here for clarity on number formats however.
UNLIKE prior CHIMU and CHIMU 2010 units which used a Big Endian output format, the
CHIMU –J units are Little Endian. This is a significant difference for legacy applications.
NOTE: Most PC’s (Intel) are Little Endian oriented.
All floating point values are transmitted in IEEE754 single precision.
Table 3 - Number Formats
Abbreviation
Type
Size
(bytes)
Comment
Min/Max
U1
Unsigned char
1
0 … 255
I1
Signed char
1
2’s complement
-128 … 127
X1
Bitfield
1
n/a
U2
Unsigned short integer
2
0 … 65535
I2
Signed short integer
2
2’s complement
-32768 … 32767
X2
Bitfield
2
n/a
U4
Unsigned long
4
0…4,294,967,295
L4
Signed long
4
2’s complement
-2,147,483,648 …
2,147,483,647
R4
IEEE 754 Single Precision
4
-1*2^127 … 2^127
CH
ASCII encoded
1

CHIMU User Manual Rev F.
17
4.1.3 CRC Checksum Code
The checksum calculated for outgoing messages is a 32 bit CRC code. C code to compute the
entire checksum is shown below.
Important notes:
1) Only the LSB of this CRC is appended to output message
2) The starting polynomial is 0xFFFFFFFF
#define POLY 0xEDB88320 // bit-reversed version of the poly 0x04C11DB7
unsigned long UpdateCRC (unsigned long CRC_acc, unsigned char CRC_input)
{
unsigned char i; // loop counter
// Create the CRC "dividend" for polynomial arithmetic (binary arithmetic
// with no carries)
CRC_acc = CRC_acc ^ CRC_input;
// "Divide" the poly into the dividend using CRC XOR subtraction
// CRC_acc holds the "remainder" of each divide
//
// Only complete this division for 8 bits since input is 1 byte
for (i = 0; i < 8; i++)
{
// Check if the MSB is set (if MSB is 1, then the POLY can "divide"
// into the "dividend")
if ((CRC_acc & 0x00000001) == 0x00000001)
{
// if so, shift the CRC value, and XOR "subtract" the poly
CRC_acc = CRC_acc >> 1;
CRC_acc ^= POLY;
}
else
{
// if not, just shift the CRC value
CRC_acc = CRC_acc >> 1;
}
}
// Return the final remainder (CRC value)
return CRC_acc;
}

CHIMU User Manual Rev F.
18
5. Input Message Details
Shown in this section are specific input message requirements and details
5.1 Input Message –Device ID IS Required!
The unit shall not respond to requests that do not contain its device ID. The default factory value for
the device ID is 0x01, but can be changed by the user. The broadcast device ID of 0xAA will
force any units listening to accept the messages sent.
5.2 Input Message Summary
The output messages from the unit are shown in this summary table:
Table 4. CHIMU Message Input
Name
ID
Length
Description
Ping
0x00
0
Communication check
Bias and Scale Factor
0x01
67
Sets bias and scale factor values
DAC Mode
0x02
6
Sets the DAC offsets for custom modules using
off board DAC generation of voltages.
Accelerometer
Calibration
0x03
1
Calibrates accelerometers
Magnetometer
Calibration
0x04
1
Calibrates magnetometers
Temperature
Calibration
0x05
1
Temperature calibration of rate sensors
Configuration CLEAR
0x06
1
Clears configuration flash memory
Configuration SET
0x07
2
Saves current configuration to flash memory
Gyro Bias Save
0x08
1
Saves current rate sensor biases as power up
defaults. This is in addition to temperature
calibration values for bias.
Estimator Type
0x09
1
No effect (unused). Attitude estimator is always
quaternion based in CHIMU –J.
Gyro SF Check
0x0A
1
Special –integrates gyros only to check scale
factor
Centripetal Velocity
0x0B
13
Allows input of vehicle velocity vector to account
for centripetal acceleration
Initialize Gyros
0x0C
0
Sets current value for rate sensors as zero point
Device ID Change
0x0D
2
Sets new device ID
Magnetic Reference
Vector
0x0E
21
Sets new magnetic reference vector and
declination / inclination for local area
Reset
0x0F
1
Performs a software reset of the unit
UART Rate and Mask
Settings
0x10
6
Sets the output rate and message mask on the
UART.
Reserved
0x11
-
-
User Pin Option Select
0x12
6
Sets options enabled by Pin 20 use
GPS / Substitute
Heading
0x13
5
Allows override of internal yaw reference source.

CHIMU User Manual Rev F.
19
5.2.1 PING (ID 0x00)
Message
Name
Description
PING
ID
0x00
Length
1
Type
Input Message
Comment
Pings the unit. Unit responds with ping output
message, BIT message, and user requested
message. Useful for software protocol test.
Message
Structure
Header
Length
Device
ID
ID
Package
Checksum
0xAE 0xAE
1
id or
0xAA
0x00
None
XSUM
Byte offset
Number format
Scaling
Name
Units
Description
0
U1
-
Requested
Message
-
Requests a
specific output
message
This message forces a ping output message (0x00) and a BIT message (0x05) as a response
regardless of the package data.
The message indicated by the package byte (other than 0x00 or 0x05) will be output as well.
Table of contents