Contents
- 1 Introduction
- 2 Key Features
- 3 How It Works
- 4 PCB Manufacturer
- 5 Key Components
- 6 Comparison with Other Sensors
- 7 Manufacturing Files
- 8 PCB Files
- 9 Order Directly from PCB WAY
- 10 Applications
- 11 Advantages
- 12 Arduino and MPL3115A2
- 13 Components Required
- 14 Wiring Diagram (MPL3115A2 to Arduino)
- 15 Arduino Code for MPL3115A2
- 16 Conclusion
Introduction
The MPL3115A2 is a highly accurate, low-power digital barometric pressure sensor from NXP Semiconductors. It is designed to measure barometric pressure, altitude, and temperature, making it a versatile sensor for a wide range of applications, including weather stations, drones, altimeters, and indoor navigation systems.

Key Features
- Pressure Measurement:
- Range: 20 kPa to 110 kPa.
- Resolution: 0.1 Pa (Pascals).
- Accuracy: ±0.4 kPa (typical).
- Altitude Measurement:
- Range: -698 m to 11,775 m (relative to sea level).
- Resolution: 0.3 m (meters).
- Temperature Measurement:
- Range: -40°C to +85°C.
- Resolution: 0.1°C.
- Interface:
- I2C (up to 400 kHz) or SPI for communication.
- I2C address: 0x60 (default).
- Power Supply:
- Operating voltage: 1.95V to 3.6V.
- Low power consumption: Ideal for battery-powered devices.
- Package:
- Small 8-pin DFN (Dual Flat No-leads) package (3 mm x 5 mm x 1.1 mm).
How It Works
The MPL3115A2 uses a MEMS (Micro-Electro-Mechanical Systems) piezoresistive sensor to measure atmospheric pressure. The pressure data is then converted into altitude using the International Barometric Formula. The sensor also includes an integrated temperature sensor for compensation and standalone temperature measurements.
PCB Manufacturer
PCBWAY is a highly skilled company specializing in PCB manufacturing. They offer their services at incredibly low prices, such as providing 10 PCBs for only $5. Additionally, new members receive a $5 bonus. The website allows customers to upload their Gerber Files and place orders.

PCBWAY is known for producing PCBs of exceptional quality and maintaining high standards, which is why many people trust them for their PCB and PCBA needs.
Below are some of my PCB’S manufactured by PCBWAY and I am fully satisfied by their Quality of service they provide.
Key Components
- Pressure Sensor: Measures absolute pressure.
- ADC (Analog-to-Digital Converter): Converts analog pressure and temperature data into digital values.
- Digital Signal Processor (DSP): Processes the data and provides altitude, pressure, and temperature readings.
- I2C/SPI Interface: Communicates with microcontrollers or other devices.
Comparison with Other Sensors
Feature | MPL3115A2 | BMP180 | BMP280 | MS5611 |
---|---|---|---|---|
Pressure Range | 20–110 kPa | 30–110 kPa | 30–110 kPa | 10–120 kPa |
Altitude Resolution | 0.3 m | 0.17 m | 0.16 m | 0.12 m |
Interface | I2C, SPI | I2C | I2C, SPI | I2C, SPI |
Power Consumption | Low | Low | Very Low | Low |
Package Size | 3 mm x 5 mm | 3.6 mm x 3.8 mm | 2.0 mm x 2.5 mm | 5.0 mm x 3.0 mm |
Manufacturing Files
Gerber
PCB Files



Order Directly from PCB WAY
I have already uploaded all these required manufacturing files in PCBWAY website. You can easily go to the below link and place you order, and get your Own Home Automation PCB manufactured from one of the best pcb manufacturer PCBWAY
Applications
The MPL3115A2 is widely used in applications that require precise environmental sensing:
- Weather Stations: Measure barometric pressure and temperature.
- Drones and UAVs: Altitude tracking and stabilization.
- Smartphones and Wearables: Altitude and weather data for fitness tracking.
- Indoor Navigation: Floor-level detection in buildings.
- Industrial Systems: Pressure monitoring in HVAC systems or industrial equipment.
Advantages
- High Accuracy: Provides precise pressure, altitude, and temperature measurements.
- Low Power: Suitable for battery-operated devices.
- Compact Size: Small form factor for space-constrained designs.
- Ease of Integration: Simple I2C or SPI interface for communication.
Arduino and MPL3115A2
The MPL3115A2 sensor, combined with an Arduino, opens up a wide range of possibilities for projects involving barometric pressure, altitude, and temperature measurements. Whether you’re building a weather station, a drone, or an indoor navigation system, the MPL3115A2 is a versatile and accurate sensor that can provide valuable environmental data.
Below is an introduction to a project idea using the MPL3115A2 and Arduino, along with a breakdown of how to approach it.
Components Required
SN | COMPONENTS NAME | DESCRIPTION | QUANTITY | ![]() |
---|---|---|---|---|
1 | Arduino Board | Arduino nano | 1 | https://amzn.to/45O52oT |
2 | MPL3115A2 | Barometric Pressure | 1 | https://amzn.to/3DTBRIl |
3 | Connecting wires | jumper wire | some | https://amzn.to/3fMoSw7 |
4 | Breadboard | Normal | 1 | https://amzn.to/3FUQlXe |
Wiring Diagram (MPL3115A2 to Arduino)
The MPL3115A2 uses I2C communication, so connect it to the Arduino’s SDA and SCL pins:
MPL3115A2 Pin | Arduino Uno Pin | Arduino Mega Pin | ESP32 Pin |
---|---|---|---|
VCC (3.3V) | 3.3V or 5V | 3.3V or 5V | 3.3V |
GND | GND | GND | GND |
SCL | A5 | 21 | GPIO 22 |
SDA | A4 | 20 | GPIO 21 |

Arduino Code for MPL3115A2
This code initializes the sensor and continuously reads altitude, pressure, and temperature data, displaying it in the Serial Monitor.
Steps:
- Connect the MPL3115A2 sensor to the Arduino.
- Install the Adafruit MPL3115A2 Library in Arduino IDE:
- Go to Sketch → Include Library → Manage Libraries.
- Search for Adafruit MPL3115A2 and install it.
- Upload the following code:
#include <Wire.h>
#include <Adafruit_MPL3115A2.h>
// Initialize the sensor
Adafruit_MPL3115A2 barometer = Adafruit_MPL3115A2();
void setup() {
Serial.begin(9600);
Serial.println("MPL3115A2 Sensor Test");
if (!barometer.begin()) {
Serial.println("Could not find a valid MPL3115A2 sensor. Check wiring!");
while (1);
}
barometer.setModeAltimeter(); // Set to Altimeter mode
barometer.setOversampleRate(7); // Set oversampling rate for better accuracy
}
void loop() {
// Get altitude, pressure, and temperature readings
float altitude = barometer.getAltitude();
float pressure = barometer.getPressure();
float temperature = barometer.getTemperature();
Serial.print("Altitude: "); Serial.print(altitude); Serial.println(" meters");
Serial.print("Pressure: "); Serial.print(pressure); Serial.println(" Pa");
Serial.print("Temperature: "); Serial.print(temperature); Serial.println(" °C");
Serial.println("-------------------------------");
delay(1000); // Wait for 1 second before next reading
}
Conclusion
This project demonstrates how to integrate the MPL3115A2 sensor with an Arduino for measuring altitude, pressure, and temperature. With additional features like OLED display, data logging, or wireless transmission, this project can be expanded for more advanced applications