Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use MPL3115A2: Examples, Pinouts, and Specs

Image of MPL3115A2
Cirkit Designer LogoDesign with MPL3115A2 in Cirkit Designer

Introduction

The MPL3115A2 is a digital barometer and altimeter sensor designed to provide highly accurate pressure and altitude measurements. It communicates via the I2C interface, making it easy to integrate into a variety of microcontroller-based projects. This sensor is widely used in applications such as weather stations, mobile devices, GPS systems, and altitude tracking for drones and robotics.

Key features of the MPL3115A2 include:

  • High-resolution pressure sensing (up to 1 Pa resolution).
  • Altitude measurement with a resolution of 0.3 meters.
  • Built-in temperature sensor for compensation and additional data.

Explore Projects Built with MPL3115A2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Raspberry Pi Pico GPS Tracker with Sensor Integration
Image of Copy of CanSet v1: A project utilizing MPL3115A2 in a practical application
This circuit is a data acquisition and communication system powered by a LiPoly battery and managed by a Raspberry Pi Pico. It includes sensors (BMP280, MPU9250) for environmental data, a GPS module for location tracking, an SD card for data storage, and a WLR089-CanSAT for wireless communication. The TP4056 module handles battery charging, and a toggle switch controls power distribution.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
Image of Pulsefex: A project utilizing MPL3115A2 in a practical application
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Pro Mini and HC-05 Bluetooth Controlled Coreless Motor Clock with MPU-6050 Feedback
Image of drone: A project utilizing MPL3115A2 in a practical application
This is a motion-controlled device with wireless capabilities, powered by a LiPo battery with voltage regulation. It uses an Arduino Pro Mini to process MPU-6050 sensor data and control coreless motors via MOSFETs, interfacing with an external device through an HC-05 Bluetooth module.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Powered Wi-Fi Controlled Robotic Car with OLED Display and Ultrasonic Sensor
Image of playbot: A project utilizing MPL3115A2 in a practical application
This circuit is a battery-powered system featuring an ESP32 microcontroller that controls an OLED display, a motor driver for two hobby motors, an ultrasonic sensor for distance measurement, and a DFPlayer Mini for audio output through a loudspeaker. The TP4056 module manages battery charging, and a step-up boost converter provides a stable 5V supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with MPL3115A2

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Copy of CanSet v1: A project utilizing MPL3115A2 in a practical application
Battery-Powered Raspberry Pi Pico GPS Tracker with Sensor Integration
This circuit is a data acquisition and communication system powered by a LiPoly battery and managed by a Raspberry Pi Pico. It includes sensors (BMP280, MPU9250) for environmental data, a GPS module for location tracking, an SD card for data storage, and a WLR089-CanSAT for wireless communication. The TP4056 module handles battery charging, and a toggle switch controls power distribution.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Pulsefex: A project utilizing MPL3115A2 in a practical application
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of drone: A project utilizing MPL3115A2 in a practical application
Arduino Pro Mini and HC-05 Bluetooth Controlled Coreless Motor Clock with MPU-6050 Feedback
This is a motion-controlled device with wireless capabilities, powered by a LiPo battery with voltage regulation. It uses an Arduino Pro Mini to process MPU-6050 sensor data and control coreless motors via MOSFETs, interfacing with an external device through an HC-05 Bluetooth module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of playbot: A project utilizing MPL3115A2 in a practical application
ESP32-Powered Wi-Fi Controlled Robotic Car with OLED Display and Ultrasonic Sensor
This circuit is a battery-powered system featuring an ESP32 microcontroller that controls an OLED display, a motor driver for two hobby motors, an ultrasonic sensor for distance measurement, and a DFPlayer Mini for audio output through a loudspeaker. The TP4056 module manages battery charging, and a step-up boost converter provides a stable 5V supply to the components.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

The following table outlines the key technical details of the MPL3115A2:

Parameter Value
Operating Voltage 1.95V to 3.6V
Communication Protocol I2C (7-bit address: 0x60)
Pressure Range 20 kPa to 110 kPa
Pressure Resolution 1 Pa
Altitude Resolution 0.3 meters
Temperature Range -40°C to +85°C
Temperature Resolution 0.1°C
Current Consumption 2 µA (standby), 40 µA (active)
Dimensions 3 mm x 5 mm x 1.1 mm

Pin Configuration

The MPL3115A2 has six pins, as described in the table below:

Pin Name Pin Number Description
VDD 1 Power supply input (1.95V to 3.6V).
GND 2 Ground connection.
SDA 3 I2C data line.
SCL 4 I2C clock line.
INT1 5 Interrupt output 1 (optional, configurable).
INT2 6 Interrupt output 2 (optional, configurable).

Usage Instructions

Connecting the MPL3115A2 to an Arduino UNO

To use the MPL3115A2 with an Arduino UNO, follow these steps:

  1. Connect the VDD pin of the sensor to the 3.3V pin on the Arduino.
  2. Connect the GND pin of the sensor to the GND pin on the Arduino.
  3. Connect the SDA pin of the sensor to the A4 pin on the Arduino (I2C data line).
  4. Connect the SCL pin of the sensor to the A5 pin on the Arduino (I2C clock line).

Sample Arduino Code

Below is an example Arduino sketch to read pressure, altitude, and temperature data from the MPL3115A2 using the Adafruit MPL3115A2 library:

#include <Wire.h>
#include <Adafruit_MPL3115A2.h>

// Create an instance of the MPL3115A2 sensor
Adafruit_MPL3115A2 mpl = Adafruit_MPL3115A2();

void setup() {
  Serial.begin(9600); // Initialize serial communication
  Serial.println("MPL3115A2 Sensor Test");

  // Initialize the sensor
  if (!mpl.begin()) {
    Serial.println("Could not find MPL3115A2 sensor. Check wiring!");
    while (1); // Halt execution if sensor is not found
  }

  // Set the sensor to barometer mode
  mpl.setModeBarometer();
  Serial.println("Sensor initialized successfully.");
}

void loop() {
  // Read pressure in Pascals
  float pressure = mpl.getPressure();
  Serial.print("Pressure: ");
  Serial.print(pressure);
  Serial.println(" Pa");

  // Read altitude in meters
  float altitude = mpl.getAltitude();
  Serial.print("Altitude: ");
  Serial.print(altitude);
  Serial.println(" m");

  // Read temperature in Celsius
  float temperature = mpl.getTemperature();
  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" °C");

  delay(1000); // Wait 1 second before the next reading
}

Important Considerations

  • The MPL3115A2 operates at 3.3V logic levels. If using a 5V microcontroller, use a level shifter for the I2C lines.
  • Ensure pull-up resistors (typically 4.7 kΩ) are connected to the SDA and SCL lines if they are not already included on the breakout board.
  • The sensor has two modes: barometer mode (for pressure readings) and altimeter mode (for altitude readings). Configure the mode based on your application.

Troubleshooting and FAQs

Common Issues

  1. Sensor not detected by the microcontroller:

    • Verify the I2C connections (SDA and SCL).
    • Ensure the sensor is powered with the correct voltage (3.3V).
    • Check the I2C address (default is 0x60).
  2. Incorrect or fluctuating readings:

    • Ensure the sensor is in a stable environment without rapid temperature or pressure changes.
    • Verify that the sensor is properly configured for the desired mode (barometer or altimeter).
  3. No data output in the serial monitor:

    • Confirm that the correct baud rate (9600) is selected in the Arduino IDE.
    • Check for any loose or incorrect wiring.

FAQs

Q: Can the MPL3115A2 measure altitude indoors?
A: The sensor calculates altitude based on pressure readings, which can be affected by indoor air conditioning or ventilation systems. For accurate altitude measurements, use the sensor in an open environment.

Q: What is the maximum altitude the MPL3115A2 can measure?
A: The sensor can measure altitudes up to approximately 10,000 meters (32,808 feet).

Q: Can I use the MPL3115A2 with a 5V microcontroller?
A: Yes, but you must use a logic level shifter for the I2C lines to prevent damage to the sensor, as it operates at 3.3V logic levels.

Q: How do I switch between barometer and altimeter modes?
A: Use the setModeBarometer() or setModeAltimeter() functions provided by the Adafruit MPL3115A2 library to switch modes.

By following this documentation, you can effectively integrate the MPL3115A2 sensor into your projects for accurate pressure, altitude, and temperature measurements.