Raspberry PI and MPL3115A2 pressure sensor

In this article we will take a look at the MPL3115A2 pressure sensor and connect it to our Raspberry PI. lets take a look at the MPL3115A2 first

The MPL3115A2 is a compact, piezoresistive, absolute pressure sensor with an I2C digital interface. MPL3115A2 has a wide operating range of 20 kPa to 110 kPa, a range that covers all surface elevations on earth. The MEMS is temperature compensated utilizing an on-chip temperature sensor. The pressure and temperature data is fed into a high resolution ADC to provide fully compensated and digitized outputs for pressure in Pascals and temperature in °C.

The compensated pressure output can then be converted to altitude, utilizing the formula stated in Section 9.1.3 “Pressure/altitude” provided in meters.The internal processing in MPL3115A2 removes compensation and unit conversion load from the system MCU, simplifying system design

Layout

Lets look at how you connect the sensor to your Raspberry Pi

An I2C device that just needs 3.3v and GND as well, so its pretty simple to connect to your Raspberry PI, the layout below shows a Raspberry PI 3 but you can use others as well

pi and MPL3115A2 layout

Parts List

Here is a parts list generated from the fritzing layout above. The sensor costs about