The LSM303DLHC combines a digital 3-axis accelerometer and 3-axis magnetometer into a single package that is ideal for making a tilt-compensated compass. The six independent readings, whose sensitivities can be set in the ranges of ±2 to ±16 g and ±1.3 to ±8.1 gauss, are available through an I²C interface. This LSM303 carrier board includes a 3.3 V voltage regulator and integrated level shifters that allows operation from 2.5 to 5.5 V, and the 0.1" pin spacing makes it easy to use with standard solderless breadboards and 0.1" perfboards.
This board is a compact (0.5″ × 0.8″) breakout board for ST’s LSM303DLHC 3-axis accelerometer and 3-axis magnetometer; we therefore recommend careful reading of the LSM303DLHC datasheet (629k pdf) before using this product. The LSM303DLHC is a great IC, but its small package makes it difficult for the typical student or hobbyist to use. It also operates at voltages below 3.6 V, which can make interfacing difficult for microcontrollers operating at 5 V. This carrier board addresses these issues by incorporating additional electronics, including a 3.3 V voltage regulator and level-shifting circuits, while keeping the overall size as compact as possible. The board ships fully populated with its SMD components, including the LSM303, as shown in the product picture.
Compared to the LSM303DLH and LSM303DLM used on our original compass and accelerometer carrier boards, the LSM303DLHC features improved magnetic sensing resolution and a wider acceleration measurement range (±2g to ±16g). This LSM303DLHC carrier is 0.1″ shorter than the earlier boards while remaining pin-compatible, although changes in I²C addresses and configuration registers mean that code written to interface with an LSM303DLH or LSM303DLM might need to be modified to work with an LSM303DLHC.
The LSM303 has many configurable options, including dynamically selectable sensitivities for the accelerometer and magnetometer, a choice of output data rates, and two independently-programmable external inertial interrupt pins. The magnetometer and accelerometer can be individually turned on and off to save power. The six independent magnetic and acceleration readings (sometimes called 6DOF) are available through an I²C/TWI interface and can be used for many applications, including making a tilt-compensated compass that can be used to determine headings regardless of how the board is inclined (ST provides an application note (1MB pdf) that explains the details of making one).
The carrier board includes a low-dropout linear voltage regulator that provides the 3.3 V required by the LSM303, which allows the sensor to be powered from a 2.5–5.5 V supply. The regulator output is available on the VDD pin and can supply almost 150 mA to external devices. The breakout board also includes a circuit that shifts the I²C clock and data lines to the same logic voltage level as the supplied VIN, making it simple to interface the board with 5 V systems, and the board’s 0.1″ pin spacing makes it easy to use with standard solderless breadboards and 0.1″ perfboards.
For sensor fusion applications, our MinIMU-9 v2 inertial measurement unit combines the LSM303DLHC with an L3GD20 3-axis gyro on a board the same size as this LSM303DLHC carrier, providing nine independent readings that can be used to calculate an absolute orientation.
- Dimensions: 0.5″ × 0.8″ × 0.1″ (13 × 20 × 3 mm)
- Weight without header pins: 0.6 g (0.02 oz)
- Operating voltage: 2.5 to 5.5 V
- Supply current: 10 mA
- Output format (I²C):
- Accelerometer: one 12-bit reading (left-justified) per axis
- Magnetometer: one 12-bit reading (right-justified) per axis
- Sensitivity range (configurable):
- Accelerometer: ±2, ±4, ±8, or ±16 g
- Magnetometer: ±1.3, ±1.9, ±2.5, ±4.0, ±4.7, ±5.6, or ±8.1 gauss
|VDD||3.3 V regulator output or low-voltage logic power supply, depending on VIN. When VIN is supplied and greater than 3.3 V, VDD is a regulated 3.3 V output that can supply up to approximately 150 mA to external components. Alternatively, when interfacing with a 2.5–3.3 V system, VIN can be left disconnected and power can be supplied directly to VDD.|
|VIN||This is the main 2.5–5.5 V power supply connection. The SCL and SDA level shifters pull the I²C bus high bits up to this level.|
|GND||The ground (0 V) connection for your power supply. Your I²C control source must also share a common ground with this board.|
|SCL||Level-shifted I²C clock line: HIGH is VIN, LOW is 0 V|
|SDA||Level-shifted I²C data line: HIGH is VIN, LOW is 0 V|
|DRDY||Magnetometer data ready indicator, a 3.3V-logic-level output. HIGH (3.3 V) indicates magnetometer data can be read. LOW (0 V) indicates the magnetometer is writing new data to the data registers. This output is not level-shifted.|
|INT1||Inertial interrupt 1, a 3.3V-logic-level output. This output is not level-shifted.|
|INT2||Inertial interrupt 2, a 3.3V-logic-level output. This output is not level-shifted.|