pwillard.com

Floobydust — Open Source experimentation

21 May

Barometric Pressure


While looking at low cost pressure sensors in the Mouser Electronics catalog,  I located the FREESCALE MPXAZ6115A as a possible sensor for my project.  The sensor has the following statistics;  Device: MPX6115,   MAX PSI   16.7,    MAX kPa 115.

Since barometric pressure here hovers at around 100kPa or so,  this sensor would do just fine.  The analog output of the sensor is relative to the min/max pressure range of the sensor.

According to my initial tests, the sensor would output about 4.06 volts at 100kPa.

The built-in analog input on the Arduino would also keep the circuit simple and after a few tests I was able to determine the offset value I needed to get correct readings for the localized barometric pressure.

Here is the Arduino Code:

// Nominal Transfer Value:
// Vout = VS x (0.009 x P – 0.095)
// ± (Pressure Error x Temp. Factor x 0.009 x VS)
// VS = 5.1 ± 0.25 Vdc

float Vin;
float P;

void setup()
{
Serial.begin(9600);
}

void loop()
{

Vin = (5.0/1024.0) * analogRead(0);
Vin = Vin + 0.11;                  // Offset Adjustment
Serial.print(Vin);
Serial.println(" Volts");

P=((Vin/5.0)+0.095)/0.009;
Serial.print(P);
Serial.println(" kPa");

Vin = (P * 0.2952999);
Serial.print(Vin);
Serial.println(" Inches of Mercury");

delay(2000);
}

I’m using a LADYADA Boarduino on a solder-less breadboard for testing.  The sensor hookup is dead simple with only one exception that makes it tricky.  The part I selected is designed to be surface mounted.       I decided to create  a carrier board using the board layout software I prefer called SprintLayout  from ABACOM in Germany.   Other than 5V power and ground connections, the Vout from the carrier board goes directly to the Arduino Analog(0) pin.

sensor1

To create the PCB board, I use the GOOTIE toner transfer method to apply the layout on the PCB for etching.  (google search “gootie  PCB” for more info)

Having developed a dislike for the chemical etchant that Radio Shack sells; Ferric Chloride, I have also adopted the etchant that Gootie describes.   It is based on the swimming pool chemical Muratic Acid and Hydrogen Peroxide in a 1 to 2 ratio.   It’s fast, non-opaque and does not require heating or excessive agitation.

Note: I also recently picked up a used GBC Creative Laminator at the local Goodwill for $14.00.  It does an excellent job of applying the toner to the copper on the PCB to be etched.  Using an hand iron was OK, but the results were not always predictable.

Here is the Layout:

mpx6115

This is the Component side view  or “TOP VIEW” through the board and “yes”, the sensor is actually underneath on the copper side… so the pin out is upside down in this view for that part.

The layout file is here: Pressure.zip

I used  0.100 spaced right angle pins so the board actually sits vertical in the breadboard.

The parts and schematic used are directly from the manufacturers data sheet.

The test program output looks like this:

4.10 Volts
101.65 kPa
30.02 Inches of Mercury

Results:   Complete success.


Filed under: Electronic Projects

Post a Comment