Here is the circuit with components I built as shown over here. The title of the circuit is water temperature controlled system. The function of this system is to control the heating while sensing the temperature, but due to safety purposes, I used a red LED to represent as the heating element. The op-amp act as a comparator to compare the voltages of the NTC thermistor,VA and the potentiometer at preset resistance,VB as shown in the diagram.
The resistance of the NTC thermistor is 2kohm when the water temperature is 50˚C, so I set the potentiometer 2k so that when the water temp. is approximately below 50˚C, the LEDs will up; when temp. is above 50˚C, the LEDs won't light up. To do this experiment, I used hot water around 52˚C and I started recording the data until it cools down to lower than 50˚C, to see if the outcome is expected or not.
The expected outcome is that when the water temp. is approximately below 50˚C, there will be a positive voltage difference between VA and VB (VA>VB), the op-amp will turn on and both green and red LEDs will light up to show that the transistor and relay are turned on and so is the heating element (represented by red LED).LEDs won't light up when VA=VB,and VA less than VB
Here is the problem. The actual outcome I observed is not expected:
In 50.7˚C, VA=4.25V, VB=4.54V, No LEDs light up. but there is voltage difference
In 50.6˚C, VA=4.25V, VB=4.58V, ONLY green lights up (unexpected outcome).
In 49.3˚C, VA=4.25V, VB=4.71, then BOTH red and green start to light up
Both LEDs only light up when the voltage difference is a bit larger which is 0.46V. Why does the red LED light is a few degree Celsius delayed from the green LED? Is it the cause of hysteresis in the op-amp?