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:
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