Digital Barometer using PIC Microcontroller and MPX4115A Pressure Sensor – XC8

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.

Digital Barometer using PIC Microcontroller and MPX4115A Pressure Sensor - XC8

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

Digital Barometer using PIC Microcontroller and MPX4115A Pressure Sensor - XC8 schematic

Β 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


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.