pylon:
I guess you should change the way you're heating up that poor little sensor. Probably the chip overheats before the heat reaches the temperature sensing element. The metal tab is ground connected and most probably not meant to be heated that way.
ok I heated it really slowly with air each reading is .5sec apart
24 C
24 C
24 C
24 C
24 C
24 C
23 C
24 C
24 C
23 C
23 C
23 C
24 C
25 C
27 C
29 C
28 C
28 C
27 C
27 C
27 C
27 C
27 C
27 C
27 C
27 C
28 C
29 C
29 C
30 C
31 C
33 C
34 C
35 C
37 C
39 C
40 C
41 C
40 C
40 C
39 C
39 C
38 C
38 C
40 C
40 C
41 C
41 C
42 C
42 C
42 C
42 C
42 C
42 C
42 C
42 C
42 C
42 C
42 C
42 C
42 C
42 C
44 C
44 C
44 C
45 C
45 C
45 C
45 C
45 C
46 C
46 C
47 C
47 C
47 C
47 C
47 C
47 C
47 C
47 C
47 C
46 C
46 C
46 C
46 C
46 C
45 C
46 C
46 C
46 C
46 C
46 C
46 C
45 C
46 C
46 C
46 C
46 C
47 C
47 C
47 C
47 C
47 C
47 C
48 C
48 C
48 C
48 C
48 C
48 C
48 C
49 C
49 C
49 C
49 C
49 C
49 C
50 C
50 C
50 C
51 C
51 C
51 C
50 C
50 C
51 C
51 C
51 C
51 C
51 C
51 C
52 C
51 C
52 C
51 C
51 C
51 C
51 C
51 C
50 C
51 C
51 C
51 C
51 C
51 C
52 C
52 C
51 C
51 C
50 C
50 C
51 C
51 C
51 C
51 C
51 C
51 C
52 C
52 C
52 C
52 C
53 C
52 C
52 C
53 C
-1 C
-1 C
-1 C
-1 C
54 C
-1 C
-1 C
53 C
53 C
52 C
52 C
52 C
51 C
51 C
50 C
50 C
50 C
49 C
50 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
-1 C
53 C
-1 C
52 C
52 C
52 C
51 C
51 C
51 C
51 C
50 C
50 C
50 C
49 C
49 C
49 C
49 C
48 C
48 C
48 C
49 C
49 C
50 C
50 C
51 C
50 C
50 C
51 C
51 C
52 C
52 C
52 C
53 C
53 C
53 C
52 C
52 C
52 C
-1 C
-1 C
-1 C
53 C
52 C
52 C
51 C
51 C
50 C
50 C
50 C
49 C
49 C
49 C
49 C
48 C
48 C
48 C
47 C
47 C
47 C
47 C
46 C
46 C
46 C
45 C
45 C
45 C
45 C
45 C
44 C
44 C
44 C
44 C
43 C
43 C
43 C
43 C
43 C
42 C
42 C
42 C
42 C
42 C
41 C
41 C
41 C
41 C
41 C
41 C
40 C
40 C
40 C
40 C
40 C
39 C
40 C
39 C
39 C
39 C
I just have a feeling that it is code related, maybe the number coming in is just to big?? something along those lines?
Nick Gammon is (once more) right, the sensor stops replying to your requests at about 50°C. This doesn't look like it's a software problem, looks more like a hardware thing. Can you make a photo of your hardware setup including the wiring to the sensor?
pylon:
Nick Gammon is (once more) right, the sensor stops replying to your requests at about 50°C. This doesn't look like it's a software problem, looks more like a hardware thing. Can you make a photo of your hardware setup including the wiring to the sensor?
well this is not the only problem ive run into with this code and sensor, when the temp goes below 32f 0c it starts back at 255 and goes down.
the only thing I see that could be wrong is either the data coming in, the sensor(ive tried 3) or the code. if I post a picture of the data lines on my ociloscope would that be helpful?
Or is there any other temp sensors that work with a arduino that come in the to-220 package?
Thanks so much for the help
With such a setup if you heat the sensor you're heating the surroundings too. Maybe you loose some contact starting at a specific temperature. Solder some 30cm wires to the sensor and try again, maybe that changes something.
when the temp goes below 32f 0c it starts back at 255 and goes down.
The you have changed the type of the temperature value to an uint8_t without telling us. The int8_t cannot hold 255, it's range is -128 to 127. 255 is equivalent to -1 so your sensor was right in that aspect.
pylon:
With such a setup if you heat the sensor you're heating the surroundings too. Maybe you loose some contact starting at a specific temperature. Solder some 30cm wires to the sensor and try again, maybe that changes something.
when the temp goes below 32f 0c it starts back at 255 and goes down.
The you have changed the type of the temperature value to an uint8_t without telling us. The int8_t cannot hold 255, it's range is -128 to 127. 255 is equivalent to -1 so your sensor was right in that aspect.
my original code used int not int8_t
I will solder up some wires soon
Did anyone ever find a solution to this problem? I was having a similar problem but at 25C. I'd have been perfectly happy, at the time, to be able to get up to 50C but 25 was my max before I started getting data errors on the I2C bus. I do happen to be running a 3.3V TC74 on an Arduino Duemilanove instead of the 5V version.
I was able to solve my problem by using larger pull-up resistors (Rp) on the I2C bus. I was using Rp's of 1.8K to start with, because they were handy at the time, but I switched to 15K and my problems went away.
So, to throw a monkey wrench, I removed the Rp's altogether. It still works fine. The wave form of the I2C looks pretty bad, but it still works.
I guess the main thing to consider here is that the slave device has to sink some current during the ACK for each command. This current is set by the Rp's. If the current is too high, the device may not be able to properly ACK that the command was received and bus errors will occur.
I have some screen shots of scope traces here for pullup resistors:
1.8K sounds a bit low to me. Typically 4.7K is recommended. However the exact values would depend on things like wire run lengths and cable capacitance.