PNI SENtral User Manual
Page 22
PNI Sensor Corporation
Doc #1018049 R03
SENtral Technical Data Sheet
Page 21
Perform the following:
Set the sensor output data rates (ODRs): MagRate, AccelRate, and GyroRate. If a
sensor rate is set to 0x00, SENtral will shutdown the sensor and disable SENtral
background calibration. There are two major points regarding setting these registers:
o The AccelRate and GyroRate register values should be 1/10
th
the desired rate,
while the MagRate value should match the desired ODR. For example, if the
desired ODR is 30 Hz for the magnetometer, 100 Hz for the accelerometer, and
200 Hz for the gyroscope, then the respective register values should be 0x1E
(30
d
), 0x0A (10
d
), and 0x14 (20
d
).
o The actual accelerometer and gyro ODRs are limited to the ODRs supported by
the specific sensors. If the AccelRate or GyroRate register values do not
correspond to a supported ODR, then the next highest ODR will be used. For
instance, if the GyroRate register is set to 0x14, which corresponds to 200 Hz, but
the gyro supports 95 Hz, 190 Hz, and 380 Hz, then the actual gyro ODR will be
380 Hz since this is the closest supported rate above that requested by the register.
Establish the quaternion or Euler angle output data rate, where the output data rate
equals GyroRate divided by QRateDivisor. The default for QRateDivisor is 0x00,
which is interpreted as ‘1’ and results in the output data rate equaling GyroRate.
Establish how SENtral’s orientation and sensor data is to be output. The
AlgorithmControl register allows the user to select either quaternion or Euler angles
(heading, pitch, and roll) for orientation outputs, and either scaled or raw sensor data
outputs. The default is 0x00, corresponding to quaternion and scaled sensor data.
Establish which events will trigger an interrupt to the host by configuring the
EnableEvent register. PNI specifically recommends enabling bit [1], the Error
interrupt bit, in addition to whichever other interrupts the user wants.
Example steps to do this are below:
Write 0x640A0F to the MagRate register. Since SENtral automatically increments to
the next register, this also populates the AccelRate and GyroRate registers. This sets
MagRate to 100 Hz, AccelRate to 100 Hz, and GyroRate to 150 Hz.
Write 0x01 to the QRateDivisor Register. This sets the quaternion output data rate to
equal the GyroRate. For writing 0x01 this step is optional, since the default also sets
the quaternion output data rate equal to GyroRate.
Write 0x06 to the AlgorithmControl register. This enables heading, pitch, and roll
orientation outputs and raw sensor data outputs. This step is optional, as the default
register value of 0x00 results in outputs of quaternions and scaled sensor data.