Zum Inhalt springen

WSAL24657 – BMM150 3-Axis Magnetometer Sensor/en

Aus JW Tech Wiki
Version vom 6. September 2026, 09:58 Uhr von JWTechPublisher (Diskussion | Beiträge) (Freigegebene technische Dokumentation veröffentlicht; Text-only und noindex)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

Concise technical introduction to the Waveshare BMM150 magnetometer module, covering specifications, interfaces, and example integrations for Raspberry Pi, Arduino, ESP32, and Pico.

Related products at JW Tech

Technical overview

  • The BMM150 is a 3-axis magnetometer with I2C (default) and SPI interfaces.
  • Operating voltage: 3.3 V or 5 V; the module includes an onboard voltage translator.
  • Resolution 0.3 μT; measurement range ±1300 μT (X/Y), ±2500 μT (Z).
  • Data rate in normal mode: 10 Hz.
  • Default I2C address 0x13; changeable via A0/A1 pads (addresses 0x10–0x13 depending on pad settings).
  • SPI mode is enabled by re-soldering the mode-selection pads in the upper-left corner.
  • Example code for Raspberry Pi, Arduino, ESP32, and Pico is available as a ZIP download.
  • For Arduino/ESP32 demos, set the USE_I2C macro definition to 1 for I2C or 0 for SPI.

Commands and examples – verify before use: 

sudo apt-get install wiringpi
wget https://project-downloads.drogon.net/wiringpi-latest.deb && sudo dpkg -i wiringpi-latest.deb
gpio -v
sudo raspi-config
sudo reboot
ls /dev/spi*
sudo apt-get update && sudo apt-get unzip
wget https://files.waveshare.com/upload/6/67/BMM150_3-Axis_Magnetometer_Sensor_code.zip && unzip BMM150_3-Axis_Magnetometer_Sensor_code.zip
cd BMM150_3-Axis_Magnetometer_Sensor_code/RaspberryPi/I2C && make clean && make && sudo ./bmm150
cd BMM150_3-Axis_Magnetometer_Sensor_code/RaspberryPi/SPI && make clean && make && sudo ./bmm150
cd RaspberryPi/python && sudo python get_geomagnetic_data.py
i2cdetect -y 1

Notes and version constraints

  • The exact I2C address depends on the A0/A1 pads; verify the correct address before testing.
  • Switching to SPI requires soldering the pads – this step needs soldering access.
  • Raspberry Pi 4B may require an updated wiringPi; version 2.52 is expected.
  • MicroPython firmware installation on Pico can be done offline if network issues occur.
  • If data does not display correctly: check wiring, communication method, and device address.

Source and revision record