- Order number: MIKROE-1941
- Manufacturer product ID: MIKROE-1941
6DOF IMU click carries ST’s LSM6DS33TR 6-axis inertial measurement unit comprising a 3-axis gyroscope and a 3-axis accelerometer. The chip is a highly accurate 6 DOF inertial measurement unit with long-term stable operation over a wide range of temperatures. It is suitable for designing platform stabilization systems, for example in cameras and drones. The board communicates with the target MCU either through I2C or SPI interfaces (along with an additional INT pin).
Specification
Type | Motion |
Applications | Stabilization systems, HMI, drones, cameras |
On-board modules | Maxim’s MAX21105 6-axis inertial measurement unit |
Key Features | Gyroscope: full-scale range of ±250, ±500, ±1000, ±2000 dps. Accelerometer: full-scale range of ±2, ±4, ±8, ±16g. 512-byte FIFO buffer |
Key Benefits | High precision and reliability over wide temperature range |
Interface | I2C,SPI,GPIO |
Input Voltage | 3.3V |
Compatibility | mikroBUS |
Click board size | S (28.6 x 25.4 mm) |
Features and usage notes
The 6DOF IMU click currently in production is the second version of this board. Previously, the click board™ used a Maxim IC which became obsolete in the meantime. According to ST’s data sheet, their production process “leverages the robust and mature manufacturing processes already used for the production of micromachined accelerometers and gyroscopes”, which may explain the pin to pin compatibility with the IC on the previous version of the board. LSM6DS33 is also notable for its low power consumption, which can get down to 1.25 mA in high-performance mode, or 0.9 mA in normal mode.
Compared to the first version of the click, LSM6DS33 has a larger FIFO buffer (8 KB compared to 512 bytes), and different angular rate ranges: ±125/±245/±500/±1000/±2000 dps, compared to ±250, ±500, ±1000, ±2000 dps on the previous version of the board. The full scale range of the accelerometer is ±2/±4/±8/±16 g, same as on the previous version. Otherwise, the click board uses the same design and the same configuration of jumpers. COMM SEL will let you select between SPI and I2C interfaces, INT SEL is for switching between one of the two available interrupt lines, and ADDR SEL is for specifying the I2C address.
Programming
This example configures and demosntrates several interrupts (tap, double tap free fall and tilt).
1 #include2 #include "6dof_hw.h" 3 #include "6dof_hal.h" 4 #include "6dof_api.h" 5 6 void ExtInt() iv IVT_INT_EXTI15_10 ics ICS_AUTO { 7 EXTI_PR.B10 = 1; // clear flag 8 GPIOE_ODR = ~GPIOE_IDR; // Togle PORTE 9 } 10 11 void main() 12 { 13 GPIO_Digital_Input( &GPIOD_BASE, _GPIO_PINMASK_10 ); 14 GPIO_Digital_Output(&GPIOE_BASE, _GPIO_PINMASK_ALL); // Set PORTA as digital output 15 16 RCC_APB2ENR.AFIOEN = 1; // Enable clock for alternate pin functions 17 AFIO_EXTICR3 = 0x0300; // PD10 as External interrupt 18 EXTI_RTSR = 0x00000400; // Set interrupt on Rising edge 19 EXTI_IMR |= 0x00000400; // Set mask 20 NVIC_IntEnable(IVT_INT_EXTI15_10); // Enable External interrupt 21 22 EnableInterrupts(); // Enables the processor interrupt. 23 24 delay_ms(2000); 25 26 I2C1_Init_Advanced( 100000, &_GPIO_MODULE_I2C1_PB67 ); 27 delay_ms(200); 28 dof6_init ( 0x6B ); 29 delay_ms(1000); 30 delay_ms(1000); 31 GPIOA_ODR = ~GPIOA_ODR; 32 delay_ms(1000); 33 GPIOA_ODR = ~GPIOA_ODR; 34 delay_ms(1000); 35 GPIOA_ODR = ~GPIOA_ODR; 36 delay_ms(1000); 37 GPIOA_ODR = 0; 38 39 dof6_accel_configure(HZ_416, true,true, true, ACL_RANGE_2G); 40 dof6_gyro_configure(HZ_416, true,true, true, DPS_1000); 41 42 43 dof6_configure_double_tap_interrupt(1,true,12,3,3,15); 44 dof6_configure_free_fall_interrupt(1, true, 6,3); 45 dof6_configure_tilt_interrupt ( true, 1 ); 46 47 48 while(1) 49 {} 50 51 52 }