Summary of Using an MMA7455 accelerometer with an ESP32 board
The MMA7455L is a low-power, digital-output capacitive accelerometer ideal for motion detection in battery-powered devices like smartphones and laptops. It supports I2C/SPI communication, offers selectable acceleration ranges, and includes features like self-test and interrupt pins for shock or pulse detection. The article details its integration with an ESP32 board using specific wiring connections and a dedicated Arduino library to enable functionality such as freefall detection and motion sensing.
Parts used in the MMA7455 Accelerometer Project:
- MMA7455 Accelerometer Module
- LOLIN 32 (ESP32) Board
- VDD Power Supply (3v3)
- Gnd Ground Connection
- SDA Data Line (Pin 21)
- SCL Clock Line (Pin 22)
- MMA_7455 Library from GitHub
- Serial Monitor Window
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.

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
-
What are the power supply requirements for the MMA7455L?
The device operates at low voltage levels ranging from 2.4 V to 3.6 V. -
How do you wire the SDA pin of the MMA7455 to an ESP32?
The SDA pin connects to GPIO 21 on the ESP32 board. -
Can the MMA7455L detect freefall events?
Yes, it includes level detection features specifically for recognizing freefall, shock, and vibration. -
Which library is required to use the MMA7455 with Arduino?
You need to download and install the MMA_7455 library from the eklex GitHub repository. -
What communication protocols does the MMA7455L support?
The sensor features digital output compatible with both I2C and SPI interfaces. -
Is the zero-g offset factory set for the MMA7455L?
Yes, the 0g offset and sensitivity are factory set and require no external calibration devices. -
What package size does the MMA7455L come in?
The device is available in a compact 3mm x 5mm x 1mm LGA-14 Package. -
Does the MMA7455L have a self-test feature?
Yes, it includes a self-test function specifically for the Z-Axis.
