In the playground, the author says: "Note: the Sensirion data sheet recommends using a 10K ohm pullup - the Arduino internal pullup ranges from 20K to 50K ohms."
Using the example sketch ReadSHT1xValues, I started with the 10k pullup resistor as the datasheet instructed, and tried w/o it thinking that this was what was being suggested in the above quote. I got the same results on both tries.
This example code is said to be for the SHT10, but I think it should work for both. I've used the other examples out there, and have been met with the same results. I will attach them as well. I should also mention that I have edited some functions and variable names in the .cpp and .h source files. Instead of temperature, there is temp_c_indoor; getTemp is now calcTempC; calcDewpoint is now calcDewpointC. I also added the variable temp_f_indoor, and the functions calcTempF and calcDewpintF. I'll attach them here as well, and follow up with a picture of the circuit.
The images should illustrate that I have set this up as indicated in the datasheet for the SHT15.
/*
Query a SHT10 temperature and humidity sensor
A simple example that queries the sensor every 5 seconds
and communicates the result over a serial connection.
The error checking section of code in the non-blocking example yields:
Error: No response (ACK) received from sensor!
Status reg = 0xFF
Error: No response (ACK) received from sensor!
Error: No response (ACK) received from sensor!
Status reg = 0xFF
Error: No response (ACK) received from sensor!
Error: No response (ACK) received from sensor!
Temperature = -40.10 C, Humidity = 0.10 %, Dewpoint = -90.17 C
Error: No response (ACK) received from sensor!
Error: No response (ACK) received from sensor!
Temperature = -40.10 C, Humidity = 0.10 %, Dewpoint = -90.17 C
Error: No response (ACK) received from sensor!
Error: No response (ACK) received from sensor!
Temperature = -40.10 C, Humidity = 0.10 %, Dewpoint = -90.17 C
Error: No response (ACK) received from sensor!
Error: No response (ACK) received from sensor!
Temperature = -40.10 C, Humidity = 0.10 %, Dewpoint = -90.17 C
Error: No response (ACK) received from sensor!
Error: No response (ACK) received from sensor!
Temperature = -40.10 C, Humidity = 0.10 %, Dewpoint = -90.17 C
There may be a bad connection on the sensor shield. When I checked for voltage on the SCR lead, I got nothing. When I put the jumper from the 2 pin directly to that lead I get:
Error: CRC mismatch!
Error: CRC mismatch!
Temperature = 2581.30 C, Humidity = 0.10 %, Dewpoint = 265.37 C
My soldering work, and that of the shield look fine so I'm not sure what the deal is here.
Regardless, even with the connection working I get an error.
Try shortening the leads from microcontroller to the SHT15, and run ground wires parallel to both SDA and SCL signals - these are high-speed logic signals and should be kept short and low-inductance to avoid crosstalk and ringing. You have 4k7 pullups on each?
I have a 10k pullup on the SCK line, the datasheet doesn't call for one on the data line. I can try that and the other hints you mentioned just as soon as I get a new Arduino board...my FIO/XBEE set up refuses to take new sketches and just keeps pumping out serial com from the previously uploaded sketch.
The upload error shown in the IDE: avrdude: stk500_getsync(): not in sync: resp=0x00
I've tried everything from re-configuring the radios to sending +++@. The FIO has been nothing but trouble from day 1. Manual reset fails as well.
If in doubt, pull them up anyway, a 4K7 resistor only adds 1.0... mA to the load and on an Arduino digital pin that is not much additional current. For longer wires the pull-ups can go as low as 1K at faster speed/longer wires between sensor and Arduino.
Isn't a pullup supposed to reduce the amount of voltage going to the data pin? My multi-meter is telling me that the data pin on the sensor is receiving 3.5V, and the SCK is is fluctuating between 15 and 25 mV.
Edit: the SCK reading happened without me realizing that the 3.3V jumper had fallen out of the board. Both were approximately the same (3.5V). Is the pullup supposed to go to Vin? I'm not an electrical engineer obviously, but it seems to make more sense to run it to ground.
The datasheet doesn't specify a pullup for both, only the DATA line. However, I have one on both for the voltages mentioned above.
Obviously, I'm still getting the same println() results.
Are you trying to interface a 3V3 device directly to the 5V Arduino? You must provide a level shifter from 3V3 to 5V and back. That you are measuring 3V5 on a 3V3 input/output pin is an indication of a defective measurement or it is an indication of an interface problem. Note that the 3V3 source cannot sink current... a 4K7 resistor from 5V to the 3V3 source will pull it up to about 4.8 volts... From my recent direct experience with a Bosch BMP085 Barometric Sensor and this would be the cause of no apparent data... There is none yet. the level shifter can be 2 2N7000 mosfets and 2 pull-ups to 3V3 as well as the 2 to 5V. Mine worked well.
This sensor will work with 3.3V or 5V as Vcc. I'd had good results with both. I've used both libraries, but I've had better results with the Sensirion library. I'm mostly using version 22 of the Arduino IDE.