Overview

Driver for Bosch Sensortec BMA150 3-axis accelerometer.

This driver assumes that the BMA150 will always runs with the shadow registers enabled, i.e. that the shadow_dis bit in the second configuration register is zero. If you wish to run with the shadow registers disabled, you will need to write your own replacement driver.

Note that this also works for an SMB380 accelerometer which has the same register interface as the BMA150.

BMA150 Resources

Web page

http://www.bosch-sensortec.com/homepage/products_3/3_axis_sensors/acceleration_sensors/bma150_4/bma150

Datasheet

http://ae-bst.resource.bosch.com/media/products/dokumente/bma150/bst-bma150-ds000-07.pdf

Test hardware

This code has been tested using an Atmel ATAVRSBIN Inertial One Xplain board:

http://store.atmel.com/PartDetail.aspx?q=p:10500250#tc:description

The module was wire-wrapped on a prototyping shield and installed on a SolderCore:

http://soldercore.com/products/soldercore/

Specification
Parameter Supported settings
Bandwidth (Hz) 25, 50, 100, 190, 375, 750, 1500
Range (g) ±2, ±4, ±8
Communication up to 400 kHz (I2C) and 10 MHz (SPI)

SMB380 Resources

Datasheet

http://www.olimex.com/dev/pdf/OTHER/BMA150_Preliminary_Datasheet_Rev13_20070918.pdf

Test hardware

This code has been tested using an Olimex MOD-SMB380:

http://www.olimex.com/Products/Modules/Accel/MOD-SMB380/

This is plugged into a custom CoreProto rivet and plugged into a SenseCore:

http://soldercore.com/products/sensecore/

And finally installed on a SolderCore:

http://soldercore.com/products/soldercore/

API Summary

Macros
BMA150_I2C_ADDR BMA150 8-bit I2C address
Functions
bma150_initialize_i2c Initialize sensor on I2C bus
bma150_initialize_spi Initialize sensor on SPI bus
bma150_read_chip_id Read chip ID register
bma150_read_die_temperature Read temperature
bma150_soft_reset Soft-reset the sensor