Sensirion SDP610 -25 Pa to 25 Pa [Not for the faint of heart!]

Hey there!

We’ll I’ve been at this for awhile now.

I’m trying to get Sensirion SDP610, specifically: SDP610-025Pa up and running on a 5V pro Trinket from Adafruit along with a one of their logic level shifters.

Here’s where I am:

  • I have SDL and SCL pulled down with 10k resistors
  • I can poll the sensor at the i2c address
  • I tracked down some code from this forum and I’m able to compile and run. (Thanks to Eduard Iten btw)

Here is where I need a hand:

I’ve attached the three files below as well here is the money maker function where I’m trying to grab the first two values from the sensor, the high and then the low. But the values I’m getting are 255 and 255 (max values for the uint8_t’s) for high and low even when applying pressure/vacuum to either side.

uint16_t SDP6xxClass::readMeasurement(SDP6xxMeasureType type)//new: remove Class

{
    uint16_t value;
//int value = 0;
     uint8_t low, high;
int high16 = 0;

     Wire.beginTransmission(SDP6xxADDR);
//Serial.print(" W.beginSDPadr: ");
//Serial.print(SDP6xxADDR, HEX);
     switch (type) {
     case PRESSURE:
	    Wire.write(MEASUREMENT_PA_HM);
//Serial.print(" Meas-PA-HM: ");
//Serial.print(MEASUREMENT_PA_HM, HEX);
	    break;
     case HUMIDITY:
          Wire.write(MEASUREMENT_RH_HM);
          break;
     case TEMP:
          Wire.write(MEASUREMENT_T_HM);
          break;
     }
     Wire.endTransmission();
//Serial.print(" Wire-end ");
delay(100);
     //wait for measurement to complete.
     timeout= millis()+300;
     while (!digitalRead(18)) {
          if (millis()>timeout) {
               return 0;
          }
     }
     
    
//Serial.print(" wire.Request ");
     Wire.requestFrom(SDP6xxADDR,(uint32_t)3);
//Serial.print(" SDP-ADDR: "), Serial.print(SDP6xxADDR, HEX);
     timeout=millis()+300;
     while (Wire.available()<3) {
          if (millis()>timeout) {
               return 0;
          }
     }
     high=Wire.read();
     low=Wire.read();

Serial.print("high:");
Serial.print(high);
Serial.print("low:");
Serial.print(low); 

high16 = (int)high;
Serial.print(" u16High: ");
Serial.print(high16);
//value = high16 << 8 | low;
     value=(uint16_t)high << 8 | low;
Serial.print(" int-val: ");
Serial.print(value);
     value &= ~0x0003;

Serial.print("  wire-END;");
Serial.println(value);
     return value;
}

I guess my question is: Is this sensor too sensitive?! or am I incorrectly reading the data off of it incorrectly or the dreaded IS BOTH! HA! :slight_smile:

Well thanks for any help/insight you might be able to offer!!

Pete Paul

ardni.ino (252 Bytes)

SDP6xx.cpp (4.22 KB)

SDP6xx.h (2.88 KB)

Welcome on the Arduino forum,

Here’s where I am:

I have SDL and SCL pulled down with 10k resistors
I can poll the sensor at the i2c address
I tracked down some code from this forum and I’m able to compile and run. (Thanks to Eduard Iten btw)

Normally I2C uses a pull up of 4K7, see - Gammon Forum : Electronics : Microprocessors : I2C - Two-Wire Peripheral Interface - for Arduino

First thing to do is to run an I2C scanner to see if the device is detectable and the address is right. There is one on the same page. You might need an UNO for that (never tried on a trinket)