Temperature Sensor

SgtWookie

Joined Jul 17, 2007
22,230
Are you putting the uC to sleep while doing the ADC? That can help improve the S/N ratio.

I'm not so keen on the LED reference idea, as the Vf of the LED will change as a function of temperature and current. If you really want a precision reference, then get one.

0.2°C fluctuations is not bad at all for the cost of your system. If you want real accuracy, it'll cost you a good bit more than what you've paid already.
 

Thread Starter

Dalaran

Joined Dec 3, 2009
168
Thanks Sgt. I am not currently putting the uC into sleep while running the ADC... will look into doing that as well.

Could I expect to get better accuracy with a thermistor? I am fine with the .2degC fluctuations, just a side question I guess.

Thanks!
 

#12

Joined Nov 30, 2010
18,224
With a thermistor, you have to convert from resistance to temperature and they are not linear. That might mean using a look-up table which can be programmed to anything you like.

A thermistor is a wonderful way to switch at a set point, as in "thermostat" because there is only one resistance that is important. To use one as a thermometer seems more difficult than the nice, linear output of an LM35.
 

THE_RB

Joined Feb 11, 2008
5,438
...
Even if I use exactly 2V reference I still only have 1 ADC count / ~0.2degC. Not exactly what I was hoping for but will have to do.
...
Just a minor point, but since you are oversampling hundreds of times you already have a higher resolution. If you add 100 samples (and don't divide the sum so it is "oversampled") your 0.2'C per-sample resolution goes up to 0.002'C resolution.

The problem of course is that your oversampled resolution is much finer than the noise threshold of sensor/cabling/ADC/Vref. ;)
 

Thread Starter

Dalaran

Joined Dec 3, 2009
168
Again, just want to thank everyone for the help. I have at most the ADC varying 1 count and this is in the fridge where the temperature is constantly changing so is expected.

Everything is working as expect. Cheers.
 

Thread Starter

Dalaran

Joined Dec 3, 2009
168
It's actually an old wine cooler turned into a kegerator :). (I'll try to post a couple pics when I get home later) It is around 6degC and there is about 3degC hysteresis when the compressor turns on and off. I tried setting the thermostat a little lower but it seems like the compressor is trying a little hard and gets quite warm. I need to well fill and insulate the hole that was drilled in the top first I guess. I'll try to stick with this 3degC hysteresis at first and maybe tweak it down the road.

Cheers.
 

wayneh

Joined Sep 9, 2010
17,498
Narrowing hysteresis can be a challenge, and you need to know where it's coming from. I believe it's sensible to balance the hysteresis of your circuitry to the same range as the hysteresis of the system. In other words, see how far the cooler cools on the low end after the compressor goes off, and how much warming continues on the high end once the compressor kicks in. If the system hysteresis is similar or more than the hysteresis of the circuitry, there's not much to gain by tweaking the circuit.

Getting the circuit hysteresis down under 0.1°C is quite doable, but may not matter much if your system is "coasting" a lot more than that.
 

THE_RB

Joined Feb 11, 2008
5,438
With a compressor fridge you probably don't want the hysteresis too low as you don't want the compressor motor turning on and off constantly. If the cycle period of the motor on/off is similar (or a fraction less) than your normal fridge then it's great.

The temp of the beer in the Keg will remain very constant I'm sure...
 

#12

Joined Nov 30, 2010
18,224
"temp of the beer will remain constant"

I remind you not to get tunnel vision about the measurement device while you have other time constants happening. The compressor cycle absolutely must have slowness to avoid wasteful use of the motor. The air you are measuring in the box has a different time constant than the beer. In the refrigeration business, I learned to embed my thermometer in a mass to avoid measuring the air temperature, but rather measure the average air temperature. If a stick of butter will calm my stainless steel thermometer, a keg of beer will surely averave out a 3 degree thermostat hysteresis.
 
Top