I2C Communications with SSCDANN Pressure Senesor

First off, please forgive me if I'm wrong, I know that this is a sensor related question, but I am having problems with I2C comm, not just the sensor, so I figured it belonged here.

What I am attempting to do is interface this sensor (Safety and Productivity Solutions | Honeywell) with the Wire library, but I cannot get it to respond to my requests.

I am using an Arduino Pro (3.3V, 8 MHz) from sparkfun on a bread board. I have the latest Arduino IDE and have it set to the proper board, but I am still thinking it could be a timing issue. The sensor's address is 0x28 or 40 (DEC), the company provides a few useful documents, which I'll link at the bottom. When I get to school tomorrow I can show my code, but it is basically a slightly modified version (I changed the address and the number of bytes read) of the master_reader example code. I tried sending it a zero first but that didn't help.

PDF Warning

DATASHEET: Safety and Productivity Solutions | Honeywell
APPLICATION NOTES: http://sensing.honeywell.com/hsc%20and%20ssc%20series%20install_digital_50044171-4-en_final_09feb11.pdf
NOTES ON I2C COMM: www.honeywellscportal.com/i2c%20comms%20tech%20note_008201-2-en_final_10feb12.pdf

If anyone can help that'd be great. I know it's kind of generic without my code, and I apologize, I'll post it ASAP, I am just hoping somebody might recognize a common problem in the mean time.

EDIT: Here is my code.

// Wire Master Reader
// by Nicholas Zambetti <http://www.zambetti.com>

// Demonstrates use of the Wire library
// Reads data from an I2C/TWI slave device
// Refer to the "Wire Slave Sender" example for use with this

// Created 29 March 2006

// This example code is in the public domain.


#include <Wire.h>

void setup()
{
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);  // start serial for output
  Serial.println("Probando initialization serial...");
}

void loop()
{  
  Wire.requestFrom(0x28, 2);    // request 6 bytes from slave device #2
  while(Wire.available())    // slave may send less than requested
  { 
    char c = Wire.read();    // receive a byte as character
    Serial.print(c);         // print the character
  }
  delay(500);
}

I don't see any serial prints in your code so how do you know it's not working?

Sorry, I have been working on it for a while, there is a serial print in the actual code. I updated it to relfect the actual code.

  Wire.requestFrom(0x28, 2);    // request 6 bytes from slave device #2

Please explain how the comment matches the code.

Can you tell us what you are seeing on the output?

Absolutely nothing, with this code. the wire.Available never gets triggered. the sensor isn't responding ar all.

// Wire Master Reader
// by Nicholas Zambetti <http://www.zambetti.com>

// Demonstrates use of the Wire library
// Reads data from an I2C/TWI slave device
// Refer to the "Wire Slave Sender" example for use with this

// Created 29 March 2006

// This example code is in the public domain.


#include <Wire.h>

void setup()
{
  Wire.begin();        // join i2c bus (address optional for master)
  Serial.begin(9600);  // start serial for output
  Serial.println("Testing serial...");
}

void loop()
{
  int zero = 0;

    Wire.requestFrom( 0x28, 2 );
    while(Wire.available())    // slave may send less than requested
    { 
      char c = Wire.read(); // receive a byte as character
      Serial.print(c);         // print the character
    }
    delay(500);
}

Normally I would say download a I2C bus scanner sketch like the one here (Gammon Forum : Electronics : Microprocessors : I2C - Two-Wire Peripheral Interface - for Arduino) but it looks like your device does not accept I2C writing, just reading. The bus scanner sketch's typically use the write function to verify the correct address which may not work in your case (of course it doesn't hurt to try).

Other things you should check is that you have the I2C lines connected to Analog pins 4 and 5 and not Digital pins 4 and 5 and that you're using properly sized pull up resistors if the internal ones are not enough.

After closer inspection of the packaging I confirmed my sucspicions. I accidentially ordered the SPI version of the sensor, sorry for wasting your time :slight_smile:

PS: It worked immediately when hooked up as SPI

PS: It worked immediately when hooked up as SPI

I would say that the feedback makes up for "wasting" our time. Thanks.