Overview

The BMA180 is a 14-bit 3-axis ultra-high performance digital MEMS accelerometer manufactured by Bosch Sensortec. Operating over I2CI^2C or SPI, it features ultra-low noise, high resolution (0.13 mg/LSB0.13\text{ mg/LSB} at ±1g\pm 1g), and seven programmable full-scale acceleration ranges (±1g,±1.5g,±2g,±3g,±4g,±8g,±16g\pm 1g, \pm 1.5g, \pm 2g, \pm 3g, \pm 4g, \pm 8g, \pm 16g).

Equipped with programmable low-pass filtering, self-test functions, an onboard temperature sensor, and interrupt generators for tap, slope, and orientation detection, the BMA180 was a staple component on early SparkFun and Adafruit high-precision motion sensing breakout boards.

Quick reference

Operating voltage (VCC)3.3 V to 5.0 V DC (breakout module with LDO)
IC supply voltage (VDD)1.62 V to 3.6 V DC (2.4 V nominal)
InterfaceI2CI^2C (up to 400 kHz) & 4-Wire SPI (up to 10 MHz)
Default I2CI^2C address0x40 (SDO pin Low / un-connected)
Alternate I2CI^2C address0x41 (SDO pin High to 3.3V)
Full-scale ranges±1g,±1.5g,±2g,±3g,±4g,±8g,±16g\pm 1g, \pm 1.5g, \pm 2g, \pm 3g, \pm 4g, \pm 8g, \pm 16g
Resolution14-bit 2's complement
Current draw650 μA650\ \mu\text{A} active / 0.1 μA0.1\ \mu\text{A} sleep

Pinout

Standard 8-pin 0.1" (2.54 mm) breakout module header:

PinNameTypeDescription
1VCCPowerSupply input (+3.3 V to +5.0 V DC)
2GNDPowerGround (0 V)
3SCK / SCLDigital InputI2CI^2C Clock / SPI Clock
4SDO / ADDRDigital OutputSPI Data Out / I2CI^2C Address Bit 0 (Low = 0x40, High = 0x41)
5SDI / SDADigital Input / OutputI2CI^2C Data / SPI Serial Data Input
6CSDigital InputSPI Chip Select (High = I2CI^2C mode, Low = SPI mode)
7INT / INT1Digital OutputProgrammable interrupt output line
8VIOPowerLogic Reference voltage (1.62V to 3.6V)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply Voltage (Module)VCCV_{CC}3.33.3 / 5.05.5VDC
Active Supply CurrentICCI_{CC}650950µAFull operation
Standby CurrentIsbI_{sb}0.11.0µASleep mode
Sensitivity (±1g\pm 1g)S1gS_{1g}8192LSB/g14-bit (0.13 mg/LSB0.13\text{ mg/LSB})
Sensitivity (±2g\pm 2g)S2gS_{2g}4096LSB/g14-bit (0.24 mg/LSB0.24\text{ mg/LSB})
Sensitivity (±16g\pm 16g)S16gS_{16g}512LSB/g14-bit (1.95 mg/LSB1.95\text{ mg/LSB})
Bandwidth CutofffBWf_{BW}101501200HzConfigurable digital low-pass filter

Register Map & Calibration

AddressRegisterAccessResetDescription
0x00CHIP_IDRead0x03Chip identification byte (returns 0x03)
0x020x07ACC_X/Y/ZRead14-bit 2's complement acceleration data (LSB bit 0 = 1 for NEW data)
0x08TEMPRead8-bit signed temperature reading (0.5C0.5^\circ\text{C} / LSB)
0x0DCTRL_REG0R/W0x00Control register 0 (EE_W enable bit 4 unlocks register writes)
0x20CTRL_REG3R/W0x00Full scale range (range bits 3–1: 000 = ±1g\pm 1g, 010 = ±2g\pm 2g)

Acceleration (g)=Raw 14-bit Signed ValueSensitivity (LSB/g)\text{Acceleration } (g) = \frac{\text{Raw 14-bit Signed Value}}{\text{Sensitivity (LSB/g)}}

Wiring

BMA180 PinArduino UnoESP32Notes
VCC5V / 3.3V3.3VModule includes 3.3V regulator
GNDGNDGNDSystem ground
SCLA5GPIO 22I2CI^2C Clock
SDAA4GPIO 21I2CI^2C Data
CS3.3V / 5V3.3VPull High for I2CI^2C mode

Example

cpp
#include <Wire.h>

#define BMA180_ADDR 0x40

void setup() {
  Serial.begin(9600);
  Wire.begin();

  // Unlock EEPROM write access in CTRL_REG0
  Wire.beginTransmission(BMA180_ADDR);
  Wire.write(0x0D);
  Wire.write(0x10); // EE_W bit set
  Wire.endTransmission();

  // Set Range to +/- 2g in CTRL_REG3
  Wire.beginTransmission(BMA180_ADDR);
  Wire.write(0x20);
  Wire.write(0x04); // range = 2g (bits 3:1 = 010)
  Wire.endTransmission();
}

void loop() {
  Wire.beginTransmission(BMA180_ADDR);
  Wire.write(0x02); // Read ACC_X LSB
  Wire.endTransmission();

  Wire.requestFrom(BMA180_ADDR, 6);
  if (Wire.available() >= 6) {
    int16_t x = (Wire.read() | (Wire.read() << 8)) >> 2;
    int16_t y = (Wire.read() | (Wire.read() << 8)) >> 2;
    int16_t z = (Wire.read() | (Wire.read() << 8)) >> 2;

    float gx = x / 4096.0;
    float gy = y / 4096.0;
    float gz = z / 4096.0;

    Serial.print("X: "); Serial.print(gx); Serial.print(" g\t");
    Serial.print("Y: "); Serial.print(gy); Serial.print(" g\t");
    Serial.print("Z: "); Serial.print(gz); Serial.println(" g");
  }

  delay(200);
}

Common mistakes

  • Forgetting to unlock EE_W bit before writing registers: Writing configuration registers without setting bit 4 of CTRL_REG0 (0x0D) results in register writes being ignored.
  • Not right-shifting 14-bit data by 2 bits: The 14-bit acceleration data is stored left-justified across 2 bytes. Bits 0–1 of the LSB byte contain status flags, so raw 16-bit readings must be bit-shifted right by 2 (>> 2).

Notes

  • BMA180 vs BMA280: The BMA180 has been largely superseded in newer designs by the Bosch BMA280 and BMA400 series.

Assets & downloads