3-Axis Accelerometer Module
Last updated: 15 October 2012
Prepared by Marco De Mutiis [marcodemutiis@gmail.com]
URL: http://www.parallax.com/Store/Sensors/AccelerationTilt/tabid/172/CategoryID/47/List/0/SortField/0/Level/a/ProductID/585/Default.aspx
Cost per unit: $29.99 USD (approx. 233 HKD)

General Information

About the 3-Axis Accelerometer
The Freescale Semiconductor MMA7455L 3-Axis Digital Output Accelerometer is a low power, micro machined sensor capable of measuring acceleration along its X, Y, and Z axes.
This device can be easily configured to detect quick motion pulses as single taps, double taps, and 0g (free fall) conditions on any or all axes.
(excerpted from product description page, accessed 12 October 2012).

Features & Specifications

  • § Wide supply voltage compatibility range.
  • § Selectable sensitivity: 8-bit mode (±2g/±4g/±8g) or 10-bit mode (±8g).
  • § User configurable interrupts (INT1/INT2).
  • § User settable registers to calibrate each axis.
  • § Compatible with virtually any microcontroller.
  • § On-board voltage regulators and I/O level shifters for added convenience.
  • § Low current operation.
  • § Compact, breadboard-friendly package: 0.5 inch x 0.6 inch (12.7 mm x 15.2 mm)

Getting it to work!


PIN1 [VIN] of the ACCELEROMETER connected to 3.3V on Arduino
PIN5 [GND] of the ACCELEROMETER connected to GND on Arduino
PIN7 [DATA] of the ACCELEROMETER connected to AnalogIn (A4 in example) on Arduino and to a 4.7 kOhm resistor to 3.3V on Arduino
PIN8 [CLK] of the ACCELEROMETER connected to AnalogIn (A5 in example) on Arduino and to a 4.7 kOhm resistor to 3.3V on Arduino

Example Code

The following example was made by Moritz Kemper, who developed a library for this sensor. The data from the sensor (X, Y and Z positions) will be printed to the Serial Port and will be visible in the Serial Monitor.
NOTE: You will need to download and install the MMA_7455 library before opening Arduino and running this sketch.
Library download link: http://code.google.com/p/mma-7455-arduino-library/downloads/list

Example which uses the MMA_7455 library

Moritz Kemper, IAD Physical Computing Lab


ZHdK, 20/11/2011

#include<Wire.h>Include the Wire library

Include the MMA_7455 library

MMA_7455 mySensor = MMA_7455();Make an instance of MMA_7455

char xVal, yVal, zVal;
Variables for the values from the sensor

void setup()



Set the sensitivity you want to use

2 = 2g, 4 = 4g, 8 = 8g


Calibrate the Offset, that values corespond in

flat position to: xVal = -30, yVal = -20, zVal = +20

!!!Activate this after having the first values read out!!!

mySensor.calibrateOffset(5, 20, -68);


void loop()


xVal = mySensor.readAxis('x');Read out the 'x' Axis

yVal = mySensor.readAxis('y');
Read out the 'y' Axis

zVal = mySensor.readAxis('z');//Read out the 'z' Axis

Serial.print(xVal, DEC);


Serial.print(yVal, DEC);


Serial.println(zVal, DEC);