How to Connect Sensors via I²C for STMicroelectronics’ X-NUCLEO-IKS4A1 Expansion Board
The X-NUCLEO-IKS4A1 expansion board supports sensor connection through two I²C modes:
- Standard I²C Bus Connection
- Hierarchical Bus Architecture
1. Standard I²C Bus Connection
Connection Logic: All sensors (including inertial and environmental sensors) are connected to the external STM32 Nucleo board via the same I²C bus (uC_I²C
).
Pin Configuration:
- J4: Pins 1-2 and 11-12 define
STM_SDA = SENS_SDA
(data pin),HUB_SDx = GND
(hub data pin grounded). - J5: Pins 1-2 and 11-12 define
STM_SCL = SENS_SCL
(clock pin),HUB_SCx = GND
(hub clock pin grounded).
Application Scenario: Suitable for simple sensor data acquisition where all devices share the main I²C bus without complex bus management.
2. Hierarchical Bus Architecture
Example: Using LSM6DSO16IS as the I²C Sensor Hub
- Main Bus (
uC_I²C
): Directly connects LSM6DSV16X (6-axis IMU), LIS2DUXS12 (3-axis accelerometer), and SHT40AD1B (humidity/temperature sensor) to communicate with the STM32 Nucleo’s MCU for core inertial/humidity-temperature data transmission. - Auxiliary Bus (
SENS_I²C
): Controlled by LSM6DSO16IS (sensor hub), connecting LPS22DF (pressure), LIS2MDL (magnetometer), STTS22H (temperature), and the DIL24 socket (for external sensors like IR sensors) to enable 6-axis IMU functionality and environmental data acquisition.
Pin Configuration:
- J4: Pins 7-8 define
HUB2_SDx = SENS_SDA
(auxiliary bus data pin). - J5: Pins 7-8 define
HUB2_SCx = SENS_SCL
(auxiliary bus clock pin).
Features: Hierarchical management via the hub improves multi-sensor data processing efficiency and supports external sensor expansion, suitable for complex IoT/environmental monitoring applications (e.g., simultaneous acquisition of inertial, humidity-temperature, pressure, and magnetic field data).
Key Onboard Sensors Overview
LSM6DSO16IS
- System-in-package (SiP) with a 3-axis digital accelerometer and 3-axis digital gyroscope.
- Accelerometer full scales: ±2/±4/±8/±16 g (programmable).
- Gyroscope full scales: ±125/±250/±500/±1000/±2000 dps (programmable).
- Embedded ISPU: Ultra low power high performance programmable core for edge signal processing and AI algorithms.
- Power consumption: 0.59 mA in high-performance mode, 0.46 mA in low-power mode (gyro + accelerometer only, no ISPU).
- Interface: SPI/I²C serial interface.
- Voltage: Analog 1.71 V–3.6 V, independent IO 1.62 V.
LIS2MDL
- Ultra low power, high performance 3-axis digital magnetometer with I²C/SPI interfaces.
- Magnetic field range: ±50 Gauss.
- Resolution: 16-bit data output.
- Voltage: 1.71 V–3.6 V.
LIS2DUXS12
- Digital smart 3-axis linear accelerometer with MEMS and ASIC designed for ultra-low current consumption.
- Features: Embedded temperature sensor, FIFO (up to 512 samples at high resolution), high-speed I²C/SPI/MIPI I3C® interface.
- Full scales: ±2/±4/±8/±16 g (programmable).
- Output data rate: 1.6 Hz–800 Hz.
LPS22DF
- Ultra-compact piezoresistive absolute pressure sensor (digital barometer).
- Pressure range: 260–1260 hPa.
- Current consumption: As low as 1.7 µA.
- Interface: SPI/I²C/MIPI I3CSM.
SHT40AD1B
- Digital humidity and temperature sensor.
- Accuracy: ±1.8%RH (humidity), ±0.2°C (temperature).
- Voltage: 1.08 V–3.6 V.
- Interface: I²C.
LSM6DSV16X
-
SiP with 3D accelerometer and gyroscope (tri-core architecture for independent processing of acceleration/angular velocity data).
-
Features: Embedded machine learning core, Qvar electrostatic sensor, Android-compatible.
-
Full scales: Accelerometer ±2/±4/±8/±16 g; gyroscope ±125/±250/±500/±1000/±2000/±4000 dps.
-
Interface: SPI/I²C/MIPI I3C® v1.1, auxiliary SPI for gyroscope/accelerometer data output.
More content:
More content related to the X-NUCLEO-IKS4A1:
- What hardware does STMicroelectronics’ X-NUCLEO-IKS4A1 expansion board have?
- Hardware and System Requirements for STMicroelectronics’ X-NUCLEO-IKS4A1 Expansion Board
- How to Get Started Quickly with STMicroelectronics’ X-NUCLEO-IKS4A1 Expansion Board
- How to Connect Sensors via I²C for STMicroelectronics’ X-NUCLEO-IKS4A1 Expansion Board
- How to Measure Current Consumption of Sensors on STMicroelectronics’ X-NUCLEO-IKS4A1 Expansion Board
Related product:
- STMicroelectronics Expansion Board X-NUCLEO-IKS4A1: A motion MEMS and environmental sensor evaluation board kit. This expansion board supports testing the functions of motion MEMS accelerometers, gyroscopes, magnetometers, as well as environmental humidity, temperature, and pressure sensors via the I²C bus. It also enables comprehensive testing of all functions of LSM6DSO16IS and LSM6DSV16X, Qvar touch slide gestures, and connection to the STHS34PF80 infrared sensor for presence detection.