Summary of Digital Barometer using PIC Microcontroller and MPX4115A Pressure Sensor – XC8
The article describes the Motorola MPX4115A atmospheric pressure sensor, a 5V-powered, linear-output device producing ~0.25V to ~4.75V across its 15–115 kPa effective range, suitable for barometer and altimeter projects. It highlights accuracy, temperature compensation, package options, typical applications (aviation altimeters, industrial control, engine control, weather stations), and basic PIC microcontroller interfacing including pinouts for 6- and 8-pin variants and connecting the sensor output to a PIC analog input and a 16x2 LCD on PORTB.
Parts used in the Digital Barometer using PIC Microcontroller and MPX4115A:
- Motorola MPX4115A pressure sensor (6-pin or 8-pin)
- PIC microcontroller (with analog input, VDD +5V, VSS GND, MCLR disabled in software)
- Power supply +5V
- 16 x 2 LCD display
- Connections/wiring for sensor pins to PIC and power
- Optional: PIC development tools and programming setup
The Motorola MPX4115A is an atmospheric pressure sensor powered by 5V and delivers and output from ~0.25V to ~4.75V based on the pressure detected at room temperature (25°C). The device provides a linear output based on pressure. As the pressure rises, the output voltage of the sensor rises as well with ~0.25V represents <15 kPa pressure relative to a vacuum and ~4.75V represents >115 kPa.
Note that 1 atmosphere of pressure at sea level is equal to 101,325 Pa or 101 kPa. The graph below shows a typical output response of an MPX4115A pressure sensor, below 15KPa and above 115KPa the voltage doesn’t change.The MPX4115A is thus an ideal sensor for microcontroller based barometer or altimeter applications.
Features
- 1.5% Maximum Error over 0° to 85°C
- Ideally suited for Microprocessor or Microcontroller– Based Systems
- Temperature Compensated from –40° to +125°C
- Durable Epoxy Unibody Element or Thermoplastic (PPS) Surface Mount Package
Application Examples
- Aviation Altimeters
- Industrial Controls
- Engine Control
- Weather Stations and Weather Reporting Devices
Circuit diagram
As shown on the circuit diagram above, it is very easy to interface the MPX4115A to a PIC, if you are using the 8-pin sensor, connect pin 2 to +5V, pin 3 to ground and the output is on pin 4 (connect to analog pin of PIC). leave the rest unconnected. If you are using the 6-pin sensor, pin 1 is the output (connect to analog pin of PIC), pin 2 to ground and pin 3 to +5V. Leave the rest unconnected.
Note: Pin 1 is noted by the notch in the lead
VDD and VSS of the pic microcontroller is not shown in the circuit diagram. VDD should be connected to +5V and VSS to GND. The MCLR is disabled in software and an internal oscillator clock is selected so no need for external crystal.
A 16 x 2 lines LCD display is connected to PORT B. refer to the Interfacing LCD Display with PIC microcontroller
For more detail: Digital Barometer using PIC Microcontroller and MPX4115A Pressure Sensor – XC8
- What voltage range does the MPX4115A output?
The MPX4115A outputs approximately 0.25V to 4.75V based on pressure at room temperature. - What pressure range corresponds to the MPX4115A output limits?
About less than 15 kPa corresponds to ~0.25V and greater than 115 kPa corresponds to ~4.75V. - Can the MPX4115A be used with a PIC microcontroller?
Yes, the article shows interfacing the MPX4115A to a PIC by connecting the sensor output to an analog input and powering with +5V and GND. - How do I wire the 8-pin MPX4115A to the PIC?
For the 8-pin sensor, connect pin 2 to +5V, pin 3 to ground, and pin 4 as the output to the PIC analog pin; leave other pins unconnected. - How do I wire the 6-pin MPX4115A to the PIC?
For the 6-pin sensor, connect pin 1 as the output to the PIC analog pin, pin 2 to ground, and pin 3 to +5V; leave other pins unconnected. - What PIC configuration is recommended for this project?
MCLR is disabled in software and an internal oscillator is selected so no external crystal is needed, and VDD should be +5V with VSS to GND. - Is the MPX4115A temperature compensated?
Yes, it is temperature compensated from -40°C to +125°C. - What applications is the MPX4115A suited for?
It is suited for aviation altimeters, industrial controls, engine control, and weather stations.

