Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] how to design a thermostat without Microcontroller?

Status
Not open for further replies.
to introduce 0.5C hysteresis, what are the value of the voltage divider's resistors?
It seems that you are not paying attention to the remarks provided so far. Re-read the posts from the beggining, and you will realize that it is not possible to achieve a theoretical performance without having sufficient data from the system. As already mentioned more than once, there is an intrinsic error expected on the control system due to the mass (thermal capacity and material used) of the object to be measured. Time to start making experiments by yourself to better understand what people are meaning.
 
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
You have another free opamp on the same IC; use the spare one to make one unity gain inverting buffer and again use another 0.01uF capacitor as a high pass filter. That can be used to drive the transistor.

Use another 0.1uF capacitor in parallel with the diode across the relay coil. That may help the regulator from voltage spikes.

your indescribable concerns & kindnesses will not be forgotten.

but another question still remains. what is the use of this free OP-AMP? How it should be connected?
 

Hi,

You don't show any effort on your own.
Not even the simplest internet search for "unity gain inverting opamp".

I don't support laziness.
I'm back when I see you do your job ...

Klaus
 
  • Like
Reactions: d123

    d123

    Points: 2
    Helpful Answer Positive Rating
but another question still remains. what is the use of this free OP-AMP? How it should be connected?

You need three more 10K (or 100K) resistors; add one to the non-inverting input (other end goes to ground). Add another to the inverting input and the output. This output is connected to the transistor driving the relay.

Connect the third resistor between the output of the first op-amp and the inverting input of the second op-amp.

Can you please draw a fresh circuit and post that?
 

@Dr_Mohammad
Reviewing this extense thread it is clear that from now on it is possible to you go ahead with all the detailed information given so far. As said, it is expected some background on electronics to seek for elementary information widely available on the Web. Here and at all other forums it is not usual to ask commonplace questions, therefore we'll be glad to reopen this thread when you show results of your experiments and/or ask for questions due to issues arising from it.

[EDIT]

Thread reopened after OP's request to share results.
 
Last edited:

Firstly I appreciate Mr. @andre_teprom to reopening the thread.
dear friends, after some studies I made 0.5C hystersis-enabled thermostat. before going forward, I give you an expression about the designed thermostat in summary. the relay should be in ON-state when the temperature (T) is below 37.7C. when T=37.7, the the relay should be switched OFF (i.e. the heating source OFF). after that, when T=37.2, the relay should be switched ON again. thermostat is located into a 63*63*36 cm box.

but I have still a problem. when the temperature reaches to the desired point (37C), the relay chatters and make a sound like JIZZZZZZZ. In this state the heating source which is a light bulb goes to blinking fast due to relay chattering. what should I DO? WHAT IS THE PROBLEM?

I leave the schematic and assembled circuit below this texts. thanks.

IMG_20190707_0946574.jpg

IMG_20190707_1019570.jpg
 
Last edited:

It could be inadequate hysteresis or it could be that the supply line voltage is dropping slightly as the relay operates because of the additional current flowing through its coil.

First establish whether the 12V is stable, it shouldn't change when the relay operates. If it does, you need to provide better supply regulation. Changes in the supply will be carried back to the comparator reference and could cause a feedback loop resulting in the chatter you see.

If more hysteresis is needed, you have to give more positive feedback to the reference voltage. You could drop the value of R4 but my first choice would be to increase the value of R3 instead, maybe to 4.7K or even 10K. It is the ratio of R3 to R4 that mostly decides how much difference between 'on' and 'off' voltages there will be.

You should really have a capacitor (~10uF) across the supply pins of both ICs to improve their stability too.

Brian.
 

It could be inadequate hysteresis or it could be that the supply line voltage is dropping slightly as the relay operates because of the additional current flowing through its coil.

First establish whether the 12V is stable, it shouldn't change when the relay operates. If it does, you need to provide better supply regulation. Changes in the supply will be carried back to the comparator reference and could cause a feedback loop resulting in the chatter you see.

If more hysteresis is needed, you have to give more positive feedback to the reference voltage. You could drop the value of R4 but my first choice would be to increase the value of R3 instead, maybe to 4.7K or even 10K. It is the ratio of R3 to R4 that mostly decides how much difference between 'on' and 'off' voltages there will be.

You should really have a capacitor (~10uF) across the supply pins of both ICs to improve their stability too.

Brian.

I modified the schematic. the feedback resistor is 2.2M. the power supply is 5v and the relay is 5v too.
I have a suggestion: in your opinion, if I change the relay to a 3V relay with that same power supply (5v), will chattering of the relay can be terminated?
 

I have a suggestion: in your opinion, if I change the relay to a 3V relay with that same power supply (5v), will chattering of the relay can be terminated?

I doubt. The relay is not a power hungry device and it will work happily upto 3-4 v coil voltage.

I suspect noise as the main culprit. You are very miser with capacitors. The inputs of the op-amp should be noise bypassed. Also the power supply close to the op amp.

But where is the hysteresis control?
 

I agree with c_mitra, the relay isn't the problem. The chattering is because the circuit driving it is telling it to turn on and off rapidly. That is most likely because the difference between 'on' temperature voltage and 'off' temperature voltage thresholds is too small and noise/interference is pushing it over/under the threshold. I don't think it has anything to do with the supply voltage and it certainly isn't that the relay needs more power but it could be due to variation in the supply voltage as the current demand changes.

Try the changes I mentioned in post #68 and let us know the outcome.

Brian.
 

I doubt. The relay is not a power hungry device and it will work happily upto 3-4 v coil voltage.

I suspect noise as the main culprit. You are very miser with capacitors. The inputs of the op-amp should be noise bypassed. Also the power supply close to the op amp.

But where is the hysteresis control?
There's a 1K and 2.2M resistor on the comparator (R3, R4) THAT'S the hysteresis. But maybe increasing R3 would help (more hysteresis).

You might want to use a faster diode for D1, like a 1n4148.

And relays most certainly ARE power hungry devices. There certainly are low-current types, but there's nothing here to indicate exactly WHAT kind of relay the OP is using. It's quite likely that the power supply drops when the relay initially turns on, as previously mentioned.

But, yes, DEFINITELY put some decoupling caps on the opamp, and one right across the supply where it first enters your circuit.
 

There's a 1K and 2.2M resistor on the comparator (R3, R4) THAT'S the hysteresis. But maybe increasing R3 would help (more hysteresis).

You might want to use a faster diode for D1, like a 1n4148.

And relays most certainly ARE power hungry devices. There certainly are low-current types, but there's nothing here to indicate exactly WHAT kind of relay the OP is using. It's quite likely that the power supply drops when the relay initially turns on, as previously mentioned.

But, yes, DEFINITELY put some decoupling caps on the opamp, and one right across the supply where it first enters your circuit.

Thanks, what are the capacity of the capacitors?
Where must be connected?
How can I control the hystersis?
(Also The relay manufacturer is Tianbo which is 5Vdc. )
 
Last edited:

People have already told you where to connect the capacitors. Several times. They have also suggested values (although the values are not that important). My previous post also told you how to adjust your hysteresis.

You seem to be not paying attention at all.
 

I leave the schematic and assembled circuit below this texts. thanks.

I do not understand; what is the expected output of LM35 at 37.7? Remember that the device is basically a current source and the opamp is a voltage device. Hence a resistor is needed from pin 2 of opamp to the ground (that will act as a current to voltage converter). Also provide a capacitor at this point. Use 200E for resistor value and 0.1uF as tha capacitor to prevent noise. We expect this voltage to be 377mv at 37.7C. If this is not the measured value, then report the expected error.

What is the voltage seen at pin 3 of the opamp? Pin 3 is adding two voltages: one from the R1 and RV1 voltage divider that is giving 0-500mV (approx) via R3. Another voltage (0-5v) is added via R4 - I guess this for hysteresis control. This voltage should be around 5mv because you want 0.5C hysteresis. R4, R3 and RV1 make up the voltage divider. When Output voltage is 5v, this is somewhat less than 5mv. Usually the output will be more like 4v and you may have to reduce the 2.2M resistor with 1.2 or 1.5M. You need to provide a tantalum cap 1uF and a ceramic cap 0.1uF near the supply pins of the op amp.

If the chatter persists, put a 0.1uF ceramic capacitor at the output pin of the opamp. This is going to slow down turn on effects and also reduce noise. If still you get chatter, put another 0.1uF ceramic cap close to the LM35 supply pin and the ground.

Also it may be a good idea to replace RV1 with RV1 and 470E in series. That will reduce the span.
 

I do not understand; what is the expected output of LM35 at 37.7? Remember that the device is basically a current source and the opamp is a voltage device. Hence a resistor is needed from pin 2 of opamp to the ground (that will act as a current to voltage converter). Also provide a capacitor at this point. Use 200E for resistor value and 0.1uF as tha capacitor to prevent noise. We expect this voltage to be 377mv at 37.7C. If this is not the measured value, then report the expected error.

This is incorrect. LM35 is not a current source. It has an output current capability limit of 10mA, and capacitive loading of output is not recommended. The 200 ohm-to-ground configurations are used when driving long leads, and are not relevant here.

What is the voltage seen at pin 3 of the opamp? Pin 3 is adding two voltages: one from the R1 and RV1 voltage divider that is giving 0-500mV (approx) via R3. Another voltage (0-5v) is added via R4 - I guess this for hysteresis control. This voltage should be around 5mv because you want 0.5C hysteresis. R4, R3 and RV1 make up the voltage divider. When Output voltage is 5v, this is somewhat less than 5mv. Usually the output will be more like 4v and you may have to reduce the 2.2M resistor with 1.2 or 1.5M. You need to provide a tantalum cap 1uF and a ceramic cap 0.1uF near the supply pins of the op amp.

The entire network of resistors comprising 10K-1Kpreset-1K-2.2M etc is extremely interdependent on each other for exact voltage levels. Since we are dealing with voltage variations of the order of 0.01v and less, balancing & ensuring ongoing stability of voltages of this resistive network will be impossible to achieve with this simplistic approach, despite putting caps everywhere.

The current selection of 2.2M and 1K for hysteresis is far too low and almost negligible. The 2.2M should be decreased down to less than 100K


It is a good idea to feed the relay point from unregulated side of supply, since such a relay would suddenly draw about 75-100mA on switch-on. Any fluctuations due to this relatively heavy load should get dramatically reduced by the regulator. Of course the voltage rating of the relay should be chosen accordingly.

...If the chatter persists, put a 0.1uF ceramic capacitor at the output pin of the opamp. This is going to slow down turn on effects and also reduce noise. If still you get chatter, put another 0.1uF ceramic cap close to the LM35 supply pin and the ground.

Also it may be a good idea to replace RV1 with RV1 and 470E in series. That will reduce the span.

While it usually seems like a reasonable idea to use an opamp as a comparator, in general it is highly advisable to use an actual comparator in this role (e.g. LM311)

- - - Updated - - -

Correction --
The current selection of 2.2M and 1K for hysteresis is far too low and almost negligible. The 2.2M should be decreased down to less than 100K

That should be 500K, not 100K
 

This is incorrect. LM35 is not a current source. It has an output current capability limit of 10mA, and capacitive loading of output is not recommended. The 200 ohm-to-ground configurations are used when driving long leads, and are not relevant here.



The entire network of resistors comprising 10K-1Kpreset-1K-2.2M etc is extremely interdependent on each other for exact voltage levels. Since we are dealing with voltage variations of the order of 0.01v and less, balancing & ensuring ongoing stability of voltages of this resistive network will be impossible to achieve with this simplistic approach, despite putting caps everywhere.

The current selection of 2.2M and 1K for hysteresis is far too low and almost negligible. The 2.2M should be decreased down to less than 100K


It is a good idea to feed the relay point from unregulated side of supply, since such a relay would suddenly draw about 75-100mA on switch-on. Any fluctuations due to this relatively heavy load should get dramatically reduced by the regulator. Of course the voltage rating of the relay should be chosen accordingly.



While it usually seems like a reasonable idea to use an opamp as a comparator, in general it is highly advisable to use an actual comparator in this role (e.g. LM311)

- - - Updated - - -

Correction --

That should be 500K, not 100K

the relay is fed from input pin of 7805 regulator, exactly after diode bridge. also a 10uf capacitor is connected to the output pin of 7805 Reg.
a 0.1uf cap. paralleled to the relay coil.
the flywheel diode is 1n4148.
the relay is 5V DC.
the reference voltage is provided via 330 ohm and 50 ohm potentiometer to achieve 377mV.
 

the relay is fed from input pin of 7805 regulator, exactly after diode bridge. also a 10uf capacitor is connected to the output pin of 7805 Reg.
a 0.1uf cap. paralleled to the relay coil.
the flywheel diode is 1n4148.
the relay is 5V DC.
the reference voltage is provided via 330 ohm and 50 ohm potentiometer to achieve 377mV.

Excellent.

How about the feedback/ hysteresis resistors ?
Is it working any better now ?
 
Last edited:

Excellent.

How about the feedback/ hysteresis resistors ?
Is it working any better now ?

unfortunately not. The feedback network calculated to have 0.5C Hysteresis. When the temperature reaches to the desired point (37.7), the relay goes to chattering and makes a sound like JIZZZZZZ and hence the heating source (light bulb) blinks fast.
 

The calculation of hysteresis resistors is wrong. Change to 500k and 1k
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top