Using an MMA7455 accelerometer with an ESP32 board

The MMA7455L is a Digital Output (I2C/SPI), low power, low profile capacitive micromachined accelerometer featuring signal conditioning, a low pass filter, temperature compensation, self-test, configurable to detect 0g through interrupt pins (INT1 or INT2), and pulse detect for quick motion detection. 0g offset and sensitivity are factory set and require no external devices. The 0g offset can be customer calibrated using assigned 0g registers and g-Select which allows for command selection for 3 acceleration ranges (2g/4g/8g). The MMA7455L includes a Standby Mode that makes it ideal for handheld battery powered electronics.

Using an MMA7455 accelerometer with an ESP32 board

Features

• Digital Output (I2C/SPI)
• 3mm x 5mm x 1mm LGA-14 Package
• Self-Test for Z-Axis
• Low Voltage Operation: 2.4 V – 3.6 V
• User Assigned Registers for Offset Calibration
• Programmable Threshold Interrupt Output
• Level Detection for Motion Recognition (Shock, Vibration, Freefall)
• Pulse Detection for Single or Double Pulse Recognition
• Sensitivity (64 LSB/g @ 2g and @ 8g in 10-Bit Mode)
• Selectable Sensitivity (±2g, ±4g, ±8g) for 8-bit Mode
• Robust Design, High Shocks Survivability (5,000g)
• RoHS Compliant
• Environmentally Preferred Product
• Low Cost

Typical Applications

• Cell Phone/PMP/PDA: Image Stability, Text Scroll, Motion Dialing, Tap to Mute
• HDD: Freefall Detection
• Laptop PC: Freefall Detection, Anti-Theft
• Pedometer
• Motion Sensing, Event Recorder

Here is a picture of a typical module

Here is how to wire the MMA7455 accelerometer to your ESP32 device

Schematic/Layout

Module LOLIN 32
VDD 3v3
Gnd Gnd
SDA SDA – 21
SCL SCL – 22

Code

You will need to grab a copy of the https://github.com/eklex/MMA_7455 library. Download and copy to your Arduino -> Libraries folder

This is one of the test examples

Output

Open the serial monitor window and you should see something like this

Read more: Using an MMA7455 accelerometer with an ESP32 board


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top