# IMU Sensor Chip

The board contains the **LSM9DS1** sensor chip that provides the following functions:

* 3D Accelerometer
* 3D Gyroscope
* 3D Magnetometer
* Thermometer

In the moment software is using only the first 3 sensors. The thermometer is not used. Official documentation on the chip can be found here:

{% embed url="<https://www.digikey.com/htmldatasheets/production/1639232/0/0/1/LSM9DS1-Datasheet.pdf>" %}

This chip has a lot of registers inside. It is easy to get lost in them. So, here is the summary of all those registers:

<figure><img src="/files/H68WGBDUSrIwjU6ZIQpP" alt=""><figcaption><p>Registers summary</p></figcaption></figure>

The list is broken into multiple sub tables to simplify reading and understanding. The first 2 columns describe accelerometer and gyroscope, while the third column - magnetometer. You can see that magnetometer has its own registers numbering. This is because accelerometer + gyroscope comprise one i2c device while magnetometer is another i2C device. They have different i2c addresses while still reside in the same package. On the PCB they look like one chip.

The color coding on the table describes the purpose of the registers. This helps breaking registers into groups.

* Registers with white background are either a R/W configuration registers or a R/O status registers.
* Registers with light green background are all interrupt configuration registers or show the current status of interrupts. Since interrupts from this chip are not accessible on the CPU, the interrupts are not used in this project. So, documentation on all these registers can be skipped. They will not be discussed any further again.
* Registers with light orange background always return known constant value. They provide simple way to check that the chip on the other side of the i2C bus is responding.
* Registers with light blue background are data registers. Application gets sensor data from the chip by reading them.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://headtracker.gitbook.io/head-tracker/support/development/firmware/imu-sensor-chip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
