This breakout board makes it easy to use the tiny MMA8452Q accelerometer in your project. The MMA8452Q is a smart low-power, three-axis, capacitive MEMS accelerometer with 12 bits of resolution. This accelerometer is packed with embedded functions with flexible user programmable options, configurable to two interrupt pins. Embedded interrupt functions allow for overall power savings relieving the host processor from continuously polling data.
The MMA8452Q has user selectable full scales of ±2g/±4g/±8g with high pass filtered data as well as non filtered data available real-time. The device can be configured to generate inertial wake-up interrupt signals from any combination of the configurable embedded functions allowing the MMA8452Q to monitor events and remain in a low power mode during periods of inactivity.
This board breaks out the ground, power, I2C and two external interrupt pins.
Note: If you are looking for the SparkFun Triple Axis Accelerometer Breakout with headers, it can be found here or in the Recommended Products below.
The library was designed for the Arduino UNO development board so there can be some issues with libraries if you are trying to port it to another microcontroller. If you see this error output when trying to upload to an ESP8266 through the Arduino IDE, this is due to the fact that the MMA8452Q’s library is using a variable that is already used by the ESP8266 core:
Arduino: 1.6.4 (Windows 7), Board: "SparkFun ESP8266 Thing, 80 MHz, 115200, 4M (3M SPIFFS)" In file included from SparkFun_MMA8452Q_Basic.ino:34:0: C:\Users\bobby.chan\Documents\Arduino\libraries\SparkFun_MMA8452Q/SparkFun_MMA8452Q.h:32:11: error: 'STATUS' redeclared as different kind of symbol STATUS = 0x00, ^ In file included from C:\Users\bobby.chan\AppData\Roaming\Arduino15\packages\SparkFun\hardware\esp8266\1.6.4-673-g8cd3697/tools/sdk/include/ets_sys.h:11:0, from C:\Users\bobby.chan\AppData\Roaming\Arduino15\packages\SparkFun\hardware\esp8266\1.6.4-673-g8cd3697\cores\esp8266/pgmspace.h:9, from C:\Users\bobby.chan\AppData\Roaming\Arduino15\packages\SparkFun\hardware\esp8266\1.6.4-673-g8cd3697\cores\esp8266/WString.h:29, from C:\Users\bobby.chan\AppData\Roaming\Arduino15\packages\SparkFun\hardware\esp8266\1.6.4-673-g8cd3697\cores\esp8266/Print.h:26, from C:\Users\bobby.chan\AppData\Roaming\Arduino15\packages\SparkFun\hardware\esp8266\1.6.4-673-g8cd3697\cores\esp8266/Stream.h:26, from C:\Users\bobby.chan\AppData\Roaming\Arduino15\packages\SparkFun\hardware\esp8266\1.6.4-673-g8cd3697\libraries\Wire/Wire.h:28, from SparkFun_MMA8452Q_Basic.ino:33: C:\Users\bobby.chan\AppData\Roaming\Arduino15\packages\SparkFun\hardware\esp8266\1.6.4-673-g8cd3697/tools/sdk/include/c_types.h:58:3: error: previous declaration of 'typedef enum STATUS STATUS' } STATUS; ^ Error compiling.
Try modifying the MMA8452Q’s library by changing the variable name with a text editor by :
changing STATUS to STATUS_M in the file SparkFun_MMA8452Q.cpp on line 95
changing STATUS to STATUS_M in the file SparkFun_MMA8452Q.h on line 32
This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.
Skill Level: Noob - Some basic soldering is required, but it is limited to a just a few pins, basic through-hole soldering, and couple (if any) polarized components. A basic soldering iron is all you should need.
See all skill levels
If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.
Skill Level: Competent - The toolchain for programming is a bit more complex and will examples may not be explicitly provided for you. You will be required to have a fundamental knowledge of programming and be required to provide your own code. You may need to modify existing libraries or code to work with your specific hardware. Sensor and hardware interfaces will be SPI or I2C.
See all skill levels
If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.
Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels
Based on 8 ratings:
0 of 1 found this helpful:
First, Sparkfun is amazing ! I use a PICAXE 14M2. I found some helpful code on PICAXE FORUM. But my HI2CIN instruction does not bring in data from my accelerometer. I have had good luck with I2C protocol until I tried this device for use with my QUAD and also another device T5403 barometric pressure sensor. But I have not given up on these while I’m pursuing other approaches for my experimental QUAD. Note that I bypass RC and speak to QUAD directly from my micro-controller.
I love this device. I’m completing a security system within intrusion sensors based on this device, and I am quite impressed. There are many interrupt functions that allow this to be used in low-power battery applications. I’m currently using this with a Moteino, and when the circuit is asleep, the entire system consumes roughly 30uA! The accelerometer interrupts are what make this possible. For those interested, I’ve expanded on Sparkfun’s library here:
It’s a work in progress, but it now has code for using ALL of the interrupt functionality.
I found that setup was easy, and the I2C connection worked out-of-the-box, with the example program. I found it easy to incorporate into my project. 10 minutes soldering to add the pins 20 minutes of software learning inside the Arduino/Teensyduino environment Done.
Accelerometer works great!
Easy to find libs and code examples. Works as expected.
Received it in a timely fashion and it works great. Would not hesitate to buy anything else from SparkFun. Very satisfied.
I mounted this pin on a GPS shield with SD card recorder, then on to an Arduino Mega. The project measures how bumpy a tractor is, so we can go back in the spring and smooth out the rough spots.
It was working great, but then I accidentally dropped the enclosure everything was mounted in, and now it doesn’t work. The GPS, SD, and Mega all work fine, but when the call for accel.init(SCALE_8G, ODR_6); gets called, everything freezes.
At least they are cheap enough that I can replace it without too much worry.