problem getting SHT15 to work

Hi,

I've got a problem getting an SHT15 temperature/humidity sensor getting to work properly. I've soldered short wires to the little breakout board (sparkfun) and am using the library from http://www.arduino.cc/playground/Code/Sensirion. I've checked all connections and as far as I can tell they're allright. However when using the non-blocking example from the page above I get:

Error: CRC mismatch! Status reg = 0xFF Error: No response (ACK) received from sensor! Error: CRC mismatch! Status reg = 0xFF Error: CRC mismatch! Error: CRC mismatch! Temperature = 2581.30 C, Humidity = 0.10 %, Dewpoint = 265.37 C Error: CRC mismatch! Error: CRC mismatch! Temperature = 2581.30 C, Humidity = 0.10 %, Dewpoint = 265.37 C

Most of the time at least. Sometimes I do get a sensible reading (the 'error: crc mismatch' is gone then) and once I got a whole list of readings without any errors. But this happened only once and I cannot reproduce it. Sometimes I also get the message: 'Error: No response (ACK) received from sensor!"

I've already replace the wires, used different pins, fiddles with the contacts and read all I could find on the forums. However, I wasn't able to find any pattern yet.

Does any one have any idea what might be the problem or what I could try further? At this point I'm tempted to buy another sensor to see if that makes a difference, but they are a bit expensive to buy them just for that purpose alone.

Any help is appreciated! Thanks!

Olaf

The first thing the example program does is:

  sht.readSR(&stat);                     // Read sensor status register
  Serial.print("Status reg = 0x");

That is failing:

Error: CRC mismatch!
Status reg = 0xFF

I think this means that your wiring is incorrect. The breakout board has four wires:

VCC ← 3.3v or 5v (probably 5v if you want to use it with a 5v Arduino)
DATA <-> Pin 2
SCK ← Pin 3
GND <-> GND

Did you have any success with the non-blocking example? It’s a little simpler.
I’ve occasionally found problems with these sensors. You can have problems if you query them too quickly. I usually try to wait at least 5-10 seconds or more between readings.

I think Vcc needs to be 5 volts for the sht15.

-transfinite

transfinite: I think Vcc needs to be 5 volts for the sht15.

The data sheet (http://www.sensirion.com/en/pdf/product_information/Datasheet-humidity-sensor-SHT1x.pdf) gives VCC as: Minimum: 2.4v, Typical: 3.3v, Maximum: 5.5v with a footnote saying that it was calibrated at 3.3v so that is the best voltage for accuracy.

Thanks for your reactions! I checked all connections once more, but they seem to be fine. I even checked the connection from the board to the sensor itself with a multimeter (voltage on sensor 5.0V, resistance from sensor to board on data and clock 6ohm, but I don’t have probes that small so I suppose it means they’re connected).

Before the 3.3v <-> 5.0v remark I was using 3.3v as I read on the specs that 3.3v is best for the sensor, but I didn’t check whether the arduino can handle these lower signals. Anyway, switching to 5.0v didn’t help. As a matter of fact I now get:

Error: No response (ACK) received from sensor! (followed by bogus readings)

As if the wires aren’t connected at all :frowning:

@transfinite: yes, I also tried the other sketch. It returns all values zero, so that’s why I used the non-blocking in the first place: it has the error codes. BTW the sensor is polled every 5 seconds, so that should be fine.

So unfortunately no working sensor yet…

Thanks anyway, Olaf

Well, I learned something from this thread. I need to try the sht15 at 3.3 Vcc and see if it the results are different than at 5VDC. I guess I should read the data sheet more carefully.

I can attest that the Sensirion library works well. If you are confident in your wiring, then it seems like you have a defective part.

-transfinite

so the library is ok too, hm…

that adds up to:
the library is ok
the code is ok
I replaced the wires once, the chance that they’re bad twice is very small
I checked and rechecked the connections, and measured them, so unless I really need more (less?) coffee they’re ok too
I’ve tried multiple pins on my Arduino (including ones that I know are ok from other hardware), so they’re not the problem
I’ve used both 3.3 and 5.0 V on the sensor, didn’t matter either

I guess the only option left is order another sensor and see (hope…) that helps :~ (And next time I’ll check if the 5v arduino can cope with a 3.3V sensor before connecting…) It may take a while before I can get a new sensor, but I’ll post an update by then.

Thanks again! Olaf

Were you able to get your sensor working? I've used a number of these sensors (10+) and not run across a bad one yet. The longest wiring I've tried is about 2 feet / 60 cm. You are certain the pin numbering in the sketch matched your wiring?

Regarding 5V vs. 3.3V: The "D1" constant the library uses for temperature calculations is specifically for 5V operation. You'd need to change that if you use a different voltage (see the datasheet). I haven't experimented with this but doubt it is worth running the sensor at anything but 5V with a 5V Arduino.

No, unfortunately I wasn't. I rechecked everything once more and then concluded that my best option is buying another sensor. But considering you're mileage it might be worthwhile to have another go at it. I did go on a short holiday in the mean time so I might be able to have a fresh look at the project anyway 8)

I'll keep this topic updated!

Olaf

ps. thanks for the voltage explanation!

You've included the required pull-up resistor on the data line?

:astonished: required pull-up? :astonished:

I had no idea I had to use one on the data line... I'll definitely try that, thanks! 10k/20k will do?

The Sparkfun breakout appears to already have a pullup on data (and a pulldown on clock for some reason). It also has a bypass cap on Vcc so it should be in good shape given reasonably short wires.

Agree with cjands40 (I had not looked at the SparkFun breakout board to see that it included pull-ups). I see a lot of questions regarding various humidity sensors, most of which required a pull-up on the data line in their spec sheet.