SSI Technologies Pressure Transducer Interface Help

Howdy all,

I am kinda new at this and just got my hands on a mega 2560. It was a freebie form a friend, or I would have gotten the latest one. I am reasonably comfortable with programming languages and have done some python, matlab, ardiuno. I did the LED blink test and other intro projects.

Now for something real. I have this:

Sorry for the bad image quality. This is an SSI Technologies pressure transducer. It measures pressure, supposedly. This is what is says on the label:

SSI Technologies
P51 - 50 - A - A - I36 - 20mA - 000 - 000

From their online datasheets:

http://www.ssi-sensors.com/wp/wp-content/uploads/2012/02/PS_AN10-P51-Series-LG-Low-Pressure-Gage-Pressure-Sensors_02.pdf

It would seem that this is a <20mA 50psi max pressure sensor with decent sampling frequency.

I want to read it with my arduino.

It has five wires on its tail and this is how I hooked em up:

Red - +9V at 1000mA from an old wall transformer
White - A0 on the mega
Black - Ground for 9V, mega,..
Green - ? swingin free
Unshielded multi-strand - ? swingin free

Power everything up, verify good arduino connection with PC, and run this code:


int tranpin = 0; // analog pin connected to Vout from sensor
int val;

void setup() {

Serial.begin(115200); //set baud rate high to get higher smapling frequency? maybe? made sense to me...
pinMode(0,INPUT);
}

void loop() {

val = analogRead(tranpin); // read

Serial.println(val); //display? this is where i might need help...

}

Now when I run this I can open the serial monitor I see the values of uh, val flying by at an impressive rate but they seem to be all over the place. They randomly range from 0 to 1023. If this transducer was working right, just sitting on my desk, it would settle to some value, presumably standard atmospheric pressure for my desk?

Maybe I need to filter, graph, something to the raw output?....

Need some sage advice on this, I would like to eventually get a nice GUI for a pressure measuring application using this sensor.

Thanks a bunch!

Lifetime tinkerer, first time poster,

Travis

Picture0003.jpg

Hi,
I think you need a datasheet rather than an application note.

It looks like you have a current output version and you are trying to read it's voltage. Have you tried to connect the output to a resistor and read the voltage then?

@vanja

Didn't even think about that. The pdf I linked to has the pin outs, voltage and psi ranges, CAD drawings, as well as basic setup instructions. What more would a datasheet give me?

@RandallR

Hmm good point. Connecting the white wire (current out i guess) to a 10ohm 1/4W resistor gives a pretty reliable .60V connected straight to a meter and back to ground (no arduino involved). It bounces around a little between 55-61. The slight oscillations in the V reading that stabilize around a value seem hopeful that that is the voltage that the sensor gives as "room pressure".

Guess I need to screw it into a chamber with an air input and psi gauge in order to try and calibrate it.

This has been helpful already, thanks guys.

Questions:

  1. Is it okay to just use a standard wall wart converter that outputs 9V 1000mA to power the sensor? It says it can handle 5-30V on the product pdf...

  2. I just kinda grabbed a resistor (10 Ohm, .25W) from my box of junk, does that have a bearing on being able to accurately translate my outputs in the mA range into good readable volts for my meter or the mega?

  3. What about data processing? Any cool ideas for a way to record and plot results while displaying in real time? (maybe a fancy pants digital dial GUI?....)

Thanks a bunch guys, I really appreciate it. If I get it working, I'll try and post some application pictures, I have some interesting ideas in mind....

-Travis

I realize that the way I ended that was strange and downright weird.

This is what I am "theoretically" trying to use this in for a strictly computational analysis study on impact and thrust recording project.

-T

pressure-transformer.pdf (551 KB)

I was going to say that if you have a multimeter then just send the current through that and read it directly. An old analog one (if you can still find one) might be even better. It would smooth the measurements

Your fluctuating readings could be from Wall-Wart Ripple. As far as resistor value, look at ohms law, maximum current, maximum voltage, safety factor and standard values. You should be able to pick a resistor from that.

Sometimes just getting the reading up out of the noise. If you are reading 55-60 out of 1023 then you are looking at noise. However, what happens when you add a little pressure to it? You may want to add a high value 1k-10K what ever you have available and a 5V zener for protection. The zener will protect your input from over voltage and the resistor will protect you zener from over current.

Good luck

@ RandallR

Yeah that works pretty well, when measuring mA on a meter with no resistors, i get a clean steady 3.65mA that does a few quick jumps down to 3.64 or up to 3.66 before returning to 3.65 and mostly staying there.

If I seal the end of the probe to my mouth (science is a dirty business) and force as much pressure into my mouth as I comfortably can it shows a quick response and jumps up to around 3.8 where it seemed to vary quickly and accurately when I blew harder or let off with the pressure.

Just a few more things if you dont mind, this is actually making progress and sense to me, very encouraging here:

1.) So I like these mA readings. They are nice and stable. Do I need to convert to V to read and process on the mega or does it also have an Amp input to do what my meter is doing?

Also, maybe I am flat out disrespecting Dr. Ohm in someway by not using his formula correctly but if im getting 3.65mA should I not be getting about .0365V when connected to a 10ohm resistor?

V = I*R = .00365 A * 10 ohm = .0365V ??

Instead my meter told me around .6 V......

2.) Shamefully shaky on my high school elec classes, is this what you are suggesting for the complete circuit?

I like this, but if my Wall Wart can only go up to 9V 1A, would the arduino be safe anyways no matter what? Im assuming there are classifications of zeners to pick from, guess I would need a light one?

3.) Final thing, i promise. Any advice on how to get my arduino to have a push to start recording button and then record and save continuous measurements in a neat way as data points to be plotted as Pressure v Time? excel-friendly would be nice....basically I want to hit start and when i hit it again have my code spit out a file of two columns of values, one simply being time values. Guess I need to dig into arduino GUI stuff to make this nice..

Thanks again man,

-T

Let me see if I can answer some of these questions. I'm sure someone will correct me if I am leading you too far astray.

I like your test results they are very promising.

CapnCrunker:
1.) So I like these mA readings. They are nice and stable. Do I need to convert to V to read and process on the mega or does it also have an Amp input to do what my meter is doing?

As you know, volts and amps are closely related. What gets measured depends on what you are using to do the measuring. In most cases it boils down to measuring amps but that is when is it boiled way down. From the surface, before the boiling, we measure volts. So you Arduino must measure volts. And the voltage can not exceed the input voltage of the chip. And I said chip not board. The board has a regulator that restricts the voltage to the chip to 5 volts. Therefore, you must restrict the input voltage to the analog input pins to 5 volts.
In summary, you want to convert your amps to volts and restrict the volts to 5 or less.

CapnCrunker:
Also, maybe I am flat out disrespecting Dr. Ohm in someway by not using his formula correctly but if im getting 3.65mA should I not be getting about .0365V when connected to a 10ohm resistor?

V = I*R = .00365 A * 10 ohm = .0365V ??

Instead my meter told me around .6 V......

You may be right, lets do a few quick calculations. I am going to start from the beginning and do the steps I suggested, "... look at ohms law, maximum current, maximum voltage, safety factor and standard values".

Ohms law - E=IR where E is volts, I is amps, and R is resistance
maximum current - I believe you device outputs a maximum of 20 milli-amps that should be .020 amps
maximum voltage - No more that chip input voltage of 5 volts.
safety factor - cut it a little and make sure that it is limited to 5 volts the zener is added insurance.
So we have
5 = .020 * R
R = 5 / .020
R = 250 ohms
Your not going to find 250 home resistor in your junk box so do you go higher or lower ( E=I*R ) as the resistance goes up the voltage goes up, therefore, lower. I think you will find a 220 ohm.
Note: You know your project better than I do. Your transducer has a maximum pressure of 50 PSI. If you know that all your samples will be under 20 PSI then you know that you output will never reach 20 mA. This will affect you resistor choice.

CapnCrunker:
2.) Shamefully shaky on my high school elec classes, is this what you are suggesting for the complete circuit?

No. I was suggesting something like the attached file.

CapnCrunker:
3.) Final thing, i promise. Any advice on how to get my arduino to have a push to start recording button and then record and save continuous measurements in a neat way as data points to be plotted as Pressure v Time? excel-friendly would be nice....basically I want to hit start and when i hit it again have my code spit out a file of two columns of values, one simply being time values. Guess I need to dig into arduino GUI stuff to make this nice..

I've never done it but some have used an SD interface to log data to an SD card. You can then pull the card out and replace it with and empty one while you carry the card to read on you computer.

Circuit.png

Thanks for answering my questions! Sorry I have not replied yet, have been swamped with other projects.

The only thing that I'm wondering about is in your circuit diagram, wouldn't some of the current output from the sensor be able to escape as voltage to ground through the R1 resistor and therefore not be picked up by the arduino?

If we're on the subject (forgive my disgraceful lack of understanding of basic circuits), why would you have 2 resistors in the first place? Wouldn't one resister and zener going to the arduino and and then to ground be enough?

Thanks a bunch,
C.C.

CapnCrunker:
The only thing that I'm wondering about is in your circuit diagram, wouldn't some of the current output from the sensor be able to escape as voltage to ground through the R1 resistor and therefore not be picked up by the arduino?

Your device has a current output. You need the resistor to translate that current into a voltage.

CapnCrunker:
If we're on the subject (forgive my disgraceful lack of understanding of basic circuits), why would you have 2 resistors in the first place? Wouldn't one resister and zener going to the arduino and and then to ground be enough?

The second resistor is to protect your Arduino. If the voltage ever gets to high, the resistor will limit the current to something that the zener can handle and the zener will save the life of your Arduino. Without the resistor the zener will give its life moments before your Arduino releases it's magical blue smoke.