the calculation of hysteresis resistors is based on the link below: (with Vhysteresis=0.005v then R1=1K&R2=2.2M)
https://www.electronics-tutorials.ws/opamp/op-amp-comparator.html
the relay is fed from input pin of 7805 regulator, exactly after diode bridge
@Dr_Mohammad, your above (deleted) post contained exactly the same schematic diagram with the same values posted more than a dozen posts back, despite all the calls to present the circuit diagram or the actual assembly. There was not included the suggested change in resistor values, nor addition of decoupling capacitors here and there. In addition, the last (deleted) circuit did not show the A/C rectifying circuitry of the input voltage fed to the relay, which certainly has considerable ripple on the bus due to insufficient rectification. AGAIN, do not disregard what people said, this thread is unnecessarily wide.
Agreed. Complete schematic as well as detailed pics of implementation. I suspect OP might be running wiring of lm35 too close to mains wiring for bulb, or some such issue. 50hz pickup fed to input of opamp will not help.
So far you do not seem to have done any more detailed analysis of the physical plant, as was proposed on the first page of this thread where the possibility of a less abrupt control (eg PID) was mentioned; apparently you're just swapping component values to see what comes next. As said before, in practice, your system by itself with its intrinsic thermal capacity do offers you certain range of hysteresis, you could even add bulk metal plates between sensor and envoronment just to provide a way to tun the hysteresis.Today, 330k/1k resistors tested but the chattering still persists
Simulation shows 10mv hysteresis with no chattering but in practice not
So far you do not seem to have done any more detailed analysis of the physical plant, as was proposed on the first page of this thread where the possibility of a less abrupt control (eg PID) was mentioned; apparently you're just swapping component values to see what comes next. As said before, in practice, your system by itself with its intrinsic thermal capacity do offers you certain range of hysteresis, you could even add bulk metal plates between sensor and envoronment just to provide a way to tun the hysteresis.
By the way, you may be lacking familiarity with analog electronics, but at least as I see it, creating a 10mV range in a hysteresis is unfeasible unless you're willing to deal with Relay switching endlessly. In my own oppinion, you will not achieve what you want just with this trial and error approach, this is a waste of time. There are many things to consider as pointed before and you seem to be repeatedly overlooking them.
Today, 330k/1k resistors tested but the chattering still persists. Simulation shows 10mv hysteresis with no chattering but in practice not . It makes me nervous.
BY Proteus.If this is so then source of problem is not visible to us. Hence please post multiple pics of your implementation, as well as accurate updated schematic including all elements.
Maybe we can spot some construction flaw.
Also, how have you done this simulation you speak of?
I STILL don’t see any decoupling caps. Probably a third of the posts here tell you to add caps on the opamp power rails, and you keep not doing it.
Another thing to look at is ground routing. You don’t want the return current for the relay mixing with the other ground paths. The emitter of the transistor should go directly to the PS ground.
The circuit is fine, except for cap at C3 (10u) which I believe should be removed.
From your pics I cannot see the lm35. The wires for lm35 looks suspect, and could be picking up powerline A/C noise. The 3 wires are going off in different directions, so cannot understand what has been done here.
As an experiment try mounting lm35 directly on board.
C1 or a second one in parallel with it should be DIRECTLY across the supply pins of U2 and preferably across the LM35 as well. When dealing with small signal changes you need to be absolutely sure the impedance across the supply pins is as low as possible and also not carrying current elsewhere. Even the few cm of track back to the capacitor is enough to cause problems and they will not show up in a simulation. For sensitive circuits like this you need to be very careful of layout and in particular the differences in voltage created by track resistance and inductance.
I think the underlying problem is the relay wiring though, the current path through the coil is via the transistor collector, transistor emitter and along the wiring back to the power supply. The current difference between relay on and relay off is going to cause a slight voltage drop along the track length and that in turn will cause a shift in the voltages perceived by the op-amp. Try disconnecting the transistor emitter and wiring it (alone) back to the incoming power.
If you want to keep C3, drop it's value to say 100nF and make sure it is wired as close as possible between pins 2 and 4. Then add an isolating resistor of about 4.7K in the voltage from the LM35 but at the U2 end of the wiring.
Brian.
My suggestions are as follows:
1. Put a ceramic cap (0.1uF is sufficient) in parallel with C1.
2. Replace C3 with 0.1uF ceramic cap; also put a resistor in parallel 1K will be fine).
3. Put a 0.1uF ceramic cap in parallel with D1.
3. Put a 0.1uF ceramic cap between pin 4 and 8 very close to U2.
4. Put a 0.1uF ceramic cap between pin 1 and ground of U2.
5. Put one 1K resistor between pin 3 and ground of U2.
6. Configure pin 3 as a regular voltage adder.
excuse me, I did'nt realize where 4.7k resistor should be connected. your Grammar is too native and hard to me to understand. LOL
furtunatlly the relay chattering removed and the thermostat works accurately:
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?