Problems Communicating with Honeywell HSCSANN150PG2A3 with Arduino Due using I2C

Hello,

I am trying to read pressure values from a Honeywell HSCSANN150PG2A3 using an Arduino Due. Right now my output to the serial monitor is an always either 6 or 134 in an there values returned seem to be almost random, as best as I can tell.

Right now I have ground connected to the first leg of the sensor, 3.3V connected to the second leg, SDA connected to the third leg, and SCL connected to the fourth leg. Everything is connected directly. (There is a picture of the sensor with the legs labeled on page 25 of the data sheet) If I understand correctly the Due SDA and SCL have internal pull-up resistors. So, I think this setup should be correct.

Here is my code:

// Arduino Due
// This script will get pressure values from a Honeywell HSCSANN150PG2A3 pressure sensor

// Include Wire I2C library
#include <Wire.h>

const int Pressure_Sensor_Address = 40; // 0x28 in hex

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

  // Create a wire object
  Wire.begin();
}

void loop() {
  // Start talking with pressure sensor
  Wire.beginTransmission(Pressure_Sensor_Address);
  // Ask for registor zero
  Wire.write(0);
  // End transmissor
  Wire.endTransmission();

  // Request 1 byte from address
  Wire.requestFrom(Pressure_Sensor_Address, 1);
  // Wait for response
  while(Wire.available() == 0);
  // Get pressure and read it into variable
  int c = Wire.read();

  // Print value
  Serial.println(c);

  delay(1000);
}

I am thinking I must be getting the data incorrectly or it needs to be interpreted somehow, but I can't seem to figure it out from the data sheet. Maybe I am asking for the wrong register or I need to request more bytes. I tried messing around with this, but it did not seem to help.

Here is the url of the data sheet: Safety and Productivity Solutions | Honeywell

Thank you! Any help is greatly appreciated.

Have a great Thanksgiving.

There's nothing in that data sheet about how to use the device with I2C.

Pete

Thanks for the help.

I thought it seemed a little weird that there was not much information on how to set up the I2C. I could just find the address (0x28) and a little more, but because I am not very familiar with getting all the I2C data from datasheets I assumed I must have just been missing it.

The device is definitely I2C, right? On page 13, it says the output of the device is I2C. If the datasheet is not sufficient, do you think I should try to contact Honeywell and see if they can give me the information?

Thanks for the help!

[Edit] I think I found the datasheet with I2C. Here it is: Safety and Productivity Solutions | Honeywell I will try to understand this and get back when I have either figured it out or hit a roadblock. Thanks for the help, Pete. I just assumed all the info was in the same datasheet.

Try this version of the loop function. The datasheet implies that the sensor sends 4 bytes. This will try reading them and printing each one in HEX.

void loop() {
  // Start talking with pressure sensor
  Wire.beginTransmission(Pressure_Sensor_Address);
  // Ask for registor zero
  Wire.write(0);
  // End transmissor
  Wire.endTransmission();

  // Request 4 bytes from the sensor
  Wire.requestFrom(Pressure_Sensor_Address, 4);
  for(int i = 0;i < 4;i++) {
    int c = Wire.read();
    Serial.print(c,HEX);
    Serial.print(", ");
  }
  Serial.println();

  delay(1000);
}

Pete

This seems to work. Thanks so much!