SIK circuit #7 : trouble with temperature sensor readings

Hello!

(english it’s not my mother language. Please forgive any posible syntax errors)

I don’t know why I’m getting wrong readings from the temperature sensor when I execute this circuit from the Arduino SIK. Maybe there is something wrong with the code, but after several tries I still can’t figure out.

Here is what happens:

  • The example temperature in the manual: for a reading of 0,73 voltage it states 22,75 ºC

  • The readings I’m getting: for a reading of 0,55 volt. it states 4,59 ºC

The average temperature that day in my city that day was 18 ºC, and the sensor keeps telling me in my room we are 4,59 ºC

The circuit was well setted (I triple checked).

I noticed that if I plugged the USB cable from the Arduinto to my computer with a hub it read less voltage than normal. If I plugged it directly to one of the USB ports of my computer the readings gets something more beliveable. But still the conversion form voltage to Celsius seems unreal.

Do you think It can be any mistake with the code?

Any ideas?

thanks a lot for the feedback. This is my first post in the forum. Normally I find my way around similar problems, though I’m learning from scratch, but I hitted a real wall with this one.

best regards

DANI SIMON (Alicante, Spain).

I’ll assume you’ve triple checked the wiring as well. And that the device is actually the temperature sensor and not something else that’s in a TO-92 case. Does the reading change at all with temperature ? If you heat it up with a hair dryer or cool it with something out of the freezer, does the printout change ?

yes, it reacts when I heat it or cool it, but the readings continue to be extremly low (or extremly different to what the temperature in my city are at the moment). And yes, the wiring is ok and I’m using the temperature sensor :slight_smile:

thanks for answering.

All I can suggest is that you measure the supply voltage with a DVM right at the sensor itself. Might as well measure the output voltage as well. If you don’t have a DVM you should go buy one. For less than $20 even a most basic version is about the most useful tool you’ll ever have in electronics. If the supply is 5V and the output is still too low then the part is bad.

If the output changes when heated or cooled I suggest you check the reference of your ADC. The sensors output is independent of the power supply as long as it is between 2.7v and 5.5v. The output should be 10mv per degree C; the problem is usually in the calculation of the input of the ADC. The Arduino uses a 10 bit ADC so you must convert the output to volts. To convert to volts you need to divide the reference of the ADC by 1024 i.e. 5/1024, 3.3/1024, 1/1024. This will give you the voltage value of each ADC count which can be used to calculate the temp.

Hi,

I’m just starting out with the SIK today and came across the same issue with circuit #7.

I checked the temp sensor data sheet and it aligned with the instructions (+,0,- pins in the same order) so no problem there. I was getting readings around 1 or 2ºC at normal room temp 21ºC. I then switched the wired connections from the sensor so +pin went to GND and -pin went to 5V.

The serial monitor showed the correct temperature in ºC and ºF, HOWEVER, the temp sensor started smelling burnt and when I pulled it out I got a small shock(!) and the sensor was hot. So although the serial monitor readings were right, this didn’t seem like the right solution.

I tried various ADC (Analog-Digital-Converter) conversions suggested by GlennNickelson, but they didn’t work either. The fact it displayed the right temperature with the wrong wiring connections seems weird to me.

I changed the sketch line below from

return (analogRead(pin) * 0.004882814); // This is equivalent to 5/1024

to

return (analogRead(pin) * 1); // If understand right this should give readings in the range of 0-1023

This gave me an a reading of around 90 at known ~21ºC. According to the data sheet for TMP35 the scale factor is 10°C ≤ TA ≤ 125°C, 10mV/ºC, which means a range of 115ºC.

So I did a kind of backwards work around;

Assuming

MIN voltage reading is 10ºC (as per data sheet minimum) and 0 at ADC

MAX voltage reading is 125ºC (as per data sheet maximum) and 1023 at ADC

I just interpolated between the two values to get an equation of the line (in excel).

So I changed the following line of code (keeping the line above multiplied by 1) from

degreesC = (voltage - 0.5) * 100.0

to

degreesC = (voltage * 0.1122) + 10 // equation of a straight line is y = mx + c

and I thought it worked as the room temperature readings looked about right…

… But after that I held the temp sensor to warm it up, and the voltage reading went down, not up. So back to square one and the original fix, which resulted in an overheating sensor. Any ideas?

I’ll assume you’ve triple checked the wiring. I wonder if there isn’t an occasional screw-up in the kitting of the parts. Just recently there was someone who got a TMP36 in place of the temp sensor that was called for. Can you confirm that the part in question is a TMP35 ? Or if you can’t, post a clear picture of the device with the markings legible ?

I had the same issue, it was an easy fix.

remove the extra wiring, send the positive and negative directly to the arduino (bypassing the positive and negative buss on the breadboard)

Basically, use only three wires… then mine was perfectly accurate

I know this is an old thread but am giving this a try. The fix you describe involves reducing the 5 wire plan as documented, to 3 wires, in order to get accurate temperature readings. I have broken what you are proposing down into specifics below but need confirmation that these steps are correct, as well as more detail.

STEPS:

  1. Currently documented green wire from j6 to A0 stays where it is (the signal wire)

  2. The TMP35 that is seated in f5,f6,f7 as currently documented stays where it is

  3. Remove the wire that went from j5 to - on the breadboard

  4. Remove the wire that went from j7 to + on the breadboard

  5. How does one connect the (positive and ground, the outside legs) of the TMP35 directly to the ardrino without using the breadboard? Do we extend the little connection legs of the TMP35 somehow, and where on the ardrino do they go?

To be clear, this is for the problem where the TMP35 is showing wildly incorrect readings as follows:

Expected values should be something like:

voltage: 0.73 deg C: 23.24 deg F: 73.84

Current values I’m getting with the 5-wire plan as per current Circuit 7 documentation:

voltage: 1.87 deg C: 137.01 deg F: 278.62

Thank you

PhantomD:
I had the same issue, it was an easy fix.

remove the extra wiring, send the positive and negative directly to the arduino (bypassing the positive and negative buss on the breadboard)

Basically, use only three wires… then mine was perfectly accurate