I need some Hysterisis for this circuit. - Page 1
Forum section: electronics / projects

author: fc3000
author_rank: Regular Contributor
timestamp: November 28, 2023, 04:43:13 pm
content: Hi all.The circuit below controls a small fan.When the temperature sensor reaches the set voltage, the fan come on and cools a voltage regulator (with heat-sink).The fan, however modulates. It comes on and off intermittently.I realize that the circuit needs some hysteresis to stop this happening. Am i correct?If so how can i modify the circuit to achieve this?Thank you.Regards

author: ataradov
author_rank: Super Contributor
timestamp: November 28, 2023, 04:55:05 pm
content: Connect a resistor from the output of the comparator to the non-inverting (+) input. The value will set the amount of hysteresis.There are formulas to calculate the value, but it may be easier to add a pot and adjust as needed.

author: langwadt
author_rank: Super Contributor
timestamp: November 28, 2023, 04:56:27 pm
content: add a resistor from pin 1 to pin 3 on the opamp

author: fc3000
author_rank: Regular Contributor
timestamp: November 28, 2023, 08:06:22 pm
content: Thank you for the reply.I have been online to find a solution for the calculations.https://www.allaboutcircuits.com/tools/hysteresis-comparator-calculator/The solution was to add a 100K res as you described.But in this case the fan is always on.Could i have more assistance, please?Regards

author: Benta
author_rank: Super Contributor
timestamp: November 28, 2023, 08:27:56 pm
content: First remove R24. It's useless and counterproductive.

author: magic
author_rank: Super Contributor
timestamp: November 28, 2023, 11:04:24 pm
content: Quote from: fc3000 on November 28, 2023, 08:06:22 pmDo the math.LM35 output is almost zero (0.2~0.3V most likely).MCPwhatever output is 5V.The 100k/1k (R45) voltage divider causes IN+ to go ~50mV higher than it would otherwise be.It should turn off when temperature decreases by 5°C.editBTW, isn't this chip an auto-zero opamp? These chips don't achieve their full accuracy when used as comparators and I don't know if they work correctly at all.If in doubt, measure voltages at IN+ and IN-.If IN+>IN- and the output is high, you need to find out why the inputs are the way they are.If IN+<IN- and the output is high, the chip is not working right.

author: fc3000
author_rank: Regular Contributor
timestamp: November 29, 2023, 08:10:41 am
content: QuoteHi magic. Thank you for your explanation.This OPAMP is 'Zero Drift'. I had few so I used it.Without the 100K res, the fan turns on at the set temperature.With the 100K res, the OPAMP output is always +5V, and the V+ input is +1.24V.Would you conclude the OPAMP is faulty?Regards

author: ataradov
author_rank: Super Contributor
timestamp: November 29, 2023, 08:15:13 am
content: "V+ input is +1.24V." at what temperature? How does it change with temperature?

author: fc3000
author_rank: Regular Contributor
timestamp: November 29, 2023, 08:39:20 am
content: Quote from: ataradov on November 29, 2023, 08:15:13 amHi.I have set the temperature at 60 degrees. That is 0.6V at the potential divider.Regards

author: magic
author_rank: Super Contributor
timestamp: November 29, 2023, 08:52:11 am
content: Quote from: fc3000 on November 29, 2023, 08:10:41 amThis doesn't seem right. If X is LM35 output voltage the voltage at IN+ should be (100k·X + 1k·5V)/101k. Either LM35 output is different than you expect or the opamp is somehow sourcing current out of its IN+. I think the latter is unlikely, so it could be something with the LM35 - maybe its output can't sink current?

author: langwadt
author_rank: Super Contributor
timestamp: November 29, 2023, 09:03:30 am
content: Quote from: magic on November 29, 2023, 08:52:11 amlooking at the datasheet; source only, sink limited to 1uA

author: fc3000
author_rank: Regular Contributor
timestamp: November 29, 2023, 09:56:25 am
content: Hi all. Thank you for the input.Just to clarify.Without the 100K res the output from the LM35 sensor works OK.I have checked it with a my meter and a K-type probe. It produces 10mV/Degree.langwadt said:QuoteI checked and that is correct.Is this the problem then?If so what do you suggest I do?Is it possible to modify the circuit?Regards

author: langwadt
author_rank: Super Contributor
timestamp: November 29, 2023, 10:11:38 am
content: Quote from: fc3000 on November 29, 2023, 09:56:25 amtry a pull down resistor on the output of the LM35

author: fc3000
author_rank: Regular Contributor
timestamp: November 29, 2023, 10:59:49 am
content: Hi langwadt,Thank you very much for the suggestion.I never considered the LM35 was the problem.I have connected a 2.2K from the LM35 output and 0V.. IT WORKS!!The fan turn ON/OFF correctly. I get the correct hysteresis of 5degres .Thank you also to to all the contributors. I learned so much from this community.Regards.