Tableau de clic 9DOF 2
Tableau de clic 9DOF 2
Le Click Board 9DOF 2™ est une carte complémentaire compacte pour les applications qui nécessitent la fonctionnalité de suivi de mouvement et de magnétomètre à faible consommation d'énergie. Cette carte comprend le capteur MotionTracking™ à 9 axes ICM-20948 de TDK Invensense, qui se compose de deux capteurs combinés dans un seul boîtier pour une solution 9DOF universelle. Dans ce package, nous avons un gyroscope à 3 axes, un accéléromètre à 3 axes, un magnétomètre à 3 axes, combinés à un processeur de mouvement numérique (DMP) et un micrologiciel d'étalonnage en temps réel. Toutes ces fonctionnalités font de la 9DOF 2 Click Board™ un excellent choix pour les fabricants à la recherche d'un produit pour éliminer la sélection, la qualification et l'intégration au niveau du système coûteuses et complexes des appareils discrets, garantissant des performances de mouvement optimales pour les consommateurs. Il est également parfaitement adapté aux capteurs portables et aux applications IoT nécessitant un dispositif de suivi de mouvement à faible consommation extensible avec des capteurs I2C supplémentaires.
La carte Click Board™ 9DOF 2 est prise en charge par une bibliothèque compatible mikroSDK, qui comprend des fonctions qui simplifient le développement logiciel. Cette carte Click Board™ est un produit entièrement testé, prêt à être utilisé sur un système équipé du socket mikroBUS™.
How Does The 9DOF 2 Click Board™ Work?
The 9DOF 2 Click Board™ is based on the ICM-20948, a high performance, 9-axis MotionTracking™ IC from TDK Invensense. ICM-20948 also supports an auxiliary I2C interface to external sensors which offer greater system flexibility. The output of each MEMS is processed and digitized by a separate sigma-delta 16-bit A/D converter (ADC). Three-axis gyroscope MEMS can be programmed to measure the rotation about each axis, in four different ranges of rotational speed (degrees per angle, DPS): ±250, ±500, ±1000, and ±2000. Three-axis accelerometer MEMS can be programmed to measure the acceleration along each axis, in four different acceleration ranges: ±2g, ±4g, ±8g, and ±16g. A three-axis magnetometer can do a full-scale measurement of ±4900 µT.
Interrupt functionality is configured via the Interrupt Configuration register. Items that are configurable include the INT pin configuration, the interrupt latching and clearing method, and triggers for the interrupt. The interrupt is routed to the INT pin of the mikroBUS™.
A FIFO buffer helps to further reduce the processing load, offering temporary storage for the output data. The ICM-20948 contains a FIFO of size 512 bytes (FIFO size will vary depending on DMP feature-set) that is accessible via the Serial Interface. The FIFO configuration register determines which data is written into the FIFO. Possible choices include gyro data, accelerometer data, temperature readings, auxiliary sensor readings, and FSYNC input. Synchronization with an external digital signal is possible over the FSYNC pin. This pin is routed to the PWM pin of the mikroBUS™, labelled as SNC.
The embedded Digital Motion Processor (DMP) within the ICM-20948 offloads computation of motion processing algorithms from the host processor. The DMP acquires data from accelerometers, gyroscopes, and additional third-party sensors such as magnetometers, and processes the data. The resulting data can be read from the FIFO. The DMP has access to the external pins, which can be used for generating interrupts.
ICM-20948 supports both SPI and I2C communication interfaces but only SPI interface is used on the 9DOF 2 Click. The voltage level conversion between ICM-20948 and 3.3V MCU is done by the TXB0108 bidirectional voltage-level translator.
The 9DOF 2 Click Board™ uses only the SPI communication interface. It is designed to be operated only with 3.3V logic levels. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with logic levels of 5V.
SPECIFICATIONS
Type | Gyroscope,Magnetic,Motion |
Applications | Can be used for Smartphones and Tablets, wearable sensors and IoT Applications. |
On-board modules | The 9DOF 2 Click Board™ uses the ICM-20948 IC, the world's lowest power 9-axis MotionTracking device, from TDK Invensense. |
Key Features | Mobile phones, tablet PCs, GPS systems, Smartwatches, Sport and fitness devices, and many more. |
Interface | SPI |
Compatibility | mikroBUS |
Click board size | S (28.6 x 25.4 mm) |
Input Voltage | 3.3V |
PINOUT DIAGRAM
This table shows how the pinout of the 9DOF 2 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | SYN | External sync | |
NC | 2 | RST | INT | 15 | INT | Interrupt | |
SPI Chip Select | CS | 3 | CS | RX | 14 | NC | |
SPI Clock | SCK | 4 | SCK | TX | 13 | NC | |
SPI Data OUT | SDO | 5 | MISO | SCL | 12 | NC | |
SPI Data IN | SDI | 6 | MOSI | SDA | 11 | NC | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
Software Support
We provide a library for the 9DOF 2 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enable the 9DOF 2 Click Board™. It initializes and defines the SPI bus driver and drivers that offer a plethora of settings. The library also offers functions that allow reading of accelerometer, gyroscope pressure and temperature, as well as generic read and write function that offers reading( and writing ) of different lengths of data to all available registers.
Key Functions
void c9dof2_angular_rate ( float *x_ang_rte, float *y_ang_rte, float *z_ang_rte );
- Function is used to calculate angular rate.void c9dof2_acceleration_rate ( float *x_accel_rte, float *y_accel_rte,float *z_accel_rte );
- Function is used to calculate acceleration rate.void c9dof2_def_settings ( );
- Function is used to apply the default settings to the device.
Example Description
The application is composed of three sections :
- System Initialization - Initializes SPI module, LOG and GPIO structures, sets INT pin as input and PWM as output.
- Application Initialization - Initializes SPI and device drivers, perform a safety check, applies default and writes an initial log.
- Application Task - (code snippet) Demonstrates use of 9DOF 2 click board by reading angular rate, acceleration rate and displaying data via USART terminal.
void application_task ( ) { c9dof2_angular_rate( &x_gyro, &y_gyro, &z_gyro ); mikrobus_logWrite( "Angular rate: ", _LOG_LINE ); FloatToStr( x_gyro, log_txt ); mikrobus_logWrite( "X-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); FloatToStr( y_gyro, log_txt ); mikrobus_logWrite( "Y-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); FloatToStr( z_gyro, log_txt ); mikrobus_logWrite( "Z-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "---------------------", _LOG_LINE ); c9dof2_acceleration_rate( &x_accel, &y_accel, &z_accel ); mikrobus_logWrite( "Acceleration rate: ", _LOG_LINE ); FloatToStr( x_accel, log_txt ); mikrobus_logWrite( "X-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); FloatToStr( y_accel, log_txt ); mikrobus_logWrite( "Y-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); FloatToStr( z_accel, log_txt ); mikrobus_logWrite( "Z-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "---------------------", _LOG_LINE ); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- SPI
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The 9DOF 2 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Software Support
We provide a library for the 9DOF 2 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enable the 9DOF 2 Click Board™. It initializes and defines the SPI bus driver and drivers that offer a plethora of settings. The library also offers functions that allow reading of accelerometer, gyroscope pressure and temperature, as well as generic read and write function that offers reading( and writing ) of different lengths of data to all available registers.
Key Functions
void c9dof2_angular_rate ( float *x_ang_rte, float *y_ang_rte, float *z_ang_rte );
- Function is used to calculate angular rate.void c9dof2_acceleration_rate ( float *x_accel_rte, float *y_accel_rte,float *z_accel_rte );
- Function is used to calculate acceleration rate.void c9dof2_def_settings ( );
- Function is used to apply the default settings to the device.
Example Description
The application is composed of three sections :
- System Initialization - Initializes SPI module, LOG and GPIO structures, sets INT pin as input and PWM as output.
- Application Initialization - Initializes SPI and device drivers, perform a safety check, applies default and writes an initial log.
- Application Task - (code snippet) Demonstrates use of 9DOF 2 click board by reading angular rate, acceleration rate and displaying data via USART terminal.
void application_task ( ) { c9dof2_angular_rate( &x_gyro, &y_gyro, &z_gyro ); mikrobus_logWrite( "Angular rate: ", _LOG_LINE ); FloatToStr( x_gyro, log_txt ); mikrobus_logWrite( "X-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); FloatToStr( y_gyro, log_txt ); mikrobus_logWrite( "Y-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); FloatToStr( z_gyro, log_txt ); mikrobus_logWrite( "Z-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "---------------------", _LOG_LINE ); c9dof2_acceleration_rate( &x_accel, &y_accel, &z_accel ); mikrobus_logWrite( "Acceleration rate: ", _LOG_LINE ); FloatToStr( x_accel, log_txt ); mikrobus_logWrite( "X-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); FloatToStr( y_accel, log_txt ); mikrobus_logWrite( "Y-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); FloatToStr( z_accel, log_txt ); mikrobus_logWrite( "Z-axis: ", _LOG_TEXT ); Ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "---------------------", _LOG_LINE ); Delay_ms( 1000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- SPI
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The 9DOF 2 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Tableau de clic 9DOF 2
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.