Honeywell barometric pressure sensor (I2C): diagnostic condition???

I just got a digital Honeywell barometric pressure sensor, using I2C communication (SSCSRNN1.6BA7A3). When I connect it to my arduino, I can communicate with it, but I always get an error response, although the data seems correct. I can't find any information on how to troubleshoot this, I don't even know what is going wrong.
See attached png/pdf for a wiring schematic and data sheets.
Anyone can shed some light on this?

My sketch:

#include <Wire.h>

#define SSC_PRESSURE(v) (float(v) * 1.6 / 16383)
#define SSC_TEMPERATURE(v) ((float(v) / 2047) * 200 - 50)

uint8_t address = 120;

void setup() {
Serial.begin(9600);
Wire.begin();
}

void loop() {
uint32_t result;
uint8_t v1, v2, status;

Wire.requestFrom(address, (uint8_t) 4);
if(Wire.available()) {
v1 = Wire.read();
v2 = Wire.read();
status = v1 >> 6;

switch(status) {
case 0:
Serial.println("Good data.");
break;

case 1:
Serial.println("Command mode.");
break;

case 2:
Serial.println("Stale data.");
break;

default:
Serial.println("Diagnostic condition encountered.");
break;
}

result = (((uint32_t) (v1 & 0x3f)) << 24) | ((uint32_t) v2 << 16);
v1 = Wire.read();
v2 = Wire.read();
result |= ((((uint16_t) v1) << 8) | v2) >> 5;

Wire.endTransmission();

Serial.print("P: ");
Serial.println(SSC_PRESSURE(result >> 16));
Serial.print("T: ");
Serial.println(SSC_TEMPERATURE(result & 0x0000FFFF));
}

delay(5000);
}

And it's output:

Diagnostic condition encountered.
P: 0.97
T: 21.13

I2C Comms Digital Output Pressure Sensors_TN_008201-3-EN_Final_30May12.pdf (212 KB)

sensor.png

honeywell-sensing-ssc-digital-silicon-pressure-sensors-productsheet-1.pdf (1.14 MB)

The first link doesn't return me a valid data sheet... So any real advice is there... The device is a 3V3 bus Do you have a level shifter installed between the Arduino and the sensor. It won't work without the translation from 3V3 to 5V. There are many solutions for this issue. NXP (Phillips) has an app note that deals with this subject. I've attached it for your reading. Adafruit has a solution as well as Sparkfun.. But they are about $3.00 - 6.00 Ea this one cost me $.50 to implement (2 2N7000 Mosfets).

Bob

AN10441.pdf (52.4 KB)

In most cases 3V3 I2C devices work well with a 5V Arduino without a level shifter. This is because 3V3 is above the 2V7 that is the (theoretical) minimum for a 5V ATmega to detect a logical high. So with the given circuit it should work, although you should change the pull-ups to 2k7, else you might damage your device or Arduino because in the communication they have to sink to much current.

Anyone can shed some light on this?

In chapter 2.4 (page 2) of the datasheet the diagnostic condition is defined. It seems that the internal EEPROM has changed for some reason. In the datasheet there's no information about how this can be corrected. You either have to live with this situation or contact Honeywell for more information.

Thanks for the reply. I'm quite new to electronics, so basically I'm just messing around, reading datasheets and trying to get things to work from there.

  1. I thought that using pullups to 3.3V (instead of 5V) were enough to make this work, as can be seen in the attached schematic.
  2. About the 2K7 resistor: I started out with a 5.xK resistor, with the same results. In the datasheet it said to use 1K resistors... So if I just use higher value resistors, will I damage the chip?
  3. I also have 2 other honeywell sensors (humidity, and plain temperature, both also 3.3V), they both work flawlessly, so I suppose the pressure sensor is more sensitive to this...

I reuploaded the datasheet.

  1. I thought that using pullups to 3.3V (instead of 5V) were enough to make this work, as can be seen in the attached schematic.

This is a correct assumption in most cases.

  1. About the 2K7 resistor: I started out with a 5.xK resistor, with the same results. In the datasheet it said to use 1K resistors... So if I just use higher value resistors, will I damage the chip?

1k is the absolute minimum resistor value for a 3V system (according to the I2C specification), so it's too small for a 3V3. Although most devices probably work under such circumstances you cannot really expect it.

Are your values correct? Have you checked that? If you you probably can just ignore the status value of diagnostic condition.

Ok, so I made a tiny mistake: the first resistors I use were 3.9K. Anyway, No matter what kind of resistors I use (I tried 1K, 3.9K, 4.7K, 10K, even 100K), things stay the same... Always the diagnostic code...

I do notice that using higher valued resistors, the temperature reported by the pressure sensor and an independant temperature sensor get closer together. This morning they were +- 1.2°C apart, now with 10K resistors only 0.1°C, with 100K resistors max 0.05°C. I find this a bit puzzling because I was thinking: the pressure sensor gets a little bit too much power, so probably it heats up inside, giving a reading which is a bit higher, but now the temperature sensor gives the same results... Weird.

Well I suppose that's why one would go to school for 5 years to become an electronics engineer (instead of just reading a couple of datasheets =)...

I did send a message to honeywell, requesting info on this problem, but I haven't gotten an answer yet (if I ever will). If it works like this, that's good enough for me. I will try the level shifting thingie, but I don't have any mosfets right now, so that's for the future.

Thanks for your help!

Ok, so I made a tiny mistake: the first resistors I use were 3.9K. Anyway, No matter what kind of resistors I use (I tried 1K, 3.9K, 4.7K, 10K, even 100K), things stay the same... Always the diagnostic code...

I didn't expect that to change by changing the pull-ups.

I do notice that using higher valued resistors, the temperature reported by the pressure sensor and an independant temperature sensor get closer together. This morning they were +- 1.2°C apart, now with 10K resistors only 0.1°C, with 100K resistors max 0.05°C. I find this a bit puzzling because I was thinking: the pressure sensor gets a little bit too much power, so probably it heats up inside, giving a reading which is a bit higher, but now the temperature sensor gives the same results... Weird.

This is not so weird. The lower the resistor, the higher the current that is sinked inside the chip. The majority of that current is transformed into heat which warms up the chip. Because the pressure is temperature dependent (that's why there's a temperature sensor inside to compensate) both values change a bit. 1.2° with a 1k resistor, with a 4k7 you probably get about the same difference as with the 10k. Is your comparing sensor precise enough for 0.05°C?

I will try the level shifting thingie, but I don't have any mosfets right now, so that's for the future.

I think you can save that time. You can communicate with the device and the level shifter does nothing better, in contrary, you might get new problems.

I didn't expect that to change by changing the pull-ups.

Me neither, I just thought I'd mention it.

The lower the resistor, the higher the current that is sinked inside the chip.

Yes, that's why I find it weird: the higher the resistor value, the higher the reported temperature (on the pressure sensor, the temperature sensor always gives +- the same result).

Is your comparing sensor precise enough for 0.05°C?

No it is not. It's only accurate to 0.5°C. I was just reporting the returned values...

I think you can save that time. You can communicate with the device and the level shifter does nothing better, in contrary, you might get new problems.

Ok. I'll keep that in mind. But one arduino will not be enough (I need +- 10 sensors, some relays, ethernet, SD, maybe some stuff I haven't thought of yet... so 30K memory might be a bit small: last compile was 28K, maybe I should drop the logging...). So I was thinking of linking 2 or 3 together, probably also using I2C, so I will need a 3.3V and a 5V I2C connection (I think). Any other problems that will arise, I'll deal with at that time.

I got a reply from Honeywell: they sent me the datasheets I attached in the first post !? So I'll try that again. I would like this to work the way it was intended...

so I will need a 3.3V and a 5V I2C connection

Why? All the connected devices pull the bus lines to GND if necessary and let the pull-ups pull it to 3V3 in the case of a logical high. All Arduinos will recognize 3V3 as a logical high, so there is no need to use a higher (5V) voltage bus.

Yes, that's why I find it weird: the higher the resistor value, the higher the reported temperature (on the pressure sensor, the temperature sensor always gives +- the same result).

You didn't mention in which direction the offset was, so I was assuming that the internal temperature sensor in the pressure sensor was delivering a higher value with a lower pull-up resistor.

Why? All the connected devices pull the bus lines to GND if necessary and let the pull-ups pull it to 3V3 in the case of a logical high. All Arduinos will recognize 3V3 as a logical high, so there is no need to use a higher (5V) voltage bus.

Good to know.

You didn't mention in which direction the offset was, so I was assuming that the internal temperature sensor in the pressure sensor was delivering a higher value with a lower pull-up resistor.

Sorry, that was a bit unclear.

I replied to the mail I got from Honeywell, asking them for more info. We'll see what they come up with...

Ok. After a few mails with Honeywell: "There was an ASIC problem for a short time that led to this sort of problem. It was quickly resolved but there is the chance that you have an affected part."
So the chip is corrupt... They will send a new one.

Thanks anyway for your help.