LSM6DSOX 6-Axis IMU (U1)¶
Overview¶
U1 is an ST LSM6DSOXTR (LCSC C481766) — a 6-axis MEMS inertial measurement unit combining a 3-axis accelerometer and 3-axis gyroscope on the same die, plus an on-chip "machine learning core" that the firmware does not currently use. The chip provides the regulator's motion, vibration, and orientation information.
Marine alternator regulators have historically not bothered with motion sensing. Including one here lets the firmware do things that are otherwise impossible:
- Detect that the boat is heeled or pitching and gate certain charging decisions accordingly (a hard heel angle suggests a working sail, which is a useful signal for power-management strategy).
- Detect engine vibration to confirm the engine is actually running, independent of the alternator stator pulse train.
- Detect installation-time orientation to know which axis is "vertical" for future tilt-based features.
- Vibration-fingerprint specific failures (bearing wear, belt slap, mounting looseness) over time using the on-chip MLC.
Why the LSM6DSOX specifically¶
| Driver | Why this part |
|---|---|
| Combined accel + gyro | A single I²C address picks up everything we need; avoids a second part. |
| 3.3 V single-supply | No level shifters or analog supply needed. |
| Industrial temperature range (−40 °C to +85 °C) | Survives engine-room ambient. |
| Pin-compatible with LSM6DSO, future-proof against supply | If the OX variant goes EOL, the older DSO drops in. |
| On-chip ML core | Not used today; reserved for future vibration-classification features. |
| Low quiescent (≈ 0.55 mA in normal mode) | Acceptable on a continuous-on monitor. |
Pin Configuration¶
| Pin | Name | Net | Notes |
|---|---|---|---|
| 1 | SDO/SA0 | GND | I²C address bit 0 = 0 → 7-bit address 0x6A |
| 2 | SDX | GND | Auxiliary SPI interface — tied off, unused |
| 3 | SCX | GND | Auxiliary SPI interface — tied off, unused |
| 4 | INT1 | (unconnected) | Interrupt output — reserved for future use |
| 5 | VDDIO | 3V3 | I/O supply |
| 6, 7 | GND | GND | Ground |
| 8 | VDD | 3V3 | Core supply |
| 9 | INT2 | (unconnected) | Interrupt output — reserved for future use |
| 10 | OCS_AUX | (unconnected) | Aux interface chip select — unused (must be floating per datasheet) |
| 11 | SDO_AUX | (unconnected) | Aux interface data — unused |
| 12 | CS | 3V3 | Tied high — selects I²C mode (low would select SPI) |
| 13 | SCL | I2C_SCL | Shared I²C clock |
| 14 | SDA | I2C_SDA | Shared I²C data |
I²C Bus Membership¶
The LSM6DSOX shares the main I²C bus with two other devices:
| Address | Device | Function |
|---|---|---|
| 0x40 | INA228 (U20) | Battery shunt current + bus voltage |
| 0x6A | LSM6DSOX (U1) | 6-axis IMU |
| 0x76 | BMP388 (U14) | Pressure / temperature |
Bus pull-ups are provided once on the board (R92 / R93 = 2.2 kΩ each — see BMP388 doc for the rationale).
The bus runs at 400 kHz fast mode in firmware. The LSM6DSOX supports up to 1 MHz (high-speed mode), but moving from 400 kHz to 1 MHz would require characterizing the bus rise time with all three devices loaded and is not worth the firmware refactor for the IMU's data rate.
See
CLAUDE.md"I²C Clock at 800 kHz" memory note — the bus was experimentally run at 800 kHz during development with zero error counters but stays at 400 kHz in production for spec compliance.
Power & Decoupling¶
VDD (pin 8) and VDDIO (pin 5) are both supplied from the 3.3 V rail. Decoupling is standard: 100 nF × 2 on the supply pins, placed within 2 mm of the package. The chip's internal LDOs regulate the analog and digital sub-rails — no external analog supply is needed.
Address Selection¶
SDO/SA0 (pin 1) is grounded → 7-bit I²C address = 0x6A.
If a future revision needs a second LSM6DSOX (highly unlikely), pin 1 could be tied to VDDIO instead, giving 0x6B. Both addresses are reserved for the LSM6DSOX family by ST.
SPI Mode (Unused)¶
CS (pin 12) is tied to 3V3 to force I²C mode. If the firmware ever needs SPI for higher data-rate gyro sampling (e.g., 6 kHz ODR), CS could be re-routed to an ESP32 GPIO and the bus reorganized — this requires a board respin and is not currently planned.
Interrupt Outputs¶
INT1 (pin 4) and INT2 (pin 9) are routed as bare pads in the netlist but not connected in V9. They would normally be used for:
- INT1: data-ready, wake-on-motion, double-tap, free-fall, tilt
- INT2: same set, programmable to different events
Polling at firmware loop rate is adequate for the current feature set. If future work needs sub-millisecond wake-on-motion (e.g., crash detection), INT1 should be routed to an ESP32 GPIO in a later revision.
Auxiliary SPI Interface¶
SDX (pin 2), SCX (pin 3), OCS_AUX (pin 10), and SDO_AUX (pin 11) are the LSM6DSOX's optional secondary SPI interface for daisy-chaining external sensors (a magnetometer, typically). All four are tied off as per datasheet recommendation when unused — SDX and SCX to GND, OCS_AUX and SDO_AUX left floating.
Layout Considerations¶
- The LSM6DSOX should be mounted to the PCB itself, not on a flex pigtail. Mechanical compliance between the IMU and the structure being measured (the regulator → enclosure → bulkhead → engine bed) is what the sensor sees; any additional compliance washes out the signal.
- Orientation on the board is locked in firmware. The PCB silkscreen marks the +X axis to make assembly orientation unambiguous.
- The chip is sensitive to thermal gradients. Avoid placing high-dissipation devices (the LMR36510, the TPS48000 power MOSFETs) within 5 mm of the package. The V9 layout places U1 in a low-dissipation corner of the board.
Specifications Summary¶
| Parameter | Value | Source |
|---|---|---|
| Accelerometer range | ±2 / ±4 / ±8 / ±16 g (selectable) | datasheet |
| Accelerometer noise | 60 µg/√Hz | datasheet |
| Accelerometer ODR | 12.5 Hz – 6.66 kHz | datasheet |
| Gyroscope range | ±125 / ±250 / ±500 / ±1000 / ±2000 dps | datasheet |
| Gyroscope noise | 4 mdps/√Hz | datasheet |
| Gyroscope ODR | 12.5 Hz – 6.66 kHz | datasheet |
| Operating voltage | 1.71 V – 3.6 V | datasheet |
| Supply current (combined accel + gyro, normal mode) | ~0.55 mA at 3.3 V | datasheet |
| Operating temperature | −40 °C to +85 °C | datasheet |
| Package | 14-pin PQFN, 2.5 × 3 × 0.86 mm | datasheet |
See Also¶
- BMP388 / BMP390 Sensor — shares the I²C bus
- INA228 Battery Monitor — also shares the I²C bus
- ESP32-S3 Controller — I²C master pins (GPIO9 SDA / GPIO10 SCL)