# Adafruit MPRLS Ported Pressure Sensor Breakout

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/062/563/medium800/adafruit_products_3965_iso_ORIG_2018_09.jpg?1537987661)

We stock a few barometric pressure sensors, great for altitude and weather measurements. This pressure sensor is special because it comes with a metal port! Unlike other pressure sensors, you can easily attach a tube to it, to measure air pressure inside a close space. In particular we think this would be a great sensor for use with making DIY assistive tech "Sip & Puff" interfaces, or measuring the pressure within a vacuum chamber or other pressurized container.

![](https://cdn-learn.adafruit.com/assets/assets/000/062/565/medium800/adafruit_products_3965_top_ORIG_2018_09.jpg?1537987692)

Unlike most ported pressure sensors, this one uses I2C, it's _really easy_ to use with any microcontroller. Inside is a silicone-gel covered pressure sensing gauge with a pre-calibrated and compensated 24 bit ADC. We have [example code and libraries for Arduino](https://github.com/adafruit/Adafruit_MPRLS) or [CircuitPython/Python](https://github.com/adafruit/Adafruit_CircuitPython_MPRLS). You can measure absolute pressure 0 to 25 PSI, which is a great range since ambient pressure here on Earth is about 14.5 PSI.

The port is made of stainless steel and is 3.7mm long and 2.5mm diameter. It doesn't come with tubing so be sure to purchase some tubing to attach to the port. Consider using 3/32" ID (internal diameter) tubing. If you find it's not snug enough for your project, try using 1/4" ID tubing with the 3/32" ID tubing inside for a better fit.

![](https://cdn-learn.adafruit.com/assets/assets/000/062/566/medium800/adafruit_products_3965_quarter_ORIG_2018_09.jpg?1537987704)

We've placed this nice sensor on a breakout board with 3.3V power regulation and level shifting so you can use it with any kind of microcontroller or microcomputer, from an Arduino compatible to Raspberry Pi

![](https://cdn-learn.adafruit.com/assets/assets/000/062/564/medium800/adafruit_products_3965_kit_ORIG_2018_09.jpg?1537987678)

# Adafruit MPRLS Ported Pressure Sensor Breakout

## Pinouts

The MPRLS is a I2C sensor. That means it uses the two I2C data/clock wires available on most microcontrollers, and can share those pins with other sensors as long as they don't have an address collision. For future reference, the I2C address is **0x18** and you _can't_ change it!

![](https://cdn-learn.adafruit.com/assets/assets/000/062/567/medium800/adafruit_products_mprls.jpg?1537987747)

## Power Pins:

- **Vin** - this is the power pin. Since the chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V
- **3v3** - this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like
- **GND** - common ground for power and logic

## I2C Logic pins:

- **SCL** - I2C clock pin, connect to your microcontrollers I2C clock line.
- **SDA** - I2C data pin, connect to your microcontrollers I2C data line.

## Other pins:

- **RST** - Hardware reset input pin. Pulled up by default, drive to ground to hardware reset the board. 3-5V logic safe
- **EOC** - End Of Conversion output pin. Will toggle to let you know a sensing conversion is ready to be read. Optional but will speed up you interface code just a bit. You can leave it disconnected and we'll query the chip over I2C for when it's ready.

# Adafruit MPRLS Ported Pressure Sensor Breakout

## Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/062/769/medium800/adafruit_products_3965-01.jpg?1538410663)

## Prepare the header strip:

&nbsp;

Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard -&nbsp; **long pins down**

![adafruit_products_DSC_3990.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/771/medium640/adafruit_products_DSC_3990.jpg?1538410732)

![adafruit_products_DSC_3991.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/906/medium640/adafruit_products_DSC_3991.jpg?1538498019)

## Add the breakout board:

&nbsp;

Place the breakout board over the pins so that the short pins poke through the breakout pads

![adafruit_products_DSC_3992.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/907/medium640/adafruit_products_DSC_3992.jpg?1538498051)

## And Solder!

&nbsp;

Be sure to solder all pins for reliable electrical contact.  
  
_(For tips on soldering, be sure to check out our&nbsp;_[_Guide to Excellent Soldering_](http://learn.adafruit.com/adafruit-guide-excellent-soldering)_)._

![adafruit_products_DSC_3993.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/782/medium640/adafruit_products_DSC_3993.jpg?1538411318)

![adafruit_products_DSC_3996.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/783/medium640/adafruit_products_DSC_3996.jpg?1538411773)

![adafruit_products_DSC_3998.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/785/medium640/adafruit_products_DSC_3998.jpg?1538411883)

![adafruit_products_DSC_3997.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/908/medium640/adafruit_products_DSC_3997.jpg?1538498081)

You're done! Check your solder joints visually and continue onto the next steps.

![adafruit_products_DSC_3999.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/909/medium640/adafruit_products_DSC_3999.jpg?1538498096)

![](https://cdn-learn.adafruit.com/assets/assets/000/062/787/medium800/adafruit_products_DSC_4000.jpg?1538411596)

# Adafruit MPRLS Ported Pressure Sensor Breakout

## Arduino Test

You can easily wire this breakout to any microcontroller, we'll be using an Arduino. For another kind of microcontroller, just make sure it has I2C, then port the code - its pretty simple stuff!

![](https://cdn-learn.adafruit.com/assets/assets/000/062/589/medium800/adafruit_products_image.png?1537994183)

- Connect **Vin** to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V
- Connect **GND** to common power/data ground
- Connect the **SCL** pin to the I2C clock **SCL** pin on your Arduino. On an UNO & '328 based Arduino, this is also known as **A5** , on a Mega it is also known as **digital 21** and on a Leonardo/Micro, **digital 3**
- Connect the **SDA** pin to the I2C data **SDA** pin on your Arduino. On an UNO & '328 based Arduino, this is also known as **A4** , on a Mega it is also known as **digital 20** and on a Leonardo/Micro, **digital 2**

The MPRLS has a default I2C address of **0x18** and cannot be changed!

# Install Arduino Libraries

Lets begin by installing all the libraries we need. Open up the library manager in Arduino IDE

![](https://cdn-learn.adafruit.com/assets/assets/000/062/569/medium800/adafruit_products_libmanager.png?1537988291)

Search for and install the latest version of the Adafruit MPRLS library

![](https://cdn-learn.adafruit.com/assets/assets/000/062/570/medium800/adafruit_products_image.png?1537988363)

# Basic Example

Start by opening up the **Adafruit MPRLS -\> simpletest** under the Adafruit MPRLS library:

![](https://cdn-learn.adafruit.com/assets/assets/000/062/571/medium800/adafruit_products_image.png?1537988392)

And upload it to your board!

Open up the serial console to see the readings. You can blow into the port or cover it with your finger to change the readings

![](https://cdn-learn.adafruit.com/assets/assets/000/062/572/medium800/adafruit_products_image.png?1537988790)

If you'd like to add hardware reset and EOC pin support, you can change these lines and update your wiring to include the wires you've selected - you can use any 2 digital pins

```auto
// You dont *need* a reset and EOC pin for most uses, so we set to -1 and don't connect
#define RESET_PIN  -1  // set to any GPIO pin # to hard-reset on begin()
#define EOC_PIN    -1  // set to any GPIO pin to read end-of-conversion by pin
Adafruit_MPRLS mpr = Adafruit_MPRLS(RESET_PIN, EOC_PIN);
```

# Adafruit MPRLS Ported Pressure Sensor Breakout

## Arduino Library Docs

# Adafruit MPRLS Ported Pressure Sensor Breakout

## Python & CircuitPython

It's easy to use the MPRLS sensor with Python or CircuitPython and the [Adafruit CircuitPython MPRLS](https://github.com/adafruit/Adafruit_CircuitPython_MPRLS) module.&nbsp; This module allows you to easily write Python code that reads the pressure from the sensor.

You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

# CircuitPython Microcontroller Wiring

First wire up an MPRLS to your board exactly as shown on the previous pages for Arduino.&nbsp; You can use I2C.&nbsp; Here's an example of wiring a Feather M0 to the sensor with I2C:

- **Board 3V** to **sensor VIN**
- **Board GND** to **sensor GND**
- **Board SCL** to **sensor SCL**
- **Board SDA** to **sensor SDA**

![adafruit_products_FeatherM0_MPRLS_I2C_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/974/medium640/adafruit_products_FeatherM0_MPRLS_I2C_bb.jpg?1538603132)

# Python Computer Wiring

Since there's _dozens_ of Linux computers/boards you can use we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).&nbsp;

Here's the Raspberry Pi wired with I2C:

- **Pi 3V3** to **sensor VIN**
- **Pi GND** to **sensor GND**
- **Pi SCL** to **sensor SCL**
- **Pi SDA** to **sensor SDA**

![adafruit_products_raspi_mprls_i2c_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/062/976/medium640/adafruit_products_raspi_mprls_i2c_bb.jpg?1538603273)

# CircuitPython Installation of MPRLS Library

You'll need to install the&nbsp;[Adafruit CircuitPython MPRLS](https://github.com/adafruit/Adafruit_CircuitPython_MPRLS)&nbsp;library on your CircuitPython board.

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next you'll need to install the necessary libraries&nbsp;to use the hardware--carefully follow the steps to find and install these libraries from&nbsp;[Adafruit's CircuitPython library bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases).&nbsp; Our CircuitPython starter guide has [a great page on how to install the library bundle](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries).

For non-express boards like the Trinket M0 or Gemma M0, you'll need to manually install the necessary libraries from the bundle:

- **adafruit\_mprls.mpy**
- **adafruit\_bus\_device**

Before continuing make sure your board's lib folder or root filesystem has the&nbsp; **adafruit\_mprls.mpy,** and **adafruit\_bus\_device**** &nbsp; **files and folders** &nbsp;**copied over.

Next[&nbsp;connect to the board's serial REPL](https://learn.adafruit.com/welcome-to-circuitpython/the-repl) so you are at the CircuitPython&nbsp; **\>\>\>** &nbsp;prompt.

# Python Installation of MPRLS Library

You'll need to install the Adafruit\_Blinka library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `sudo pip3 install adafruit-circuitpython-mprls`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

# CircuitPython & Python Usage

To demonstrate the usage of the sensor we'll initialize it and read the pressure from the board's Python REPL.

Since you're using an I2C connection run the following code to import the necessary modules and initialize the I2C connection with the sensor:

```auto
import time
import board
import busio
import adafruit_mprls
i2c = busio.I2C(board.SCL, board.SDA)
mpr = adafruit_mprls.MPRLS(i2c, psi_min=0, psi_max=25)
```

Now you're ready to read values from the sensor using any of these properties:

- **pressure** - The measured pressure, in hPa.

For example to print the pressure:

```auto
print("Pressure (hPa):", mpr.pressure)
```

![](https://cdn-learn.adafruit.com/assets/assets/000/062/977/medium800/adafruit_products_MPRLS_REPL_print.png?1538603843)

That's all there is to using the MPRLS sensor with CircuitPython!

# Full Example Code
https://github.com/adafruit/Adafruit_CircuitPython_MPRLS/blob/main/examples/mprls_simpletest.py

# Adafruit MPRLS Ported Pressure Sensor Breakout

## Python Docs

# Adafruit MPRLS Ported Pressure Sensor Breakout

## WipperSnapper

![](https://cdn-learn.adafruit.com/assets/assets/000/124/375/medium800/adafruit_products_01_DeviceList.png?1694688071)

## What is WipperSnapper

WipperSnapper is a firmware designed to turn any WiFi-capable board into an Internet-of-Things device without programming a single line of code. WipperSnapper connects to [Adafruit IO](https://io.adafruit.com/), a web&nbsp;platform designed ([by Adafruit!](https://www.adafruit.com/about)) to&nbsp;_display_,&nbsp;_respond_, and&nbsp;_interact_&nbsp;with your project's data.

Simply load the WipperSnapper firmware onto your board, add credentials, and plug it into power. Your board will automatically register itself with your Adafruit IO account.

From there, you can add&nbsp;_components_&nbsp;to your board such as buttons, switches, potentiometers, sensors, and more! Components are&nbsp;_dynamically&nbsp;_added to hardware, so you can&nbsp;immediately start interacting, logging, and streaming the data your projects produce without writing code.

If you've never used WipperSnapper, click below to read through the quick start guide before continuing.

[Quickstart: Adafruit IO WipperSnapper](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper)
## Wiring
First, wire up an MPRLS to your board exactly as follows. Here is an example of the MPRLS wired to an&nbsp;[Adafruit ESP32 Feather V2](https://www.adafruit.com/product/5400)&nbsp;using I2C&nbsp;[with a STEMMA QT breakout cable](https://www.adafruit.com/product/4397)

- **Board 3V** &nbsp;to&nbsp;**sensor VIN (red wire on STEMMA QT)**  
- **Board GND** &nbsp;to&nbsp;**sensor GND (black wire on STEMMA QT)**  
- **Board SCL** &nbsp;to&nbsp;**sensor SCL (yellow wire on STEMMA QT)**  
- **Board SDA** &nbsp;to&nbsp;**sensor SDA (blue wire on STEMMA QT)**

![adafruit_products_MPRLS_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/124/381/medium640/adafruit_products_MPRLS_bb.png?1694690519)

![adafruit_products_featherV2_MPRLS_Breadboard_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/124/382/medium640/adafruit_products_featherV2_MPRLS_Breadboard_bb.png?1694690555)

## Usage

Connect your board to Adafruit IO Wippersnapper and **[navigate to the WipperSnapper board list](https://io.adafruit.com/wippersnapper).**

On this page, **select the WipperSnapper board you're using** to be brought to the board's interface page.

![](https://cdn-learn.adafruit.com/assets/assets/000/124/383/medium800/adafruit_products_02_DeviceSelection.png?1694690613)

If you do not see your board listed here - you need [to connect your board to Adafruit IO](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper) first.

On the device page, quickly&nbsp; **check that you're running the latest version of the WipperSnapper firmware**.

The device tile on the left indicates the version number of the firmware running on the connected board.

- **If the firmware version is green with a checkmark -** &nbsp;continue with this guide.
- **If the firmware version is red with an exclamation mark "!" -** &nbsp;[update to the latest WipperSnapper firmware](https://learn.adafruit.com/quickstart-adafruit-io-wippersnapper)&nbsp;on your board before continuing.

![adafruit_products_04_version70_arrow_L94t15BUzv.png](https://cdn-learn.adafruit.com/assets/assets/000/124/384/medium640/adafruit_products_04_version70_arrow_L94t15BUzv.png?1694692357)

![adafruit_products_04_UpdateRequired.png](https://cdn-learn.adafruit.com/assets/assets/000/124/386/medium640/adafruit_products_04_UpdateRequired.png?1694692424)

Next, make sure the sensor is plugged into your board and click the **&nbsp;I2C Scan&nbsp;** button.

![](https://cdn-learn.adafruit.com/assets/assets/000/113/177/medium800/sensor_page_crop_scan.png?1657724520)

You should see the MPRLS's default I2C address of&nbsp;`0x18`&nbsp;pop-up in the I2C scan list.

![](https://cdn-learn.adafruit.com/assets/assets/000/124/388/medium800/adafruit_products_I2C_0x18.png?1694703589)

###  I don't see the sensor's I2C address listed! 


First, double-check the connection and/or wiring between the sensor and the board.

Then, reset the board and let it re-connect to Adafruit IO WipperSnapper.

With the sensor detected in an I2C scan, you're ready to add the sensor to your board.

**Click the New Component button or the + button** to bring up the component picker.

![](https://cdn-learn.adafruit.com/assets/assets/000/127/931/medium800/sensor_page_temperature___humidity_06_AddComponent.png?1708631009)

Adafruit IO supports a large amount of components. To quickly find your sensor, type&nbsp;`MPRLS`&nbsp;into the search bar, then select the&nbsp; **MPRLS** component.

![](https://cdn-learn.adafruit.com/assets/assets/000/127/947/medium800/adafruit_products_oJgtwzyNDJ.png?1708698966)

On the component configuration page, the MPRLS's sensor address should be listed along with the sensor's settings.

The&nbsp; **Send Every** &nbsp;option is specific to each sensor's measurements. This option will tell the Feather how often it should read from the MPRLS sensor and send the data to Adafruit IO. Measurements can range from every 30 seconds to every 24 hours.

For this example, set the&nbsp; **Send Every&nbsp;** interval to every 30 seconds.

![](https://cdn-learn.adafruit.com/assets/assets/000/124/392/medium800/adafruit_products_create_component.png?1694703663)

Your device interface should now show the sensor components you created. After the interval you configured elapses, WipperSnapper will automatically read values from the sensor(s) and send them to Adafruit IO.

![](https://cdn-learn.adafruit.com/assets/assets/000/124/391/medium800/adafruit_products_device_sensor_list.png?1694703648)

To view the data that has been logged from the sensor, click on the graph next to the sensor name.

![](https://cdn-learn.adafruit.com/assets/assets/000/124/390/medium800/adafruit_products_device_sensor_feed_icon.png?1694703634)

Here you can see the feed history and edit things about the feed such as the name, privacy, webhooks associated with the feed and more. If you want to learn more about how feeds work, [check out this page](https://learn.adafruit.com/all-the-internet-of-things-episode-four-adafruit-io/advanced-feeds).

![](https://cdn-learn.adafruit.com/assets/assets/000/124/389/medium800/adafruit_products_feed.png?1694703619)

# Adafruit MPRLS Ported Pressure Sensor Breakout

## Downloads

# Datasheets & Files

- [Datasheets & App notes for Honeywell MPR series](https://sensing.honeywell.com/micropressure-mpr-series)
- [PCB CAD files in GitHub](https://github.com/adafruit/Adafruit-MPRLS-Pressure-Sensor-Breakout-PCB)
- [Fritzing object in Adafruit Fritzing library](https://github.com/adafruit/Fritzing-Library)
- [3D models on GitHub](https://github.com/adafruit/Adafruit_CAD_Parts/tree/main/3965%20MPRLS%20Pressure%20Sensor)

# Schematic & Fabrication Print
![](https://cdn-learn.adafruit.com/assets/assets/000/062/573/medium800/adafruit_products_schem.png?1537989079)

![](https://cdn-learn.adafruit.com/assets/assets/000/062/574/medium800/adafruit_products_fabprint.png?1537989088)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/539/medium800/adafruit_products_3965_MPRLS_Pressure_Sensor.jpg?1765217206 )


## Primary Products

### Adafruit MPRLS Ported Pressure Sensor Breakout - 0 to 25 PSI

[Adafruit MPRLS Ported Pressure Sensor Breakout - 0 to 25 PSI](https://www.adafruit.com/product/3965)
We stock a few barometric pressure sensors, great for altitude and weather measurements. This pressure sensor is special because it comes with a metal port! Unlike other pressure sensors, you can easily attach a tube to it, to measure air pressure inside a close space. In particular we think...

In Stock
[Buy Now](https://www.adafruit.com/product/3965)
[Related Guides to the Product](https://learn.adafruit.com/products/3965/guides)

## Related Guides

- [Analog Devices ADXL343 Breakout Learning Guide](https://learn.adafruit.com/adxl343-breakout-learning-guide.md)
- [Blues Playground](https://learn.adafruit.com/blues-playground.md)
- [Color-sensor Driven NeoPixel Dress](https://learn.adafruit.com/color-sensor-driven-neopixel-dress.md)
- [Introducing Gemma](https://learn.adafruit.com/introducing-gemma.md)
- [Remote Control with the Huzzah + Adafruit.io](https://learn.adafruit.com/remote-control-with-the-huzzah-plus-adafruit-io.md)
- [Adafruit PiCowBell HSTX DVI Output](https://learn.adafruit.com/adafruit-picowbell-hstx-dvi-output.md)
- [Adafruit 5x5 NeoPixel Grid BFF](https://learn.adafruit.com/adafruit-5x5-neopixel-grid-bff.md)
- [Adafruit PCF8575 I2C 16 GPIO Expander Breakout](https://learn.adafruit.com/adafruit-pcf8575.md)
- [ST 9-DoF Combo Breakouts and Wings](https://learn.adafruit.com/st-9-dof-combo.md)
- [Fisher-Price USB Foot Pedal](https://learn.adafruit.com/fisher-price-usb-foot-pedal.md)
- [Adafruit Power Relay FeatherWing](https://learn.adafruit.com/adafruit-power-relay-featherwing.md)
- [How we designed an injection-molded case](https://learn.adafruit.com/how-we-designed-an-injection-molded-case-for-raspberry-pi.md)
- [Adafruit DRV2605L Haptic Controller Breakout](https://learn.adafruit.com/adafruit-drv2605-haptic-controller-breakout.md)
- [Adafruit PCM5122 I2S DAC](https://learn.adafruit.com/adafruit-pcm5122-i2s-dac.md)
- [Storage humidity and temperature monitor](https://learn.adafruit.com/storage-humidity-and-temperature-monitor.md)
