# What is the simplest way to toggle a relay with analog feedback?

I've been playing with electronics for a long time, but am fairly new to digital electronics, including using Fritzing, so apologizes in advance for that.

I'm attempting a fairly basic 5VDC circuit where I want to use a thermistor to toggle a fan on and off, and to be able to set the point at which the fan toggles.

I know I could use Arduino to read the resistance from the thermistor and the potentiometer and, based on logic, supply high or low to the relay switch - but how would I build the circuit without an Arduino? Would I still need to use an IC for the logic?

I was thinking I could potentially use something like an AND/OR gate with the feedback from the thermistor circuit to control the relay ( thus giving the relay either high/low and not a variable voltage ) but the of course the AND/OR gate is going to get the variable voltage which seems wrong to me ( analog feedback to a digital component ) and so I know I'm missing something - a small I/C that can read the analog voltage would seem to be the "right" thing but it also seems like there may be an easier way to do it with such a simple circuit.

Below are the Schematic and Breadboard views from Fritzing. I know they are incomplete, and that the power supply is 6v instead of 5v, but hopefully it will help convey the basic idea.

screen.png http://img199.imageshack.us/img199/5462/ta07.png

screen 1.png http://img843.imageshack.us/img843/5582/q7yq.png

• You want a comparator: en.wikipedia.org/wiki/Comparator , although it can be built out of half a dozen transistors if you prefer. – pjc50 Jan 12 '14 at 18:22
• You can use a single transistor solution, please read my reply here. The LDR of that circuit can be replaced by a NTC or PTC thermistor. – alexan_e Jan 12 '14 at 18:39
• thanks for the help, everyone! you really got me pointed in the right direction! – cwd Jan 12 '14 at 20:08