Sensing pressure from US9111-006D

Hi, I'm kinda new to this whole pressure sensing thing and wanted some help to measure voltage from a pressure sensor. My professor has given me this sensor and asked me to measure pressure using a Arduino Mega. I've looked at the datasheet and can't seem to understand anything on how to connect a power supply and whether it needs a Opamp to amplify the voltage.

I've got no clue about S+/S-/Ext and which one of them is supposed to be given the power supply. I'm thinking I connect the S+ and S- to the arduino analog inputs and then power supply EXT with 5V, but really not sure if that's the way I can go about it.

Any kind of guidance would be much appreciated.

Datasheet:
http://shoky.tw/UniSence/UniSence/ATM%20pressure%20package.pdf?Part=dow-THERMOPILESENSORS&Nbr=2&Category=0

You need an external instrumentation amp between that sensor and an Arduino.
A HX711 breakout board might do (or not).

Much easier to use a pressure sensor with buildin instrumentation amp.
Leo..

Hi, I'm back again, need some help. The pressure sensor is giving out an output of 20mV just by connecting 5v to the excitation/input pin and then when i blew some air into the sensor the output would reach as much as 90mV.

My doubt is why does it give out 20mV without any pressure applied?
And also i want to make a buzzer sound while blowing into the pressure sensor and then stop once when I'm finished blowing with one larger beep(saying I'm done). Want to know what kind of a buzzer i need to get for this(active/passive)?

Sorry!! Also would that 90mV be enough to give out the sound or do i need an amplifier to drive a buzzer?

Sorry, your written description of the wiring makes no sense.

Post a hand drawn diagram showing exactly how you have connected the sensor and the Arduino, clearly labeling all the connections, including power and ground.

From the data sheet: S+ = positive signal output (pin 2), S- = negative signal output (pin 5), Ext = Excitation (5V or higher, pin 3) and GND = ground (pins 1 and 6 connected together).

sensor.gif

sensor.gif

That sensor only has a Wheatstone bridge (no amplification).

A Wheatstone bridge has TWO outputs, and voltage BETWEEN the two outputs is a representation of pressure.

Yes, you could connect the sensor supply to Arduino's 5volt and ground.
And measure BOTH outputs with TWO analogue inputs.
And calculate the DIFFERENCE between the two values.

But you won't have many values to work with, since one A/D step of the Arduino is ~5mV.
Leo..

Hi, guys I've measured the voltage from the sensor,

I put the DMM for S+ and S- and the reading that i get is a maximum of 80mV when i blow into the sensor.

So....

Wawa:
Yes, you could connect the sensor supply to Arduino's 5volt and ground.
And measure BOTH outputs with TWO analogue inputs.
And calculate the DIFFERENCE between the two values.

now this is the difference b/w those two values right?

So if you connect pin 3 to 5volt, and pin 1 and 6 to ground,
then you have ~0volt when idle and 80mV with air pressure.
Seems normal.

Problem is that 80mV measured with the Arduino is only 16 A/D values.
You can only detect 16 pressure steps.
That's why you need an instrumentation amp, to first amplify that small signal.

Your professor gave you the wrong sensor.
He should have given you one with buildin instrumentation amp.
Or maybe he wants you to build an instrumentation amp.
Leo..

Wawa:
So if you connect pin 3 to 5volt, and pin 1 and 6 to ground,
then you have ~0volt when idle and 80mV with air pressure.
Seems normal.

Problem is that 80mV measured with the Arduino is only 16 A/D values.
You can only detect 16 pressure steps.
That's why you need an instrumentation amp, to first amplify that small signal.

Your professor gave you the wrong sensor.
He should have given you one with buildin instrumentation amp.
Or maybe he wants you to build an instrumentation amp.
Leo..

My professor wants me to buzz a sound when I blow into the pressure sensor for like 4-5 seconds and once done it should activate a latching solenoid to take in some air into a micro-fluidic chamber.

So the 80mV should be fine right, I mean I can do like when the pressure senor gives a voltage between 20 (like start sensing some pressure) I can buzz a tone and then when it reaches like maximum of 70-80(max) for like 4 seconds I can activate the solenoid.

So, my question is do i need to use an amplifier to have more values to work with or this should be fine??

This is the solenoid he wants me to activate:
http://yaxin-solenoid.com/catalog/AKD0521S.jpg

The link shows three different ones (6, 12, and 24volt).
I would forget about the solenoid for now, and get it to work on the serial monitor first.

Do what I already told you in post#4.
Leo..

Wawa:
The link shows three different ones (6, 12, and 24volt).
I would forget about the solenoid for now, and get it to work on the serial monitor first.

It's the 12 volt one, sorry about that.

Wawa:
Do what I already told you in post#4.
Leo..

How to measure the difference voltage with the arduino ?? I've used this program:

int buzzer = 3; //buzzer to arduino pin 9
//float sensoroutput; //using sensoroutput as the difference between two values
float finaldiffvol; //final difference voltage needed
float millivolt1; //using millivolt as quantity read from S+
float millivolt2; //using millivolt2 as quantity from S-
int sensorpos=A9; //using S+
int sensorneg=A8; //using S-
int sensorposval;
int sensornegval;

void setup(){
pinMode(sensorpos,INPUT); //set sensorval1 as first output(input1 to the arduino)
pinMode(sensorneg,INPUT); //set sensorval2 as second ouput(input2 to the arduino)
pinMode(buzzer, OUTPUT); // Set buzzer - pin 3 as an output

}

void loop(){
sensorposval=analogRead(sensorpos); //reading the input voltage at 9
sensornegval=analogRead(sensorneg); //reading the input voltage at 8
millivolt1=sensorposval * (5.0 / 1023.0);
millivolt2=sensornegval * (5.0 / 1023.0);
finaldiffvol = (millivolt1 + millivolt2);
for(int finaldiffvol=-0.5;finaldiffvol<=90;finaldiffvol++){
tone(buzzer,1000); // Sending 1KHz sound signal...

}
}

Right when i connect my power the buzzer starts buzzing without me blowing into the sensor.

I know my program is crap, but i'd like to control the buzzer first with the pressure sensor and then go to other components. I've connected the S+ and S- to a9 and a8 and somehow know that's wrong, how do i get the difference voltage :confused: :frowning: .

Also how do i stop the buzzer after 5 secs?

We appreciate people who try.
Hobby coder here. Here is my (untested) attempt.
I calculate in A/D values, not in millivolt.
Added SerialPrints, so you can see what's going on.
I used the onboard LED as threshold indicator.
Up to you to add buzzer code.
Swap the A8 and A9 wires if 'difference' goes down with more pressure.
Leo..

const byte ledPin = 13; // buildin LED
const byte threshold = 10; // adjust if needed
const byte sensorPos = A8;
const byte sensorNeg = A9;
int rawValue1; // holds A/D value from +output
int rawValue2; // holds A/D value from -output
int difference; // holds calculated result

void setup() {
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);
}

void loop() {
  rawValue1 = analogRead(sensorPos);
  rawValue2 = analogRead(sensorNeg);
  difference = rawValue1 - rawValue2;

  Serial.print("Pos: ");
  Serial.print(rawValue1);
  Serial.print("\tNeg: ");
  Serial.print(rawValue2);
  Serial.print("\tDifference: ");
  Serial.println(difference);

  if (difference > threshold) {
    digitalWrite(ledPin, HIGH);
    // buzzer 'on' code here
    // solenoid code here (one-shot)
  }
  else {
    digitalWrite(ledPin, LOW);
    // buzzer 'off' code here
  }
  delay(500); // added to slow down printing, so you can read it
}

Hi, i tried the code and it works. I included the LCD and buzzer code and it looks like this:

#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
int buzzer = 7; //buzzer to arduino pin 9
const byte ledPin = 13; // buildin LED
const byte threshold = 1; // adjust if needed
const byte sensorPos = A8;
const byte sensorNeg = A9;
int rawValue1; // holds A/D value from +output
int rawValue2; // holds A/D value from -output
int difference; // holds calculated result

void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(buzzer, OUTPUT);
}

void loop() {
rawValue1 = analogRead(sensorPos);
rawValue2 = analogRead(sensorNeg);
difference = rawValue1 - rawValue2;

Serial.print("Pos: ");
Serial.print(rawValue1);
Serial.print("\tNeg: ");
Serial.print(rawValue2);
Serial.print("\tDifference: ");
Serial.println(difference);

if (difference > threshold) {
digitalWrite(ledPin, HIGH);
tone(buzzer,1000,500); // Send 1KHz sound signal...
// buzzer 'on' code here
// solenoid code here (one-shot)
}
else {
digitalWrite(ledPin, LOW);
noTone(buzzer); // Stop sound...
// buzzer 'off' code here
}
delay(500); // added to slow down printing, so you can read it
}

Threshold value had to be changed to 1 for the device to work. If thresold value is 0 the buzzer keeps acting up and almost continously buzzes. If the threshold is at 2 the buzzer buzzes for a second(when blown harder into the sensor) and stops. I'm guessing this is coz of the lower output value of the sensor. I want to see the value on the LCD but it never works, I wanted to see if my program is right for the LCD to work. Also i got something else to question, but all i want now is for the LCD to diplay whats happening with the device.

indy37:
Threshold value had to be changed to 1 for the device to work.

I want to see the value on the LCD but it never works, I wanted to see if my program is right for the LCD to work.

Also i got something else to question, but all i want now is for the LCD to diplay whats happening with the device.

Sensitivity is not very high without amplification.
But if it works...

Printing to LCD is not much different than printing to serial monitor.

Leo..

indy37:
if (difference > threshold) {
digitalWrite(ledPin, HIGH);
tone(buzzer,1000,500); // Send 1KHz sound signal...
// buzzer 'on' code here
// solenoid code here (one-shot)
}
else {
digitalWrite(ledPin, LOW);
noTone(buzzer); // Stop sound...
// buzzer 'off' code here
}
delay(500); // added to slow down printing, so you can read it
}

I've been changing the delay of the program and when i change it to 5000 the buzzing starts very late and then continues without even blowing. When i change it to 5 or anything less than 100 it buzzes properly and then stops suddenly. does delay play a role for the buzzer to work or is it because of the irregular output of the pressure sensor?

You can also move that delay to just after the buzzer-on command.
Don't make delay() too long, becasue it 'freezes' everything until the delay time has passed.

Look at the printed 'difference' to adjust that threshold value.
Leo..

Hi, I'm back again..

I've taken up another project and am back at it again with this project. I'm in a fix now to find an amplifier suited for continuation of this project.

I'm using a fuel cell sensor:
https://www.dart-sensors.com/wp/wp-content/uploads/2014/10/BA-R-Sensor-Datasheet.pdf

And the same pressure sensor.

Now I want to amplify the signals from both these devices and measure it with an arduino.

The signal i usually get from both the sensors is not more than 70-80mv. So I was wondering if I can use one amplifier to compare/give the two signals as input and then amplify it and give it as one to the arduino.

Hi, seeing that i haven't got any reply from my previous post is it not possible to do it ? I'm having trouble finding an op amp for the pressure sensor and the fuel cell sensor which give out outpus from 10-70mV range.

Can anyone please suggest me an op-amp or atleast point me in the right direction to look for one. I want this signal from both the sensors to be amplified for 0-5V micnrocontroller range for the arduino to read. Also, i was wondering if i would need two different op-amps for these two devices seperately.

Please any help is much appreciated.