Pressure Sensor and LPC1768 A:D Converter

This topic is related to the issues of connecting up a MPXAZ6115A pressure sensor to one of the A:D pins on the LPC1768 mbed and the issues I've enountered while mating the two devices.

My objective was to produce a simple means of getting barometric pressure readings from an mbed.  It started out simple, but it grew as time went on - and it's still not finished.  The interface seemed so easy, just convert the 0-5V output of the MPX to the 0-3.3V input of the LPC1768 using a simple resistive divider and change the scaling of the readings.  Once I set up the initial hardware, I started modifying the software routines of Simon Blandford's ADC_test program. I basically lifted the A:D interrupt driven routines.  This was fairly easy to get up and running, thanks to Simon's examples. 

The first issue I ran into was that the readings from the MPX were sporatic, jumping around by as much as 10% each reading.  Earlier tests (before hooking up the MPX) showed the A:D readings to be much more stable.  Thinking that the 5V power supply to the MPX wasn't stable, I connected it to a precise 5V reference, an Intersil X60003-50.

This precise voltage reference didn't seem to help much.  I modified the code to do 10 back-to-back A:D accesses in a row.  I found that the first access was consistently 10% lower than the following 9 access.  This told me that the combination of the high output impedance of the MPX and the low input impedance of the LPC1768 ("tbd" in the datasheet I have) was causing the A:D voltage to rise during A:D conversions.  I put in a small cap across the resistive voltage divider (input pin of the A:D).  It didn't help.  Next, I added a buffer OpAmp.  This made a huge difference in the initial error seen after the first A:D access.  Now, all of the following nine A:D access looked similar to the first access.

However, I'm still seeing back-to-back A:D accesses vary by as much as +-10 counts.  I attribute this to noise between the output of my circuit and the input of the A:D.  Though my circuit is wired very tight (everything close and decoupled well), the mbed is on a proto board and wires connect the two circuits together.  I am still working on this issue.

I am leaving the X60003 in the circuit.  Though it doesn't help wih my current noise problem, it will help in the long stability of taking barometric readings.  The MPX is sensitive to its power supply and can change a few hundreths in inches of mercury with just a few millivolts of power supply deviation.

Here is my MPX schematic as it stands today:




04 Feb 2011

Just in case... does it help if you ground all the NC pins?

04 Feb 2011


From the MPXAX6115 data sheet.

" 1. Pins 1, 5, 6, 7, and 8 are internal device connections. Do not connect to external circuitry or ground. Pin 1 is denoted by the notch in the lead. "


Actually, I gave up on this design.  Even though I used precise parts and paid careful attention to layout, the A:D converters on mbed have a lot of digital noise on them.  This resulted in reading different values every time I read from the A:D.  Not a lot, but enough to make the barometer inaccurate.  Even averageing 10 back-to-back access didn't help much. 

So now, I have just started using the MPL115A2.  It has built-in compensation correction values and an i2c interface.  Runs on 3.3V to boot.  The math is a bit complicated, but I just got it working yesterday.  Now, I'm checking the part for stability.  If you're in the US, the parts are available in DigiKey.


You need to log in to post a comment