+ Post New Thread
Page 4 of 6 FirstFirst ... 2 3 4 5 6 LastLast
Results 61 to 80 of 104
  1. #61
    Super Moderator
    Points: 29,856, Level: 42
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,914
    Helped
    1128 / 1128
    Points
    29,856
    Level
    42
    Blog Entries
    9

    Re: how to design a thermostat without Microcontroller?

    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.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )


    1 members found this post helpful.

  2. #62
    Member level 5
    Points: 881, Level: 6
    Dr_Mohammad's Avatar
    Join Date
    Nov 2016
    Location
    Khorramabad, Iran
    Posts
    90
    Helped
    0 / 0
    Points
    881
    Level
    6

    Re: how to design a thermostat without Microcontroller?

    Quote Originally Posted by c_mitra View Post

    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?
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  3. #63
    Super Moderator
    Points: 79,067, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    16,051
    Helped
    3635 / 3635
    Points
    79,067
    Level
    68

    Re: how to design a thermostat without Microcontroller?

    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
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.


    1 members found this post helpful.

  4. #64
    Advanced Member level 5
    Points: 17,798, Level: 32
    Achievements:
    7 years registered

    Join Date
    Nov 2012
    Posts
    3,249
    Helped
    808 / 808
    Points
    17,798
    Level
    32

    Re: how to design a thermostat without Microcontroller?

    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?



  5. #65
    Super Moderator
    Points: 29,856, Level: 42
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,914
    Helped
    1128 / 1128
    Points
    29,856
    Level
    42
    Blog Entries
    9

    Re: how to design a thermostat without Microcontroller?

    @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 by andre_teprom; 6th July 2019 at 17:31. Reason: update status of the thread
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  6. #66
    Member level 5
    Points: 881, Level: 6
    Dr_Mohammad's Avatar
    Join Date
    Nov 2016
    Location
    Khorramabad, Iran
    Posts
    90
    Helped
    0 / 0
    Points
    881
    Level
    6

    Re: how to design a thermostat without Microcontroller?

    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.

    Click image for larger version. 

Name:	IMG_20190707_0946574.jpg 
Views:	7 
Size:	502.2 KB 
ID:	154349

    Click image for larger version. 

Name:	IMG_20190707_1019570.jpg 
Views:	20 
Size:	472.2 KB 
ID:	154350
    Last edited by Dr_Mohammad; 11th July 2019 at 08:32.
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  7. #67
    Super Moderator
    Points: 82,003, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,447
    Helped
    4487 / 4487
    Points
    82,003
    Level
    69

    Re: how to design a thermostat without Microcontroller?

    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.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  8. #68
    Member level 5
    Points: 881, Level: 6
    Dr_Mohammad's Avatar
    Join Date
    Nov 2016
    Location
    Khorramabad, Iran
    Posts
    90
    Helped
    0 / 0
    Points
    881
    Level
    6

    Re: how to design a thermostat without Microcontroller?

    Quote Originally Posted by betwixt View Post
    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?
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  9. #69
    Advanced Member level 5
    Points: 17,798, Level: 32
    Achievements:
    7 years registered

    Join Date
    Nov 2012
    Posts
    3,249
    Helped
    808 / 808
    Points
    17,798
    Level
    32

    Re: how to design a thermostat without Microcontroller?

    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?



  10. #70
    Super Moderator
    Points: 82,003, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,447
    Helped
    4487 / 4487
    Points
    82,003
    Level
    69

    Re: how to design a thermostat without Microcontroller?

    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.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  11. #71
    Advanced Member level 5
    Points: 24,498, Level: 38
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,703
    Helped
    1038 / 1038
    Points
    24,498
    Level
    38

    Re: how to design a thermostat without Microcontroller?

    Quote Originally Posted by c_mitra View Post
    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.



  12. #72
    Member level 5
    Points: 881, Level: 6
    Dr_Mohammad's Avatar
    Join Date
    Nov 2016
    Location
    Khorramabad, Iran
    Posts
    90
    Helped
    0 / 0
    Points
    881
    Level
    6

    Re: how to design a thermostat without Microcontroller?

    Quote Originally Posted by barry View Post
    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 by Dr_Mohammad; 11th July 2019 at 20:15.
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  13. #73
    Advanced Member level 5
    Points: 24,498, Level: 38
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,703
    Helped
    1038 / 1038
    Points
    24,498
    Level
    38

    Re: how to design a thermostat without Microcontroller?

    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.



  14. #74
    Advanced Member level 5
    Points: 17,798, Level: 32
    Achievements:
    7 years registered

    Join Date
    Nov 2012
    Posts
    3,249
    Helped
    808 / 808
    Points
    17,798
    Level
    32

    Re: how to design a thermostat without Microcontroller?

    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.



  15. #75
    Advanced Member level 4
    Points: 6,247, Level: 18
    kripacharya's Avatar
    Join Date
    Dec 2012
    Location
    New Delhi
    Posts
    1,209
    Helped
    182 / 182
    Points
    6,247
    Level
    18

    Re: how to design a thermostat without Microcontroller?

    Quote Originally Posted by c_mitra View Post
    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



    •   AltAdvertisement

        
       

  16. #76
    Member level 5
    Points: 881, Level: 6
    Dr_Mohammad's Avatar
    Join Date
    Nov 2016
    Location
    Khorramabad, Iran
    Posts
    90
    Helped
    0 / 0
    Points
    881
    Level
    6

    Re: how to design a thermostat without Microcontroller?

    Quote Originally Posted by kripacharya View Post
    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.
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  17. #77
    Advanced Member level 4
    Points: 6,247, Level: 18
    kripacharya's Avatar
    Join Date
    Dec 2012
    Location
    New Delhi
    Posts
    1,209
    Helped
    182 / 182
    Points
    6,247
    Level
    18

    Re: how to design a thermostat without Microcontroller?

    Quote Originally Posted by Dr_Mohammad View Post
    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 by kripacharya; 12th July 2019 at 13:49.



  18. #78
    Member level 5
    Points: 881, Level: 6
    Dr_Mohammad's Avatar
    Join Date
    Nov 2016
    Location
    Khorramabad, Iran
    Posts
    90
    Helped
    0 / 0
    Points
    881
    Level
    6

    Re: how to design a thermostat without Microcontroller?

    Quote Originally Posted by kripacharya View Post
    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.
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  19. #79
    Advanced Member level 4
    Points: 6,247, Level: 18
    kripacharya's Avatar
    Join Date
    Dec 2012
    Location
    New Delhi
    Posts
    1,209
    Helped
    182 / 182
    Points
    6,247
    Level
    18

    Re: how to design a thermostat without Microcontroller?

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



  20. #80
    Member level 5
    Points: 881, Level: 6
    Dr_Mohammad's Avatar
    Join Date
    Nov 2016
    Location
    Khorramabad, Iran
    Posts
    90
    Helped
    0 / 0
    Points
    881
    Level
    6

    Re: how to design a thermostat without Microcontroller?

    Quote Originally Posted by kripacharya View Post
    The calculation of hysteresis resistors is wrong. Change to 500k and 1k
    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...omparator.html
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



--[[ ]]--