Go Down

Topic: Honeywell Gauge Pressure sensor (Read 3314 times) previous topic - next topic

PC90

Hi,

Im trying to wire up and code a Honeywell gauge pressure sensor to an uno as part of my final year collage project. Does anybody have any experience with using such a pressure sensor? I have attached an image of the sensor and datasheet. Any replies would be greatly appreciated  :)

retrolefty


Hi,

Im trying to wire up and code a Honeywell gauge pressure sensor to an uno as part of my final year collage project. Does anybody have any experience with using such a pressure sensor? I have attached an image of the sensor and datasheet. Any replies would be greatly appreciated  :)


Looks pretty simple to use with an arduino. Just wire the devices ground to arduino ground pin, device +5vdc pin to arduino 5v pin, and devices signal output to a arduino analog input pin. Then you can use analogRead() commands to convert the reading to a digital value you can use in your sketch.

Lefty

PC90

Hi Lefty Thanks for the quick reply,

Im using the arduino for just a small aspect of my project so I would only be a novice when it comes to programming so please bear with me.
Ive used the following code but seem to be getting very fluctuating readings:

int analogPin = 2;     //  connected to analog pin 2
                       // outside leads to ground and +5V

int samples[8];
int i;
int pressure=analogRead(analogPin);


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

void loop()
{
  for (i=0;i<=7;i++){ // gets 8 samples of pressure
  pressure = analogRead(analogPin);    // read the input pin 

  long pressure = 950 + pressure / 8.5;  //convert it to milli bars
  Serial.print("\t pressure = ");
  Serial.print(pressure);   // print the pressure
  Serial.println(" mb");
 
 
  delay(5000);   // wait 5 second before next sample
     
}


An example of my reading would be it would start at a value of say 750mb, then go 0mb..0mb then when I apply pressure using a syringe it would jump up to 1bar,But then go 0mb..0mb then 1bar etc.

retrolefty

I'll let more knowlegable software types comment on your sketch. However it doesn't seem correct to have two variables used both named pressure, one a int and global in scope and the other defined as a automatic variable inside loop() as a long variable and then both used in the same expression:

long pressure = 950 + pressure / 8.5;  //convert it to milli bars

I'm suprized that doesn't generate some kind of compiler error, but again I'd rather a software guru type comment on that.

Lefty

Hello

Im a bit of a noob myself but..

"int analogPin = 2;     //  connected to analog pin 2"

On the Uno I thought Analog Pin 2 was represented by A2 in the compiler, the digital pins are 0-13, The Analogs being A0, A1, A2, etc




thewknd

there are several pressure range listed in the datasheet, check the right values for Null and Sensitivity on page 32

sample code, not tested
Code: [Select]

#define ADC_HONEYWELL 2 // Arduino analog pin

const float Null = 0.50; // Null VDC; datasheet Page 32
const float Sensitivity = 266.6;  // Sensitivity mV/psi; datasheet Page 32

void setup() {
  Serial.begin(9600);
}
void loop() {
  Serial.print("P: ");
  Serial.print(getPressure());
  Serial.println("mbar g");
  delay(5000);
}

float getPressure(void) {
  float pressurePSI,pressureMBAR,pressureVDC;
  int pressure;
 
  pressure = analogRead(ADC_HONEYWELL);
  pressureVDC = (float)pressure * 0.0048828125; // (5/1024 = 0.0048828125)
  pressureVDC = pressureVDC - Null;
  pressurePSI = pressureVDC / Sensitivity * 1000;
  pressureMBAR = pressurePSI * 68.948;
 
  return pressureMBAR;
}
duemilanove / OSX & WIN
Arduino & Teensy: http://bit.ly/13rbdtQ

PC90

Thank you so much for the help! Got it to work perfectly

Arizanov

Hi can you reattach
I have SB69-100V
0...100 psig
0.5....4.5 V out
Can i connect directly to arduino without resistor 

retrolefty


Hi can you reattach
I have SB69-100V
0...100 psig
0.5....4.5 V out
Can i connect directly to arduino without resistor   


Given that minimum information, yes it can be wired to an arduino analog input pin. A datasheet listing would be nice to confirm.

Lefty

Arizanov

http://www.fullgauge.com/PDF/PCT-400.pdf
This is a controller + pressure transducer
for him don`t have datasheet 
But have SCHEMATIC FOR TRANSDUCER
Brown: 5Vdc
Green: Ground
White: Output



retrolefty


http://www.fullgauge.com/PDF/PCT-400.pdf
This is a controller + pressure transducer
for him don`t have datasheet  
But have SCHEMATIC FOR TRANSDUCER
Brown: 5Vdc
Green: Ground
White: Output





Again, given what you have shown it should be OK. I would suggest you first power up the sensor independently and apply pressure tests to the sensor while measuring the output signal with a digital multimeter. If you see no signal higher then +5vdc then you should be good to go.

Lefty

Go Up