Simple Temperature Controller
c.d. pritchard      Rev. 0,- 4/02,  Rev. 1 7/03-  feedback resistor connection changed from pin 4 to 5 to give better "snap" to output  (thanks to Richard van Slooten for pointing this out!).  Also changed supply voltage from 12 to to 13.8 VDC- works with wider variety of relays since the transistor which drives it causes a ~1.2 VDC drop.


This is a schematic for a very simple temperature controller suitable for controlling a beer fridge or fermenter.

How it Works
The LM339 is a comparator (actually, it contains 4 of them, but this circuit only uses one of them).  When the voltage at the + input (pin 5) exceeds that on the - input (pin 4), its output (pint 2) turns on.  The thermistor is connected as a voltage divider.  It's resistance decreases as it's temperature increases.  This puts more voltage on the LM339's + pin.  There's a pot connected as a voltage divider to the - pin of the LM339.  You adjust this to set when the fridge compressor or whatever turns on.  When the output of the LM339 turns on, it turns on the transistor.which powers up the relay and lights the LED.  Also, there's a feedback resistor between pins 2 and 5- this provides a "snap action" on the output.   A big filter capacitor is across the 13.8 VDC power supply to the circuit.  It's not needed if you used a well filtered power supply.

Details
The relay coil must be rated for 12 VDC and shouldn't  draw more than 50 mA or so with the transistor shown.  The relay contacts must be rated for whatever voltage and current the load to be controlled draws.  I've wired mine to replace the thermostat in my fridge (actually it's an up-right freezer).  Physically, I didn't run the wires to the thermostat inside the fridge, instead, I spliced into the appropriate wires on the back of the fridge.   I did this cause I wanted the fan inside running constantly.  Downside is that the relay contacts need to be beefy to handle the compressor current which can be quite high at startup.  Check the schematic for your fridge to identify the correct wires if you go this route (schematics are usually pasted to the back of fridges).    A simple alternative is simply to wire the contacts of the relay in series with the hot 120 VAC wire to a receptacle you can then plug the fridge into.  Instead of a conventional relay, a solid state relay can be used.

The controller has very little differential (difference in on and off temperatures).  A differential is needed to prevent the compressor from cycling on and off too frequently which will shorten it's life.   To add differential, I buried the thermistor in a walnut-sized piece of duct-seal and placed it away from the outlet of the fan inside the fridge.   This results in about a 5 degF dT and decent cycles periods.

The controller will need to be calibrated. The easiest way is to put the thermistor into a cup of water at the temperature you want the fridge to turn on at and twiddle with the pot until the LED turns on.  Mark the location of the knob attached to the pot. in case it gets bumped or,  if you use a board mounted trimmer pot instead of a panel mounted one, seal its setting with a bit of hot melt cement.   Another way to calibrate it is to look up the resistance of the thermistor at the desired setpoint temperature, temporarily wire a resistor of this value place of the thermistor and adjust the pot until the LED turns on.  The thermistor page has data on the resitance vs. temperature of the Radio Shack thermistors I use as well as info on how to build a temperature probe.

Going Further
The 50kOhm pot is a bit coase if you wish to have various set points.  For finer control, wire a smaller pot in series with the big one or, better yet,  use a smaller value pot in series with a resistor of suitable value.  Another way to have several setpoints is to use a rotary switch to select one of several pots or fixed resistors arranged as a voltage divider.  Here's a diagrams showing these sort of dividers.

It's left as an exercise for the reader to calculate the resistances needed..


Return to my Main Page
c.d. pritchard,  r0, 4/02
miserable failure