ADIS16475 driver
This driver supports Analog Device's IMUs on SPI bus.
1. Supported devices #
Each supported device is a precision, miniature microelectromechanical system (MEMS) inertial measurement unit (IMU) that includes a triaxial gyroscope and a triaxial accelerometer. Each inertial sensor in the IMU device combines with signal conditioning that optimizes dynamic performance. The factory calibration characterizes each sensor for sensitivity, bias, alignment, linear acceleration (gyroscope bias), and point of percussion (accelerometer location). As a result, each sensor has dynamic compensation formulas that provide accurate sensor measurements over a broad set of conditions.
2. Device attributes #
Accelerometer, gyroscope measurements are always provided. Furthermore, the driver offers the capability to retrieve the delta angle and the delta velocity measurements computed by the device.
The delta angle measurements represent a calculation of angular displacement between each sample update, while the delta velocity measurements represent a calculation of linear velocity change between each sample update.
Finally, temperature data are provided which show a coarse measurement of the temperature inside of the IMU device. This data is most useful for monitoring relative changes in the thermal environment.
The signal chain of each inertial sensor (accelerometers and gyroscopes) includes the application of unique correction formulas, which are derived from extensive characterization of bias, sensitivity, alignment, response to linear acceleration (gyroscopes), and point of percussion (accelerometer location) over a temperature range of −40°C to +85°C, for each ADIS device. These correction formulas are not accessible, but users do have the opportunity to adjust the bias for each sensor individually through the calibbias attribute.
Each IIO device, has a device folder under /sys/bus/iio/devices/iio:deviceX, where X is the IIO index of the device. Under these folders reside a set of device files, depending on the characteristics and features of the hardware device in questions. These files are consistently generalized and documented in the IIO ABI documentation.
The following tables show the adis16475 related device files, found in the specific device folder path /sys/bus/iio/devices/iio:deviceX.
|
3-Axis Accelerometer related device files |
Description |
|
in_accel_scale |
Scale for the accelerometer channels. |
|
in_accel_x_calibbias |
Calibration offset for the X-axis accelerometer channel. |
|
in_accel_x_raw |
Raw X-axis accelerometer channel value. |
|
in_accel_y_calibbias |
Calibration offset for the Y-axis accelerometer channel. |
|
in_accel_y_raw |
Raw Y-axis accelerometer channel value. |
|
in_accel_z_calibbias |
Calibration offset for the Z-axis accelerometer channel. |
|
in_accel_z_raw |
Raw Z-axis accelerometer channel value. |
|
in_deltavelocity_scale |
Scale for delta velocity channels. |
|
in_deltavelocity_x_raw |
Raw X-axis delta velocity channel value. |
|
in_deltavelocity_y_raw |
Raw Y-axis delta velocity channel value. |
|
in_deltavelocity_z_raw |
Raw Z-axis delta velocity channel value. |
|
3-Axis Gyroscope related device files |
Description |
|
in_anglvel_scale |
Scale for the gyroscope channels. |
|
in_anglvel_x_calibbias |
Calibration offset for the X-axis gyroscope channel. |
|
in_anglvel_x_raw |
Raw X-axis gyroscope channel value. |
|
in_anglvel_y_calibbias |
Calibration offset for the Y-axis gyroscope channel. |
|
in_anglvel_y_raw |
Raw Y-axis gyroscope channel value. |
|
in_anglvel_z_calibbias |
Calibration offset for the Z-axis gyroscope channel. |
|
in_anglvel_z_raw |
Raw Z-axis gyroscope channel value. |
|
in_deltaangl_scale |
Scale for delta angle channels. |
|
in_deltaangl_x_raw |
Raw X-axis delta angle channel value. |
|
in_deltaangl_y_raw |
Raw Y-axis delta angle channel value. |
|
in_deltaangl_z_raw |
Raw Z-axis delta angle channel value. |
|
Temperature sensor related files |
Description |
|
in_temp0_raw |
Raw temperature channel value. |
|
in_temp0_scale |
Scale for the temperature sensor channel. |
|
Miscellaneous device files |
Description |
|
name |
Name of the IIO device. |
|
sampling_frequency |
Currently selected sample rate. |
|
filter_low_pass_3db_frequency |
Bandwidth for the accelerometer and gyroscope channels. |
The following table shows the adis16475 related device debug files, found in the specific device debug folder path /sys/kernel/debug/iio/iio:deviceX.
|
Debugfs device files |
Description |
|
serial_number |
The serial number of the chip in hexadecimal format. |
|
product_id |
Chip specific product id (e.g. 16475, 16500, 16505, etc.). |
|
flash_count |
The number of flash writes performed on the device. |
|
firmware_revision |
String containing the firmware revision in the following format ##.##. |
|
firmware_date |
String containing the firmware date in the following format mm-dd-yyyy. |
Channels processed values #
A channel value can be read from its _raw attribute. The value returned is the raw value as reported by the devices. To get the processed value of the channel, apply the following formula:
)
Where _offset and _scale are device attributes. If no _offset attribute is present, simply assume its value is 0.
The adis16475 driver offers data for 5 types of channels, the table below shows the measurement units for the processed value, which are defined by the IIO framework:
|
Channel type |
Measurement unit |
|
Acceleration on X, Y, and Z axis |
Meters per Second squared |
|
Angular velocity on X, Y and Z axis |
Radians per second |
|
Delta velocity on X. Y, and Z axis |
Meters per Second |
|
Delta angle on X, Y, and Z axis |
Radians |
|
Temperature |
Millidegrees Celsius |
Usage examples #
Show device name:
Show accelerometer channels value:
-
X-axis acceleration = in_accel_x_raw * in_accel_scale = −0.010209188 m/s^2
-
Y-axis acceleration = in_accel_y_raw * in_accel_scale = −1.115262214 m/s^2
-
Z-axis acceleration = in_accel_z_raw * in_accel_scale = 9.666833453 m/s^2
Show gyroscope channels value:
-
X-axis angular velocity = in_anglvel_x_raw * in_anglvel_scale = −0.019947756 rad/s
-
Y-axis angular velocity = in_anglvel_y_raw * in_anglvel_scale = 0.00802188 rad/s
-
Z-axis angular velocity = in_anglvel_z_raw * in_anglvel_scale = −0.003617898 rad/s
Set calibration offset for accelerometer channels:
Set calibration offset for gyroscope channels:
Set sampling frequency:
Set bandwidth for accelerometer and gyroscope:
Show serial number:
Show product id:
Show flash count:
Show firmware revision:
Show firmware date:
3. Device buffers #
This driver supports IIO buffers.
All devices support retrieving the raw acceleration, gyroscope and temperature measurements using buffers.
The following device families also support retrieving the delta velocity, delta angle and temperature measurements using buffers:
-
ADIS16477
-
ADIS16500
-
ADIS16505
-
ADIS16507
However, when retrieving acceleration or gyroscope data using buffers, delta readings will not be available and vice versa.
Usage examples #
Set device trigger in current_trigger, if not already set:
Select channels for buffer read:
Set the number of samples to be stored in the buffer:
Enable buffer readings:
Obtain buffered data:
||
||
||
||
||
||
|See Documentation/iio/iio_devbuf.rst for more information about how buffered data is structured.
4. IIO Interfacing Tools #
See Documentation/iio/iio_tools.rst for the description of the available IIO interfacing tools.