http://www.pololu.com/file/0J276/chr6d_datasheet.pdf

http://www.pololu.com/file/0J276/chr6d_datasheet.pdf
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
Features
• + 3.3 V single-supply operation
• 3-axes rotation rate measurement
• 3-axes acceleration measurement
• Onboard 32-bit ARM Cortex processor
• TTL UART communication
• Configurable windowed Parks-McClellan FIR filter
• 16-bit effective measurement resolution
• High rate stability over temperature
• +/- 400 °/s full-scale gyro range
• +/- 3g full-scale accelerometer range
• 1.5 grams
Applications
• Robotics
• Platform Stabilization
• Motion Tracking
• Enhanced GPS Navigation
• General Motion Sensing
• Image Stabilization
Device Overview
The CHR-6d is a complete 6-axis Inertial Measurement Unit (IMU), with 3-axes of rotation rate
measurement, and 3-axes of acceleration measurement. The CHR-6d features a footprint of only
.8" x .7" x .1", and a weight of only 1.5 grams.
The CHR-6d includes a ARM Cortex processor running at 64 Mhz. All sensor channels are
oversampled and decimated to provide 16-bits of resolution, and a Parks-McClellan window lowpass FIR filter is then applied to remove additional noise. The corner frequency of the filter can
be adjusted in 10 Hz increments from 10 Hz to 140 Hz for each channel independently. The
number of taps used in each filter can also be adjusted from 8, 13, 32, and 64 taps. The filter
can also be disabled if preferred.
Communication is performed over a simple TTL UART interface at 115200 Baud. The CHR-6d can
be configured to transmit sensor data automatically at user-selectable rates, or to wait until
specific requests for data are received over the UART.
While the CHR-6d comes ready to use out-of-the-box, all pins needed to reprogram the Cortex
processor are available. Four unused digital IO pins are also available for additional flexibility
when custom firmware is developed. Our source code is available as a reference.
-1-
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
Absolute Maximum Ratings .......................................................................................................3
Electrical Characteristics ............................................................................................................3
Pin Configuration and Functional Descriptions ..........................................................................4
Mechanical Drawing ...................................................................................................................5
Basic Operation..........................................................................................................................5
5.1.
Sampling and Filtering.......................................................................................................6
5.2.
Calibration..........................................................................................................................6
5.3.
Self-Test ............................................................................................................................7
6.
Communication with the CHR6-d...............................................................................................7
6.1.
CHR-6d RX Packets..........................................................................................................7
6.1.1.
CHR-6d RX Packet Overview...................................................................................8
6.1.2.
SET_FIR_CORNERS ...............................................................................................9
6.1.3.
SET_FIR_TAPS........................................................................................................9
6.1.4.
SET_ACTIVE_CHANNELS ....................................................................................10
6.1.5.
SET_SILENT_MODE .............................................................................................10
6.1.6.
SET_BROADCAST_MODE....................................................................................11
6.1.7.
SET_X_GYRO_BIAS..............................................................................................11
6.1.8.
SET_Y_GYRO_BIAS..............................................................................................12
6.1.9.
SET_Z_GYRO_BIAS ..............................................................................................12
6.1.10.
SET_X_ACCEL_BIAS ............................................................................................12
6.1.11.
SET_Y_ACCEL_BIAS ............................................................................................13
6.1.12.
SET_Z_ACCEL_BIAS ............................................................................................13
6.1.13.
ZERO_RATE_GYROS ...........................................................................................13
6.1.14.
SELF_TEST............................................................................................................14
6.1.15.
WRITE_TO_FLASH................................................................................................14
6.1.16.
GET_DATA .............................................................................................................14
6.1.17.
GET_GYRO_BIAS..................................................................................................15
6.1.18.
GET_ACCEL_BIAS ................................................................................................15
6.1.19.
GET_FIR_CONFIG.................................................................................................15
6.1.20.
GET_FIR_TAP_CONFIG........................................................................................16
6.1.21.
GET_ACTIVE_CHANNELS....................................................................................16
6.1.22.
GET_BROADCAST_MODE ...................................................................................16
6.2.
CHR-6d TX Packets ........................................................................................................17
6.2.1.
CHR-6d TX Packet Overview .................................................................................17
6.2.2.
COMMAND_COMPLETE .......................................................................................18
6.2.3.
COMMAND_FAILED ..............................................................................................18
6.2.4.
BAD_CHECKSUM ..................................................................................................18
6.2.5.
BAD_DATA_LENGTH ............................................................................................18
6.2.6.
UNRECOGNIZED_PACKET ..................................................................................19
6.2.7.
BUFFER_OVERFLOW ...........................................................................................19
6.2.8.
STATUS_REPORT.................................................................................................19
6.2.9.
SENSOR_DATA .....................................................................................................20
6.2.10.
GYRO_BIAS_REPORT ..........................................................................................20
6.2.11.
ACCEL_BIAS_REPORT.........................................................................................20
6.2.12.
FIR_CONFIG_REPORT .........................................................................................21
6.2.13.
FIR_TAP_CONFIG_REPORT ................................................................................21
6.2.14.
ACTIVE_CHANNEL_REPORT...............................................................................21
6.2.15.
BROADCAST_MODE_REPORT............................................................................22
1.
2.
3.
4.
5.
-2-
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
1. Absolute Maximum Ratings
Table 1 - CHR-6d Absolute Maximum Ratings
Symbol
Vdd
Vin
Ratings
Supply voltage
Input voltage on any control pin
A
Acceleration
Top
Tstg
Operating temperature range
Storage temperature range
Maximum Value
-0.3 to 3.6
-0.3 to Vdd + 0.3
3000 g for .5 ms
10000 g for .1 ms
-40 to +85
-40 to +125
Unit
V
V
°C
°C
2. Electrical Characteristics
Symbol
Vdd
Idd
Parameter
Supply voltage
Supply current
Test condition
Table 2 - Gyro Electrical Characteristics
Symbol
Parameter
Test Condition
FSA
4x OUT (amplified)
Measurement
Range
FS
OUT (not amplified)
SoA
4x OUT (amplified)
Sensitivity
So
OUT (not amplified)
SoDr
Sensitivity change
Delta from 25 °C
vs temperature
Voff
Zero-rate level
Vref
Reference Voltage
OffDr
Zero-rate level
Delta from 25 °C
change vs.
temperature
NL
Non linearity
Best fit straight line
BW
Bandwidth
Rn
Rate noise density
Table 3 - Accelerometer Electrical Characteristics
Symbol Parameter
Test Condition
aFS
Measurement Range
SoXYZ
Sensitivity
Vdd = 3 V
Stemp
Sensitivity change
Vs = 3 V
due to temperature
nXY
X,Y noise density
nZ
Z noise density
offXY
X,Y 0 g voltage
Vs = 3 V
-3-
Min.
2.6
Min.
Min.
+/- 3
270
1.35
Typ.
3.3
50
Typ.
+/- 100
+/- 400
10
2.5
.03
Max.
3.6
56
Max.
Unit
V
mA
Unit
°/s
°/s
mV/°/s
mV/°/s
%/°/s
1.23
1.23
.02
V
V
°/s/°C
+/- 1
140
0.017
% FS
Hz
°/s/rt Hz
Typ.
+/- 3.6
300
0.01
150
300
1.5
Max.
330
1.65
Unit
g
mV/g
%/°C
ug/rt Hz
ug/rt Hz
V
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
offZ
aNL
aBW
Z 0 g voltage
Non linearity
Vs = 3 V
1.2
With external filter
1.5
+- .03
140
1.8
V
% FS
Hz
3. Pin Configuration and Functional Descriptions
Top View (note: drawing is not to scale)
Table 4 - Pin Descriptions
Pin #
1
2
3
4
5
6
7
8
9
Pin Name
Vcc
GND
D4
D3
D2
Boot0
D1
RX
TX
Pin Description
Description
3.3 V supply voltage
Supply ground
GPIO pin 4 (for custom firmware development)
GPIO pin 3 (for custom firmware development)
GPIO pin 2 (for custome firmware development)
Bootloader pin. Leave disconnected for normal operation. Pull high to
activate bootloader (for custom firmware development).
GPIO pin 1 (for custom firmware development)
RX (in) pin for UART
TX (out) pin for UART
-4-
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
4. Mechanical Drawing
5. Basic Operation
The CHR-6d integrates three orthogonal rate gyro axes and three orthogonal accelerometer axes
to provide a full six degree of freedom (6-DOF) measurement solution. The onboard ARM
Cortex™ processor samples and filters all six sensing axes.
Communication with the CHR-6d is performed over a TTL UART at 115200 baud. The UART logic
level is 3.3V, but the pins are also 5 V tolerant.
The CHR-6d operates in one of two modes: in Broadcast Mode, the IMU automatically transmits
sensor data at a user-configurable frequency between 20 Hz and 300 Hz. In Silent Mode, the IMU
only transmits data when a GET_DATA packet is received over the UART. The IMU is set to
Broadcast Mode by default. The default transmission frequency is 280 Hz.
Regardless of the broadcast frequency, the IMU output registers are updated internally at a rate
of 500 Hz. When the IMU transmits sensor data, the most recent samples are sent. Sensor data
is always sent in a SENSOR_DATA packet.
Broadcast Mode is enabled by sending a SET_BROADCAST_MODE packet to the IMU. The
SET_BROADCAST_MODE packet also configures the broadcast frequency. Silent Mode is enabled
by sending a SET_SILENT_MODE packet to the IMU.
By default, the CHR-6d transmits sensor data for all six channels. However, the IMU can also be
configured to send data for fewer sensors by sending a SET_ACTIVE_CHANNELS packet. Only
data from "active" channels will be transmitted by the IMU.
Sensor data is returned as 16-bit two's complement integers. To obtain actual rates, the data
returned by the IMU should be multiplied by a scale factor. For the rate gyros, multiplying the
-5-
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
returned sensor data by 0.02014 gives the angular rate in degrees per second. For the
accelerometers, multiplying the sensor data by 0.0001678 gives the acceleration in m/s/s.
Actual scale factors vary between devices.
All changes made to the IMU configuration are stored in RAM. To make the configuration
persistent, a WRITE_TO_FLASH packet can be sent to the IMU.
5.1.
Sampling and Filtering
The CHR-6d oversamples and decimates the ADC data on all channels to reduce quantization
noise and increase the effective ADC resolution to 16 bits. After decimation, sensor data is
processed using a configurable Parks-McClellan window FIR low-pass filter. The corner frequency
of the filter is independently adjustable for each channel from 10 Hz to 140 Hz in 10 Hz increments.
By default, the corner frequency of each filter is set to 140 Hz.
The number of taps used in each filter can be also be set to 8, 16, 32, or 64. More filter taps
results in a tighter transition band and more stop band attenuation, but at the expense of higher
group delay (see Table 5). The group delay of the FIR filter is given by
d = (taps/2)*(1000/fs)
where d is the delay in milliseconds, taps is the number of taps in the filter, and fs is the internal
sample frequency of the IMU after oversampling and decimation. Filter performance specifications
for each number of taps is given in Table 5.
Table 5- Group Delay for filter settings
TAPS
Group Delay (ms)
Stop-band
attenuation (dB)
8
11.43
40
16
22.86
40
32
45.71
60
64
91.43
80
Transition-band
width (hz)
80
50
30
20
By default, 32 taps are used in each filter. If desired, the FIR filter can be disabled entirely to
eliminate filter-induced phase-lag.
The corner frequency of each FIR filter is configuring by sending a SET_FIR_CORNERS packet to
the IMU. The SET_FIR_CORNERS packet also allows the FIR filters to be disabled. The number
of taps used in each filter is configured by sending a SET_FIR_TAPS packet to the IMU.
5.2.
Calibration
The zero-rate output of the accelerometers and the rate gyros is device-dependent, and varies with
temperature. This is particularly true for the rate gyros. The 16-bit signed value returned by the
IMU for each axis is given by
data = ADC_data - bias
-6-
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
where ADC_data is the unsigned filtered ADC data, and bias is a configurable 16-bit unsigned
value. By default, bias is set at 0x802F for the accelerometers and 0x5F6B for the rate gyros.
While the default biases may be sufficient for the accelerometers, the biases for the rate gyros
should be reconfigured at run-time.
The bias for the x, y, and z gyro axes can be configured using the SET_X_GYRO_BIAS packet, the
SET_Y_GYRO_BIAS packet, and the SET_Z_GYRO_BIAS packet, respectively. The IMU also
includes an auto-zero command that samples the rate gyro channels and automatically sets the
bias to zero the output data. Automatic gyro calibration is triggered by sending a
ZERO_RATE_GYROS packet to the IMU. During automatic calibration, which takes approximately
three seconds, the IMU should be stationary.
The bias for the accelerometers is set using the SET_X_ACCEL_BIAS, SET_Y_ACCEL_BIAS, and
SET_Z_ACCEL_BIAS packets.
5.3.
Self-Test
The CHR-6d includes a self-test feature that checks each sensor channel for proper functionality.
The self-test sequence is started by sending a SELF_TEST packet to the IMU. On completion, a
STATUS_REPORT packet is returned to report whether each sensor channel passed the self-test.
6. Communication with the CHR6-d
The CHR-6d communicates over a logic-level UART at 115200 baud.
6.1.
CHR-6d RX Packets
RX Packets are packets that can be received by the CHR-6d. Each packet received by the IMU
must begin with the three byte sequence "snp" to signal the beginning of a new packet. The
fourth byte is Packet Type indicator (PT), which identifies the packet being received. The fifth
byte, N, is the number of bytes contained in the data section of the packet. The N-byte data
section immediately follows data length byte, and the packet is finally ended with a two byte
checksum, which contains the sum of all previous bytes in the packet.
If the Packet Type indicator is unrecognized, the IMU will transmit a UNRECOGNIZED_COMMAND
packet.
RX Packet Structure
Function
's'
'n'
'p'
PT
N
d1
2
dN
Byte
1
2
3
4
5
6
I
N+5
CHK
N+6
N+7
RX Packet Description
1-3
Each received packet must begin with the three-byte (character) sequence
"snp" to signal the beginning of a new packet.
4
PT specifies the packet type.
5
N specifies the number of data bytes to expect.
6 - (N+5)
d1 through dN contain the N data bytes in the packet.
CHK is a two-byte checksum.
(N+6) - (N+7)
-7-
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
The total size of a packet with N data bytes is (N + 7) bytes. After the CHR6-d receives a full
packet, it checks to ensure that the checksum given in the last two bytes matches the sum of all
preceding bytes in the packet. If the checksum is invalid, a BAD_CHECKSUM packet is
transmitted in response.
6.1.1.
CHR-6d RX Packet Overview
Packet Name
SET_FIR_CORNERS
PT
0x80
SET_FIR_TAPS
0x81
SET_ACTIVE_CHANNELS
0x82
SET_SILENT_MODE
0x83
SET_BROADCAST_MODE
0x84
SET_X_GYRO_BIAS
0x85
SET_Y_GYRO_BIAS
0x86
SET_Z_GYRO_BIAS
0x87
SET_X_ACCEL_BIAS
SET_Y_ACCEL_BIAS
SET_Z_ACCEL_BIAS
ZERO_RATE_GYROS
0x88
0x89
0x8A
0x8B
SELF_TEST
0x8C
WRITE_TO_FLASH
0xA0
Description
Sets the corner frequency of the FIR filter for each of the six
channels. Also allows user to disable the FIR filter entirely.
Sets the number of taps used by the FIR filter on each
channel. Using more taps results in smaller transition bands
and better stop-band attenuation, at the expense of more
phase lag.
Specifies which channel data should be transmitted over the
UART.
Enables "Silent Mode." In Silent Mode, the IMU only reports
data when a GET_DATA packet is received.
Enables "Broadcast Mode." In Broadcast Mode, the IMU
automatically transmits sensor data every Ts milliseconds,
where Ts is included in the data section of the
SET_BROADCAST_MODE packet.
Manually sets the x-axis rate gyro zero-point. The zero-point
can be automatically set for all gyro axes by sending a
ZERO_RATE_GYROS packet.
Manually sets the y-axis rate gyro zero-point. The zero-point
can be automatically set for all gyro axes by sending a
ZERO_RATE_GYROS packet.
Manually sets the z-axis rate gyro zero-point. The zero-point
can be automatically set for all gyro axes by sending a
ZERO_RATE_GYROS packet.
Manually sets the x-axis accelerometer zero point.
Manually sets the y-axis accelerometer zero point.
Manually sets the z-axis accelerometer zero point.
Starts internal self-calibration of all three rate gyro axes. By
default, rate gyros are zeroed on IMU startup, but gyro
startup calibration can be disabled (or re-enabled) by
sending a SET_START_CAL packet
Instructs the IMU to perform a self-test of all sensor
channels. A STATUS_REPORT packet is transmitted after
the self-test is complete.
Writes IMU configuration to on-board flash, so that the
configuration persists when the power is cycled.
-8-
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
GET_DATA
0x01
GET_GYRO_BIAS
0x02
GET_ACCEL_BIAS
0x03
GET_FIR_CONFIG
0x04
GET_FIR_TAP_CONFIG
0x05
GET_ACTIVE_CHANNELS
0x06
GET_BROADCAST_MODE
0x07
6.1.2.
In Silent Mode, the IMU waits to receive a GET_DATA
packet before transmitting sensor data. The most recent
data from all active sensor channels is transmitted in
response to a GET_DATA packet. In Broadcast Mode, a
GET_DATA packet is ignored.
Returns the bias values for all three rate gyros in a
GYRO_BIAS_REPORT packet.
Return the bias values for all three accel axes in a
ACCEL_BIAS_REPORT packet.
Returns the FIR corner frequency configuration for all six
sensor channels in a FIR_CONFIG_REPORT packet.
Reports the FIR tap count for all sensor channels in a
FIR_TAP_CONFIG_REPORT packet.
Reports which channels are "active." Active channels are
sensor channels that are measured and transmitted in
response to a GET_DATA packet, or periodically in
Broadcast Mode.
Returns the BROADCAST_MODE_REPORT packet, which
specifies whether the IMU is in Broadcast Mode or Silent
Mode.
SET_FIR_CORNERS
Description
Sets the corner frequency of the FIR filter for each of the six channels. The corner frequency can
be set at 10 Hz increments to values between 10 Hz and 140 Hz.
Packet Definition
PT = 0x80
N = 0x6
D1
gyro_z
D2
gyro_y
D3
gyro_x
D4
acc_z
D5
acc_y
D6
acc_x
FIR corner frequency = 10*(x-1), where x is a one byte value ranging between 2 and 15. If x is 0 or
1, then the FIR filter for the channel is disabled.
After successfully setting the FIR corner frequency on each channel, the IMU transmits a
COMMAND_COMPLETE packet.
6.1.3.
SET_FIR_TAPS
Description
-9-
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
Sets the number of taps used by the FIR filter on each channel. Using more taps results in smaller
transition bands and better stop-band attenuation, but at the expense of more phase lag. Possible
tap counts are 8, 16, 32, and 64.
Packet Definition
PT = 0x81
N = 0x2
bit 7 bit 6
NA
D1
bit 5 bit 4 bit 3 bit 2
NA
gyro_z
bit 1 bit 0
gyro_y
bit 7 bit 6
gyro_x
D2
bit 5 bit 4 bit 3 bit 2
accel_z
accel_y
bit 1 bit 0
accel_x
For each channel, the number of taps in the FIR filter is specified by a 2-bit value, where
00 = 8 taps
01 = 16 taps
10 = 32 taps
11 = 64 taps
After successfully setting the number of filter taps on each channel, the IMU transmits a
COMMAND_COMPLETE packet.
6.1.4.
SET_ACTIVE_CHANNELS
Description
Specifies which channel data should be transmitted over the UART in response to a GET_DATA
packet, or periodically in Broadcast Mode. Any combination of sensor channels can be set as
active or inactive.
Packet Definition
PT = 0X82
N = 0x1
bit 7
NA
bit 6
NA
bit 5
gyro_z
bit 4
gyro_y
D1
bit 3
gyro_x
bit 2
accel_z
bit 1
accel_y
bit 0
accel_x
If the bit corresponding to a sensor channel is set (i.e. gyro_z = 1), then the channel is active. If
the bit is cleared (i.e. gyro_z = 0), then the channel is inactive, and data from that channel will not
be transmitted.
6.1.5.
SET_SILENT_MODE
Description
- 10 -
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
Enables "Silent Mode." In Silent Mode, the IMU only reports data when a GET_DATA packet is
received.
Packet Definition
PT = 0x83
N=0
The SET_SILENT_MODE packet includes no data bytes (the packet type identifier, PT, is followed
immediately by the checksum).
6.1.6.
SET_BROADCAST_MODE
Description
Enables "Broadcast Mode." In Broadcast Mode, the IMU automatically transmits sensor data at
regular time intervals.
Packet Definition
PT = 0x84
N=1
bit 7
bit 6
bit 5
D1
bit 3
x
bit 4
bit 2
bit 1
bit 0
The broadcast frequency is given by
f = ((380/255)*x + 20) Hz
where f is the broadcast frequency, and x is the data byte passed in the
SET_BROADCAST_MODE packet. The broadcast frequency thus ranges between 400 Hz (x =
255) and 20 Hz (x = 0).
6.1.7.
SET_X_GYRO_BIAS
Description
Manually sets the x-axis rate gyro zero-point. The zero-point can be automatically set for all gyro
axes by sending a ZERO_RATE_GYROS packet.
Packet Definition
PT = 0x85
N=2
bit 7
bit 6
bit 5
D1
bit 4 bit 3
bit 2
bit 1
bit 0
- 11 -
bit 7
bit 6
bit 5
D2
bit 4 bit 3
bit 2
bit 1
bit 0
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
Gyro zero-point = 16-bit unsigned value
6.1.8.
SET_Y_GYRO_BIAS
Description
Manually sets the y-axis rate gyro zero-point. The zero-point can be automatically set for all gyro
axes by sending a ZERO_RATE_GYROS packet.
Packet Definition
PT = 0x86
N=2
bit 7
bit 6
6.1.9.
bit 5
D1
bit 4 bit 3
bit 2 bit 1 bit 0 bit 7 bit 6 bit 5
Gyro zero-point = 16-bit unsigned value
D2
bit 4 bit 3
bit 2
bit 1
bit 0
SET_Z_GYRO_BIAS
Description
Manually sets the z-axis rate gyro zero-point. The zero-point can be automatically set for all gyro
axes by sending a ZERO_RATE_GYROS packet.
Packet Definition
PT = 0x87
N=2
bit 7
bit 6
6.1.10.
bit 5
D1
bit 4 bit 3
D2
bit 2 bit 1 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3
Gyro zero-point = 16-bit unsigned value
SET_X_ACCEL_BIAS
Description
Manually sets the x-axis accelerometer zero point.
Packet Definition
PT = 0x88
N=2
- 12 -
bit 2
bit 1
bit 0
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
bit 7
bit 6
6.1.11.
bit 5
D1
D2
bit 4 bit 3 bit 2 bit 1 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3
Accelerometer zero-point = 16-bit unsigned value
bit 2
bit 1
bit 0
bit 2
bit 1
bit 0
bit 2
bit 1
bit 0
SET_Y_ACCEL_BIAS
Description
Manually sets the y-axis accelerometer zero point.
Packet Definition
PT = 0x89
N=2
bit 7
bit 6
6.1.12.
bit 5
D1
D2
bit 4 bit 3 bit 2 bit 1 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3
Accelerometer zero-point = 16-bit unsigned value
SET_Z_ACCEL_BIAS
Description
Manually sets the z-axis accelerometer zero point.
Packet Definition
PT = 0x8A
N=2
bit 7
bit 6
6.1.13.
bit 5
D1
D2
bit 4 bit 3 bit 2 bit 1 bit 0 bit 7 bit 6 bit 5 bit 4 bit 3
Accelerometer zero-point = 16-bit unsigned value
ZERO_RATE_GYROS
Description
Starts internal self-calibration of all three rate gyro axes. By default, rate gyros are zeroed on IMU
startup, but gyro startup calibration can be disabled (or re-enabled) by sending a
SET_START_CAL packet
Packet Definition
PT = 0x8B
- 13 -
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
N=0
There are no data bytes associated with the ZERO_RATE_GYROS packet. The checksum
immediately follows the packet type identifier (PT).
6.1.14.
SELF_TEST
Description
Instructs the IMU to perform a self-test of all sensor channels. The self-test sequence takes
approximately 570 milliseconds to complete. During this time, the IMU should be kept stationary.
A STATUS_REPORT packet is transmitted after the self-test is complete.
Packet Definition
PT = 0x8C
N=0
There are no data bytes associated with the SELF_TEST packet. The checksum immediately
follows the packet type identifier (PT).
6.1.15.
WRITE_TO_FLASH
Description
Writes IMU configuration to on-board flash, so that the configuration persists when the power is
cycled.
Packet Definition
PT = 0xA0
N=0
There are no data bytes associated with the WRITE_TO_FLASH packet. The checksum
immediately follows the packet type identifier (PT).
6.1.16.
GET_DATA
Description
In Silent Mode, the IMU waits to receive a GET_DATA packet before transmitting sensor data. The
most recent data from all active sensor channels is transmitted in response to a GET_DATA
packet. In Broadcast Mode, a GET_DATA packet is ignored.
Packet Definition
PT = 0x01
N=0
- 14 -
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
There are no data bytes associated with the GET_DATA packet. The checksum immediately
follows the packet type identifier (PT).
6.1.17.
GET_GYRO_BIAS
Description
Returns the bias values for all three rate gyros in a GYRO_BIAS_REPORT packet.
Packet Definition
PT = 0x02
N=0
There are no data bytes associated with the GET_GYRO_BIAS packet. The checksum
immediately follows the packet type identifier (PT).
6.1.18.
GET_ACCEL_BIAS
Description
Return the bias values for all three accel axes in a ACCEL_BIAS_REPORT packet.
Packet Definition
PT = 0x03
N=0
There are no data bytes associated with the GET_ACCEL_BIAS packet. The checksum
immediately follows the packet type identifier (PT).
6.1.19.
GET_FIR_CONFIG
Description
Returns the FIR corner frequency configuration for all six sensor channels in a
FIR_CONFIG_REPORT packet.
Packet Definition
PT = 0x04
N=0
There are no data bytes associated with the GET_FIR_CONFIG packet. The checksum
immediately follows the packet type identifier (PT).
- 15 -
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
6.1.20.
GET_FIR_TAP_CONFIG
Description
Reports the FIR tap count for all sensor channels in a FIR_TAP_CONFIG_REPORT packet.
Packet Definition
PT = 0x05
N=0
There are no data bytes associated with the GET_FIR_TAP_CONFIG packet. The checksum
immediately follows the packet type identifier (PT).
6.1.21.
GET_ACTIVE_CHANNELS
Description
Reports which channels are "active." Active channels are sensor channels that are measured and
transmitted in response to a GET_DATA packet, or periodically in Broadcast Mode. Active
channels are reported in an ACTIVE_CHANNEL_REPORT packet.
Packet Definition
PT = 0x06
N=0
There are no data bytes associated with the GET_ACTIVE_CHANNELS packet. The checksum
immediately follows the packet type identifier (PT).
6.1.22.
GET_BROADCAST_MODE
Description
Causes the IMU to send a BROADCAST_MODE_REPORT packet, which specifies whether the
IMU is in Broadcast Mode or Silent Mode.
Packet Definition
PT = 0x07
N=0
There are no data bytes associated with the GET_BROADCAST_MODE packet. The checksum
immediately follows the packet type identifier (PT).
- 16 -
CH Robotics
CHR-6d Digital Inertial Measurement Unit
Product datasheet - Rev. 1.1, Preliminary
6.2.
CHR-6d TX Packets
TX Packets are packets that can be transmitted by the IMU. The structure of transmitted packets is
exactly the same as the structure of RX packets.
TX Packet Structure
Function
's'
'n'
'p'
PT
N
d1
2
dN
Byte
1
2
3
4
5
6
I
N+5
CHK
N+6
N+7
TX Packet Description
1-3
Each received packet must begin with the three-byte (character) sequence
"snp" to signal the beginning of a new packet.
4
PT specifies the packet type.
5
N specifies the number of data bytes to expect.
6 - (N+5)
d1 through dN contain the N data bytes in the packet.
CHK is a two-byte checksum.
(N+6) - (N+7)
The total size of a packet with N data bytes is (N + 7) bytes.
6.2.1.
CHR-6d TX Packet Overview
Packet Name
COMMAND_COMPLETE
PT
0xB0
COMMAND_FAILED
0xB1
BAD_CHECKSUM
0xB2
BAD_DATA_LENGTH
0xB3
UNRECOGNIZED_PACKET
0xB4
BUFFER_OVERFLOW
0xB5
STATUS_REPORT
0xB6
SENSOR_DATA
0xB7
GYRO_BIAS_REPORT
ACCEL_BIAS_REPORT
FIR_CONFIG_REPORT
FIR_TAP_CONFIG_REPORT
0xB8
0xB9
0xBA
0xBB
ACTIVE_CHANNEL_REPORT
0xBC
Description
Transmitted by the IMU upon successful completion of
a command that does not require data to be returned.
Transmitted by the IMU when a command received
over the UART could not be executed.
Transmitted by the IMU when a received packet
checksum does not match the sum of the other bytes in
the packet.
Transmitted by the IMU when a received packet
contained more or less data than expected for a given
packet type.
Transmitted if the IMU receives an unrecognized
packet.
Transmitted by the IMU when the internal receive buffer
overflows before a full packet is received.
Transmitted at the end of a self-test procedure,
triggered by a SELF_TEST command.
Sent in response to a GET_DATA packet, or sent
automatically in Broadcast Mode.
Sent in response to the GET_GYRO_BIAS command.
Sent in response to the GET_ACCEL_BIAS command.
Sent in response to the GET_FIR_CONFIG command.
Sent in response to the GET_FIR_TAP_CONFIG
command.
Sent in response to a GET_ACTIVE_CHANNELS
- 17 -
CH Robotics
CHR-6d Digital IMU datasheet
BROADCAST_MODE_REPORT
6.2.2.
0XBD
command.
Sent in response to a GET_BROADCAST_MODE
command.
COMMAND_COMPLETE
Description
Transmitted by the IMU upon successful completion of a command that does not require data to be
returned.
Packet Definition
PT = 0xB0
N=1
bit 7
6.2.3.
bit 6
D1
bit 5
bit 4
bit 3
bit 2
bit 1
Packet Type (TP) identifier for executed command
bit 0
COMMAND_FAILED
Description
Transmitted by the IMU when a command received over the UART could not be executed.
Packet Definition
PT = 0xB1
N=1
bit 7
6.2.4.
D1
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
Packet Type (TP) identifier for command that could not be executed
BAD_CHECKSUM
Description
Transmitted by the IMU when a received packet checksum does not match the sum of the other
bytes in the packet.
Packet Definition
PT = 0xB2
N=0
6.2.5.
BAD_DATA_LENGTH
Description
Transmitted by the IMU when a received packet contained more or less data than expected for a
given packet type.
- 18 -
CH Robotics
CHR-6d Digital IMU datasheet
Packet Definition
PT = 0xB3
N=1
bit 7
bit 6
6.2.6.
D1
bit 5
bit 4
bit 3
bit 2
bit 1
Packet Type (TP) identifier of the received packet
bit 0
UNRECOGNIZED_PACKET
Description
Transmitted if the IMU receives an unrecognized packet
Packet Definition
PT = 0xB4
N=1
bit 7
bit 6
6.2.7.
D1
bit 5
bit 4
bit 3
bit 2
bit 1
Packet Type (TP) identifier of unrecognized command
bit 0
BUFFER_OVERFLOW
Description
Transmitted by the IMU when the internal receive buffer overflows before a full packet is received.
Packet Definition
PT = 0xB5
N=0
6.2.8.
STATUS_REPORT
Description
Transmitted at the end of a self-test procedure, triggered by a SELF_TEST command.
Packet Definition
PT = 0xB6
N=1
bit 7
bit 6
NA
NA
bit 5
gyro_z
error
bit 4
gyro_y
error
D1
bit 3
gyro_x
error
bit 2
accel_z
error
bit 1
accel_y
error
bit 0
accel_x
error
If the self-test failed for any of the channels, then the corresponding bit will be set (i.e. if the z-axis
gyro fails the self-test, then bit 5 will be set, etc.)
- 19 -
CH Robotics
CHR-6d Digital IMU datasheet
6.2.9.
SENSOR_DATA
Description
Sent in response to a GET_DATA packet, or sent automatically in Broadcast Mode. Only active
channels are included in the packet.
Packet Definition
PT = 0xB7
N = 1 + 2*(# of active channels)
The first byte following the PT byte indicates which channels are active. The actual sensor data is
contained in the remaining data bytes.
If all channels are active, then data is given in the following order: { gyro_z, gyro_y, gyro_x,
accel_z, accel_y, accel_x }, where D1 and D2 correspond to gyro_z, D3 and D4 to gyro_y, etc.
Data is returned as 16-bit two's-complement integers.
When one or more channel is inactive, then the data is returned in the same order, but skipping the
inactive channels. For example, if gyro_z, gyro_x, and accel_y are disabled, then the data is given
in the following order: { gyro_y, accel_z, accel_x }.
bit 7
NA
bit 6
NA
bit 5
gz
D1
bit 4 bit 3
gy
gx
bit 2
az
bit 1
ay
bit 0
ax
D2
D3
first active
channel
gz = 1 if the z-axis gyro is active, 0 otherwise
gy = 1 if the y-axis gyro is active, 0 otherwise
gx = 1 if the x-axis gyro is active, 0 otherwise
az = 1 if the z-axis accelerometer is active, 0 otherwise
ay = 1 if the y-axis accelerometer is active, 0 otherwise
ax = 1 if the x-axis accelerometer is active, 0 otherwise
6.2.10.
GYRO_BIAS_REPORT
Description
Sent in response to the GET_GYRO_BIAS command
Packet Definition
PT = 0xB8
N=6
D1
D2
gyro_z bias
6.2.11.
D3
D4
gyro_y bias
D5
D6
gyro_x bias
ACCEL_BIAS_REPORT
Description
Sent in response to the GET_ACCEL_BIAS command
Packet Definition
- 20 -
D4
D5
second
active
I
I
CH Robotics
CHR-6d Digital IMU datasheet
PT = 0xB9
N=6
D1
D2
accel_z bias
6.2.12.
D3
D4
accel_y bias
D5
D6
accel_x bias
FIR_CONFIG_REPORT
Description
Sent in response to the GET_FIR_CONFIG command
Packet Definition
PT = 0xBA
N=3
7
D1
6 5 4 3 2 1 0
gyro_z
gyro_y
7
D2
6 5 4 3 2 1 0
gyro_x
acc_z
7
D3
6 5 4 3 2 1 0
acc_y
acc_x
The corner frequency of the FIR filter is given by 10*(x-1), where x is a 4-bit unsigned integer. If
acc_x = 0b0011 = 3, then the corner of the FIR filter on the accelerometer x-axis is 20 Hz.
If x is equal to 0 or 1, then the FIR filter is disabled on that channel.
6.2.13.
FIR_TAP_CONFIG_REPORT
Description
Sent in response to the GET_FIR_TAP_CONFIG command.
Packet Definition
PT = 0xBB
N=2
bit 7 bit 6
NA
D1
bit 5 bit 4 bit 3 bit 2
NA
gyro_z
bit 1 bit 0
gyro_y
bit 7 bit 6
gyro_x
D2
bit 5 bit 4 bit 3 bit 2
accel_z
accel_y
For each channel, the number of taps in the FIR filter is specified by a 2-bit value, where
00 = 8 taps
01 = 16 taps
10 = 32 taps
11 = 64 taps
6.2.14.
ACTIVE_CHANNEL_REPORT
Description
Sent in response to a GET_ACTIVE_CHANNELS command
- 21 -
bit 1 bit 0
accel_x
CH Robotics
CHR-6d Digital IMU datasheet
Packet Definition
PT = 0xBC
N=1
bit 7
NA
bit 6
NA
bit 5
gyro_z
D1
bit 3
gyro_x
bit 4
gyro_y
bit 2
accel_z
bit 1
accel_y
bit 0
accel_x
A set bit indicates that the specified channel is active.
6.2.15.
BROADCAST_MODE_REPORT
Description
Sent in response to a GET_BROADCAST_MODE packet. Specifies whether the IMU is in
Broadcast Mode or Silent Mode. Also specifies the broadcast frequency if the IMU is in Broadcast
Mode.
Packet Definition
PT = 0xBD
N=2
bit 7
bit 6
bit 5
D1
bit 4 bit 3
x
bit 2
bit 1
bit 0
bit 7
NA
bit 6
NA
bit 5
NA
D2
bit 4 bit 3
NA
NA
bit 2
NA
bit 1
NA
The broadcast frequency is given by
f = ((380/255)*x + 20) Hz
where f is the broadcast frequency, and x is the byte stored in D1. The broadcast frequency thus
ranges between 400 Hz (when x = 255) and 20 Hz (when x = 0).
If mode = 1, then the IMU is in Broadcast Mode.
If mode = 0, then the IMU is in Silent Mode.
- 22 -
bit 0
mode
CH Robotics
CHR-6d Digital IMU datasheet
This document is provided as reference only; "typical" device specifications must be evaluated by
the end-user. CH Robotics reserves the right to modify this document and the products it
describes without notice.
CH Robotics products are not intended for use in weapons systems, aircraft, life-saving or
life-sustaining systems, automobiles, or any other application where failure could result in
injury, death, property damage, or environmental damage.
- 23 -
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement