Adafruit LIS2MDL Triple-axis Magnetometer Breakout Board

Adafruit LIS2MDL Triple-axis Magnetometer Breakout Board is based on the STM LIS2MDL, a great general purpose magnetometer. This sensor tends to be paired with a 6 Degree-of-Freedom (DoF) accelerometer/gyroscope to create a 9-DoF inertial measurement unit that can detect its orientation in real-space. The compact sensor uses I2C to communicate since it is very easy to use and users can also use SPI to receive data. The user can simply download the library and connect the SCL pin to the I2C clock pin and SDA pin to the I2C data pin. The Adafruit test program can be uploaded to readout magnetic field data. The LIS2MDL triple-axis magnetometer can sense ranges from ±50 gauss (±5000uTesla) with no range-setting required. For high resolution, a 100Hz update rate is recommended and with little loss of precision, the sensor can output at 150Hz.

The integrated LIS2MDL sensor onto a breakout PCB along with support circuitry helps the user to use with 3.3V (Feather/Raspberry Pi) or 5V (Arduino/Metro328) logic levels. The triple-axis magnetometer breakout board includes SparkFun Qwiic compatible STEMMA QT connectors for the I2C bus that avoids soldering. The CircuitPython/Python or Arduino drivers can be used easily to interface with the LIS2MDL and get magnetic measurements by using MCU.


  • Fixed I2C address 0x1E or SPI data mode
  • ±50 gauss magnetic fixed full scale
  • Maximum 150Hz update rate
  • Continuous and single-conversion modes
  • 16-bit data output
  • Interrupt data pin in I2C mode
  • Self-test mode
  • RoHS 2 compliant


Published: 2020-04-16 | Updated: 2022-03-10