Hello, I got a class project of making a thermostat based on lm35. After reading many schematics online, I decided to make the circuit like in the following attachment. Basically it's a comparator with a fixed Vref of 342mv, hysteresis of 50 mv, and trip point of 324mv and 374 mv. It should drive a relay that will switch a heater (using a light bulb). Below the threshhold the lightbulb should be on. and above the threshhold it should be off.
The thing is it didnt work. So I tried testing the components separately. So far the LM35 and LM311 works fine, using R1, R2, R3, R4 I got it working. If the temp is higher than threshold (342 mv) than LM311 will output around 360 mv linearly with temperature, while if it's lower it will output around 4mv.
Satisfied with that, I put R5 like in the schematic (pull-up resistor), LM311 would output 4.98 V, the thing is the temperature is still under threshold. Checking the output of LM35, I found that the output is around 1.6 V (when it should be around 280 mv, 10mv/Centigrade). Apparently the pull-up resistor also pull-up the output of LM35.
Anyone got any clue of what went wrong? Also does any one have any suggestion to make it work? Anyway, is the transistor required? Is it used to amplify the output of LM311? If so, then I wouldn't need the pull-up resistor right? But if I could use a pull-up resistor then could I ditch the transistor and power the relay using the output of LM311 (5V)? But I still need to figure out how to give a pull-up resistor for the LM311 without affecting the output of LM35.
Help, anyone?
Regards Shani HP
p.s. the transistor is 2n2222 from fairchild, and the diode is 4004. Should I use a different diode?
The thing is it didnt work. So I tried testing the components separately. So far the LM35 and LM311 works fine, using R1, R2, R3, R4 I got it working. If the temp is higher than threshold (342 mv) than LM311 will output around 360 mv linearly with temperature, while if it's lower it will output around 4mv.
Satisfied with that, I put R5 like in the schematic (pull-up resistor), LM311 would output 4.98 V, the thing is the temperature is still under threshold. Checking the output of LM35, I found that the output is around 1.6 V (when it should be around 280 mv, 10mv/Centigrade). Apparently the pull-up resistor also pull-up the output of LM35.
Anyone got any clue of what went wrong? Also does any one have any suggestion to make it work? Anyway, is the transistor required? Is it used to amplify the output of LM311? If so, then I wouldn't need the pull-up resistor right? But if I could use a pull-up resistor then could I ditch the transistor and power the relay using the output of LM311 (5V)? But I still need to figure out how to give a pull-up resistor for the LM311 without affecting the output of LM35.
Help, anyone?
Regards Shani HP
p.s. the transistor is 2n2222 from fairchild, and the diode is 4004. Should I use a different diode?
Attachments
-
116.9 KB Views: 491