Tuesday, January 5, 2010

Experiment 6 - Freescale MPX5010GSX Sensor

My initial experiment with using a pressure sensor for breath pressure detection didn't turn out so well, because the sensor I chose responded to a much higher pressure than I could produce. So I ordered a couple of lower pressure sensors to experiment with. The first one I'm trying is a Freescale MPX5010GSX. It costs more ($14 from Mouser) than the previous one I tried but it's not so expensive as to be unreasonable.

The sensor comes in a nice 6-pin package with leads that will plug right into a breadboard. Pin 1 has a little notch in it, so it's easy to identify. Pin 1 is the output, Pin 2 is ground, and pin 3 is a 5v supply voltage. Pins 4, 5, and 6 are labeled as V1, V2, Vex, but I'm not sure what those do. I left them floating.

To drive the input port, I created a "mouthpiece" of a 6-inch length of one-inch vinyl tubing (bought at the local Ace Hardware). I folded over one end and clamped it shut with a couple of clamps. Then I used an awl from an irrigation tubing kit to open a hole near the clamped-off end and attached a T-connector for 1/4" irrigation tubing. I attached one end of the T to the pressure sensor through a couple feet of 1/4" tubing (it fits perfectly over the sensor), and ran the other end of the T through about a foot of 1/4" tubing. This will be the "blow through" for the sensor, and by clamping it off partially, I can control how much air goes through the instrument.

Here's a picture:



The pressure sensor is on the breadboard at the bottom of the photograph. The tube to blow into is on the right, as is the dump tube. The orange clamps close off the end of the blow tube, forcing all of the air into the tubes that flow (a) to the pressure sensor and (b) to the dump tube.

I then wrote a small Arduino sketch that printed the values on analog port 2 every 100 milliseconds and ran it.

(Sketch)


/*

Print values received from a Freescale MPX5010GSX pressure sensor

Gordon Good (velo27 yahoo com)

*/
const int SENSOR_PIN = 2; // Sensor Vout on analog input 2

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


void loop() {
int pVal = analogRead(SENSOR_PIN);
Serial.println(pVal);
delay(100);
}



Results:

With the dump port completely closed off, and blowing my brains out, the highest reading I can get is about 1015, not much below the maximum sensor value of 1023. With the dump port wide open, the max value is about 650. Wide open feels pretty good to me in terms of how hard I'm blowing, so I think we're in the ballpark with this sensor.

So, in other words, a comfortable "loud blow" for me, with a comfortable amount of air dumped, produces a value of about 1/2 scale on a 10 kilopascal sensor. Assuming the response is linear, the pressure I'm producing is about 5 kilopascals.

2 comments:

  1. The article is much informative which i was searching for .Nice intro good explanation thanks for sharing.
    Enrgtech Electronic Distributor

    ReplyDelete
  2. The article is much informative which i was searching for .Nice intro good explanation thanks for sharing.
    Enrgtech Electronic Distributor

    ReplyDelete