With the total height of 0.7mm, the IIS2DLPC is well suited for using it in handheld or other space limited devices. Its powerful event detection engine is equipped with a set of features suitable for a wearable device, including free-fall, wakeup, highly configurable single/double-tap recognition, activity/inactivity, stationary/motion detection, portrait/landscape detection, and 6D/4D orientation. The sensor can use any of its two interrupt pins to report a detected event. Accel 13 click can be used for a rapid development and testing of various applications based on step counting, fitness applications, profile switching and display ON/OFF applications, angle measurement applications, and similar applications.
How does it work?
Accel 13 click is based on the IIS2DLPC, a high-performance ultra-low-power 3-axis accelerometer for industrial applications, from STMicroelectronics. This sensor has many features perfectly suited for wearables, handheld, and IoT applications, offering a good balance between the performance and the power consumption. One of its key features is its extremely low power consumption, which makes it perfectly suited for such applications. There are several power modes which the IIS2DLPC device can use. While in Low Power mode, the device consumes the least power, but the access to some features is restricted. More information can be found within the IIS2DLPC datasheet.
The IIS2DLPC sensor can measure acceleration within ranges of ±2 g, ±4 g, ±8, and ±16 g. It can output the measurement data using the Output Data Rate (ODR) from 1.6Hz (Low Power mode), up to 1600Hz (Performance mode). A high-precision analog front end facilitates highly sensitive MEMS, featuring a 14-bit A/D Converter. It allows very high accuracy of the output, even during very low amplitude changes. This makes the sensor particularly sensitive and accurate with movements that generate relatively low acceleration signals. However, using a highly sensitive MEMS makes the IIS2DLPC prone to damage caused by extremely high g-forces (10,000 g for less than 200 µs).
Acceleration data is available in 14-bit format from both the data registers and the internal FIFO buffe, which can can memorize 32 slots of X, Y and Z data. The FIFO buffer can be used for more complex calculations or timed readings, reducing the traffic on the communication interface. The interrupt engine facilitates the FIFO buffer, triggering an interrupt for two FIFO events: watermark event, and FIFO buffer full event. FIFO buffer allows optimization within the firmware that runs on the host MCU.
Besides the acceleration MEMS and complementary analog front-end circuit, the IIS2DLPC sensor also has an integrated temperature sensor. It is updated up to 25 times per second, and sampled to an 12-bit value (complement of 2’s format).
Interrupts can be triggered for many different events. Some basic events include the data-ready interrupt event and aforementioned FIFO events, while so-called feature engines can trigger an interrupt for any of the detected motion/movement events, including step detection/counter, activity recognition, tilt on wrist, tap/double tap, any/no motion, and error event interrupt. The extensive interrupt engine can use two programmable interrupt pins. Both of these pins can be assigned with any interrupt source and can be either LOW or HIGH on interrupt, depending on settings in appropriate registers. These two pins are routed to PWM and INT pin of the mikroBUS™, and are labeled as IT1 and IT2, respectively.
Accel 13 click offers two communication interfaces. It can be used with either I2C or SPI. The onboard SMD jumpers labeled as COMM SEL allow switching between the two interfaces. Note that all the jumpers have to be positioned either I2C or to SPI position. When I2C interface is selected, an additional SMD jumper labeled as ADDR SEL becomes available, determining the least significant bit of the IIS2DLPC I2C address. The Click board™ should be interfaced only with MCUs that use logic levels of 3.3V.
Specifications
Type
Acceleration,Motion
Applications
Accel 13 click can be used for a rapid development and testing of various applications based on step counting, fitness applications, profile switching and display ON/OFF applications, angle measurement applications, and similar applications.
On-board modules
IIS2DLPC, a 14-bit triaxial acceleration sensor with ultra-low power consumption, from STMicroelectronics.
Key Features
Free-fall detection, wakeup, highly configurable single/double-tap recognition, activity/inactivity, stationary/motion detection, portrait/landscape detection, and 6D/4D orientation, ultra-low power consumption, thermal readings
Interface
GPIO,I2C,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on Accel 13 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1,JP2,JP4 | COMM SEL | Right | Communication interface selection: right position SPI, left position I2C |
JP3 | ADDR SEL | Left | I2C address LSB selection: left position 0, right position 1 |
Accel 13 click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Receiver inputs voltage range | ±2 | – | ±16 | g |
Output refresh rate | 1.6 | – | 1600 | Hz |
Thermal measurement range | -40 | – | +85 | ˚C |
Software Support
We provide a library for the Accel13 Click 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 initializes and defines the I2C or SPI bus driver and drivers that offer a choice for writing data in registers and read data from registers. The library includes function for read X/Y/Z axis data and function for Tap detection interrupt. The user also has the function for start configuration chip for measurement and function for read interrupt state.
Key functions:
void accel13_startCtrlConfig()
– Start configuration modulevoid accel13_getAxisData(T_ACCEL13_AXIS *axis)
– Axis datavoid accel13_getTapStatus(T_ACCEL13_TAP *tapStatus)
– Get Tap status
Examples description
The application is composed of three sections :
- System Initialization – Initializes I2C or SPI module and sets necessary GPIO pins
- Application Initialization – Initializes driver init, Test communication, start configuration chip for measurement and reads Temperature
- Application Task – Reads Accelerometer data and detects tap on the axis
Note: The example is the basic functionality of the IIS2DLPC sensor, it is possible to read the acceleration data and detect Tap on all 3 axes. For other settings and improvements in reading accuracy, you need to further set up the registers and set the sensor to your conditions.
void applicationTask() { /* Reads Accel data */ accel13_getAxisData(&axis); mikrobus_logWrite("---- Accel axis data ----", _LOG_LINE); IntToStr(axis.x, demoText); mikrobus_logWrite("* X : ", _LOG_TEXT); mikrobus_logWrite(demoText, _LOG_LINE); IntToStr(axis.y, demoText); mikrobus_logWrite("* Y : ", _LOG_TEXT); mikrobus_logWrite(demoText, _LOG_LINE); IntToStr(axis.z, demoText); mikrobus_logWrite("* Z : ", _LOG_TEXT); mikrobus_logWrite(demoText, _LOG_LINE); mikrobus_logWrite("-------------------------", _LOG_LINE); Delay_ms( 300 ); /* Detections Tap on the axis */ accel13_getTapStatus(&tap); if(tap.tap_x == 0x01) { mikrobus_logWrite("---- Tap on the X axis ----", _LOG_LINE); } if(tap.tap_y == 0x01) { mikrobus_logWrite("---- Tap on the Y axis ----", _LOG_LINE); } if(tap.tap_z == 0x01) { mikrobus_logWrite("---- Tap on the Z axis ----", _LOG_LINE); } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C library
- SPI library
- UART library
- Conversions library
Additional notes and informations
Depending on the development board you are using, you may need 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
This 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.
For more information about mikroSDK, visit the official page.