Add two or more LSM6DSM+LIS2MDL+LPS22HB motion sensors on the same I2C busDesigned by Pesky Products in United States of America
What is it? This is a small (0.5 in x 0.6 in) breakout board for ST Microelectronics' latest state-of-the-art suite of MEMS sensors including the LSM6DSM combination accel/gyro with embedded sensor...Read More…
This is a small (0.5 in x 0.6 in) breakout board for ST Microelectronics' latest state-of-the-art suite of MEMS sensors including the LSM6DSM combination accel/gyro with embedded sensor hub, the LIS2MDL magnetometer, and the LPS22HB barometer/temperature sensor. This combination provides low-power (< 700 uA) motion sensing with 10 degrees of freedom (DoF) in a conveniently small breakout for use as a wearable motion sensor with any 3V3 microcontroller. I use this one for testing the boards. In this design we take advantage of the embedded LSM6DSM sensor hub to allow chaining of multiple boards on a single I2C bus.
There is a simple solder jumper on the back of the board connected to the LSM6DSM address pin. Default connects the middle address pad to 3V3 via a 5-mil-thick wire trace to set the I2C address to 0x6B. If you want to switch the address to the alternative 0x6A, just cut the 5-mil-thick trace with an exacto-knife and solder the other half of the solder jumper closed connecting the address pad to GND. This makes it easy to connect two of these boards to the same I2C bus without using any additional control wires.
If you want to have more than two of these boards on a single I2C bus this can be done also but is a little more cumbersome. You would have to cut the trace and solder a sixth wire to the middle address pad so that all of the three or more boards are set to address 0x6B except the one you want to configure or read data from. By toggling through the addresses one at a time you can chain as many of these boards as you like on a single I2C bus as long as the wire length or response latency doesn't become an issue.
The combination of LSM6DSM accel/gyro and LIS2MDL magnetometer can provide superb absolute orientation estimation. Their small size and ultra-low-power usage makes this suite a great choice for battery-powered, wearable applications. There are many wearable applications where use of two or more absolute orientation sensors is required (human and robot joint angle measurement, head/body tracking, gait analysis, etc) and it is convenient to have all of the motion sensors controlled via a single I2C bus to minimize the number of wires from the main board to the remote one(s).
The problem is that the LIS2MDL (my choice for the best 3-axis magnetometer currently available) has only one I2C address, just like the magnetometer on the now obsolete MPU9250. The solution is the same: have the LSM6DSM be master to an LIS2MDL (and LPS22HB for 10 DoF) slave sensor and read all of the sensor data directly from LSM6DSM registers.
The idea is that the LIS2MDL, which always has I2C address 0x1E, can be managed by the LSM6DSM so that multiple LSM6DSMs can be on the same host I2C bus and the magnetometers can be kept straight. The host only reads and writes to LSM6DSM registers, never talks with the LIS2MDL directly (except to configure in Setup) and, in effect, the LIS2MDL becomes part of an integrated 9 DoF LSM6DSM and all transactions can be performed by reference to the 0x6A or 0x6B I2C address of the master LSM6DSM. This avoids the conflict that would otherwise occur when two LIS2MDL are exposed directly to the MCU host on the host I2C bus since both LIS2MDL will always have the same I2C address.
In order to make this work, the LIS2MDL and LPS22HB have to be connected to the LSM6DSM master I2C bus. There is a passthrough mode which allows the host to configure the magnetometer and barometer directly but after configuration, the LSM6DSM takes over management of the slave sensors and the slave sensor data is automatically transferred into LSM6DSM registers for direct readout by the host microcontroller. One of two LSM6DSM interrupts is used to manage the magnetometer data ready signal leaving a single data-ready host interrupt, which is exposed on the board. So each board to be chained requires five connections to a main board: 3V3, GND, SDA, SCL, and INT. The magnetometer and barometer data flow is completely managed by the LSM6DSM master.
I have written well-commented Arduino sketches for the cases of 1) a single LSM6DSM master and 2) two LSM6DSM masters on the same I2C bus. The sketches are written for use of the STM32L476 Dragonfly development board but can be easily adapted for use with the Teensy or ESP32, etc.
This is a small, ultra-low-power 10 DoF motion sensor solution which in combination with computationally-efficient sensor fusion algorithms on the host MCU can provide absolute orientation estimation with 3 degree rms heading accuracy or better.
Furthermore, the hardware design allows simple chaining of two or more devices on a single I2C bus for straightforward, accurate joint angle measurement with just five wires from the main controller to the remote motion sensor board(s).
Low power sensors means longer battery life, more time between charging.
Five wires per board means lower impact on the wearer and easier deployment.
Assemble one yourself using the pcbs from OSH Park or buy the fully-assembled, tested, and commercially-fabricated boards from me and see how easy wearable motion sensing can be!
|Shipping Rate||Ships From||First item||Additional items|
United States Postal Service: Standard Ground Rate with tracking
United States Postal Service: Priority Mail with tracking
Priority mail for faster delivery only available within the US.
We recognize our top users by making them a Tindarian. Tindarians have access to secret & unreleased features.
We look for the most active & best members of the Tindie community, and invite them to join. There isn't a selection process or form to fill out. The only way to become a Tindarian is by being a nice & active member of the Tindie community!