Temperature sensor wiring

Thread Starter

Clinton Brits

Joined Aug 8, 2015
16
I have a working temperature sensor that is connected correctly and working but there is a simple issue that still bugs me. The sensor has 4 pins namely VCC, gnd, humidity(not important for topic) and a temperature pin. The temperature is measured as a function of resistance. When the temperature changes, the resistance of the sensor changes as well. Before i read the data sheet carefully i connected the pin directly to the ADC and it gave a maximum reading of 1023 irrespective of temperature. I understood this as the voltage drop over the temperature sensor to be the input voltage of 5V as it is the only resistor in the circuit. This must mean the pin leaving the sensor would need to be attached at a point before the temperature sensitive resistance inside the sensor. What puzzles me is that to solve the problem, i connected a resistor from the temperature output pin to ground and the the output pin to the ADC. This solved the problem on the concept of series resistors being voltage dividers but if my first assumption was correct then shouldn't that mean that the resistor that i added was in fact connected in parallel?
 

Brownout

Joined Jan 10, 2012
2,390
This must mean the pin leaving the sensor would need to be attached at a point before the temperature sensitive resistance inside the sensor.
Not necessarily. The pin may be connected to the opposite end of the resistor from the VCC connection. This would create a voltage divider using the sensor resistor and the very high input resistance of your ADC. Thinking about the divider equation, there would have been almost no "diving" in your original configuration, which is what you observed.

In other words, with very little current flowing from the pin, there would have been almost no voltage drop across the sensor resistor.
 

GopherT

Joined Nov 23, 2012
8,009
I have a working temperature sensor that is connected correctly and working but there is a simple issue that still bugs me. The sensor has 4 pins namely VCC, gnd, humidity(not important for topic) and a temperature pin. The temperature is measured as a function of resistance. When the temperature changes, the resistance of the sensor changes as well. Before i read the data sheet carefully i connected the pin directly to the ADC and it gave a maximum reading of 1023 irrespective of temperature. I understood this as the voltage drop over the temperature sensor to be the input voltage of 5V as it is the only resistor in the circuit. This must mean the pin leaving the sensor would need to be attached at a point before the temperature sensitive resistance inside the sensor. What puzzles me is that to solve the problem, i connected a resistor from the temperature output pin to ground and the the output pin to the ADC. This solved the problem on the concept of series resistors being voltage dividers but if my first assumption was correct then shouldn't that mean that the resistor that i added was in fact connected in parallel?

The input of the ADC is likely in the range of 10M to 100B ohms. So, when you calculate the voltage at the input node (assuming the ADC input is the bottom half of your voltage divider, you will calculate that the 10k ohm temp sensor will make just shy of 5 volts (so shy that your ADC will not notice the difference).
 

Thread Starter

Clinton Brits

Joined Aug 8, 2015
16
Thanks a a lot. It is as you said because measuring the ADC reading and then subtracting it from the 1023 to get the relative voltage drop over the sensor gives an expected result. The reason i asked is because when i programmed it last i remember it always showing 5 odd degrees celcius more than the mercury thermometer and it just stuck in my mind that the maths was wrong. I attached for those that were interested.
 

Attachments

Thread Starter

Clinton Brits

Joined Aug 8, 2015
16
Given all other having been eliminated it seems the resistor having a +-5% error seems to be the issue. Since there are 2X3K resistors between gnd and temp out and each is within +-5% that would probably account for the 300-400 odd ohm discrep. I'll give it a try with more accurate resistor and see what happens.
 
Top