How does it work?
Smart Sens 2 Click as its foundation uses the BHI260AP, BME688, BMP390, and BMM150, a low-power programmable smart sensor, environmental and pressure sensor, and a magnetometer from Bosch Sensortec. The BHI260AP is based on the 32-bit microcontroller (Fuser2), mainly intended as a co-processor offloading the main CPU from any sensor data processing-related tasks, in this case, data from several onboard sensors. It integrates the Inertial Measurement Unit (6DoF IMU) and Event-Driven Software Framework, making the BHI260AP a complete sensor subsystem and computing platform for always-on sensor data processing algorithms at the lowest power consumption.
The BMM150 is a geomagnetic sensor that allows measurements of the magnetic field in three perpendicular axes. An application-specific circuit (ASIC) converts the output of the geomagnetic sensor to digital results, which are then sent to the BHI260AP for signal processing over an auxiliary digital I2C interface. In the same way, both BME688 and BMP390 send their data for further processing via the I2C interface to the BHI260AP. The BME688 detects volatile organic (VOCs), sulfur compounds (VSCs), and other gases such as carbon monoxide and hydrogen in the ppb range, while the BMP390 performs pressure and temperature measurements.
Smart Sens 2 Click allows using both I2C and SPI interfaces to communicate with the MCU. The selection can be made by positioning SMD jumpers labeled as COMM SEL in an appropriate position. Note that all the jumpers’ positions must be on the same side, or the Click board™ may become unresponsive. While the I2C interface is selected, the BHI260AP allows choosing the least significant bit (LSB) of its I2C slave address using the SMD jumper labeled ADDR SEL. In addition to interface pins, this Click board™ also uses a Reset pin, RST pin on the mikroBUS™ socket, and INT pin of the mikroBUS™ socket, which indicates the data transfer request from the BHI260AP to the MCU alongside a red LED for event interrupt indication.
Since all onboard sensors for operation require a 1.8V voltage to work accurately, a small regulating LDO is used, the AP2112, providing a 1.8V out of mikroBUS™ power rails. That’s why voltage-level translators are also featured, the TXB0106 and PCA9306. The interface bus lines are routed to the dual bidirectional voltage-level translators, allowing this Click board™ to work with both 3.3V and 5V MCUs properly.
In addition, an onboard BOOT switch is used to select whether the host interface shall be used (HOST position) or whether the BHI260AP shall attempt to boot from an onboard QSPI Flash memory, the W25Q32JW, and run in a Standalone operation mode (QSPI position). Besides, on the right side of this Click board™, an additional unpopulated header marked as JTAG is reserved for debugging purposes available through the JTAG interface pins (TCK and TMS).
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VIO SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Environmental,Motion
Applications
Can be used for always-on sensor data processing algorithms at the lowest power consumption
On-board modules
BHI260AP – Programmable smart sensor from Bosch Sensortec
BME688 – Environmental sensor from Bosch Sensortec
BMP390 – Pressure sensor from Bosch Sensortec
BMM150 – Magnetometer from Bosch Sensortec
Key Features
Smart sensor hub with integrated IMU sensor, onboard magnetometer, environmental and pressure sensor, boot mode selection, selectable communication, event interrupt indication, JTAG debugging, and more
Interface
I2C,SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Smart Sens 2 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 |
LD2 | LD2 | – | Event Interrupt LED Indicator |
JP1 | VIO SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2-JP5 | COMM SEL | Lower | Communication Interface Selection SPI/I2C: Lower position SPI, Upper position I2C |
JP6 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
J1 | JTAG | Unpopulated | JTAG Debug Interface Header |
T1 | BOOT SEL | Right | Boot Mode Selection Switch HOST/QSPI: Left position HOST, Right position QSPI |
Smart Sens 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
BHI260AP Acceleration Range | ±2 | – | ±16 | g |
BHI260AP Accelerometer Resolution | – | 16 | – | bit |
BHI260AP Accelerometer Sensitivity | 16384 | – | 2048 | LSB/g |
BHI260AP Gyroscope Range | 125 | – | 2000 | °/s |
BHI260AP Gyroscope Resolution | – | 16 | – | bits |
BHI260AP Gyroscope Sensitivity | 16.4 | – | 262.4 | LSB/°/s/ |
BME688 Environmental Operational Range | 10 | – | 95 | %r.H. |
BMP390 Pressure Operational Range | 300 | – | 1100 | hPa |
BMP390 Pressure Accuracy | – | ±50 | – | Pa |
BMM150 Magnetometer Range (X, Y) | – | ±1.3 | – | mT |
BMM150 Magnetometer Range (Z) | – | ±2.5 | – | mT |
BMM150 Magnetometer Resolution | – | 13 | – | bit |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the Smart Sens 2 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Smart Sens 2 Click driver.
Key functions
-
smartsens2_register_fifo_parse_callback
Function to link a callback and relevant reference when the sensor event is available in the FIFO. -
smartsens2_set_virt_sensor_cfg
Function to set the sample rate and latency of the virtual sensor. -
smartsens2_get_and_process_fifo
Function to get and process the FIFOs.
Example Description
This example showcases the ability of the Smart Sens 2 Click board™. It has multiple examples that you can easily select with the defines at the top of the main. There are 9 examples: Euler, Quaternion, Vector (Accelerometer, Gyroscope, Magnetometer), and Environmental (Temperature, Barometer, Humidity, Gas).
void application_task ( void )
{
/* Check interrupt and get and process fifo buffer */
if ( smartsens2_get_interrupt( &smartsens2 ) )
{
/* Data from the FIFO is read and the relevant callbacks if registered are called */
if ( smartsens2_get_and_process_fifo( &smartsens2, work_buffer, WORK_BUFFER_SIZE ) )
{
log_error( &logger, " Get and process fifo." );
for ( ; ; );
}
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.SmartSens2
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. UART terminal is available in all MikroElektronika compilers.
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.