+ Post New Thread
Page 5 of 6 FirstFirst ... 3 4 5 6 LastLast
Results 81 to 100 of 104
  1. #81
    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 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
    (sigh)
    With your design, you will get a hysteresis of about 1.5mV. It is suggested to try and have hysteresis of about 10mV - i.e. from 372 to 382 mV
    This will achieve your target temperature goals as well as provide better immunity to 'noise' conditions.

    The main reason a 2.2M/1K gives only 1.5mV is due to following -- the opamp output voltage swing will be approx 0.1v to 3.5v, and not 0v to 5v

    In fact, simulations show that optimum feedback resistor pair with your circuit configuration should be 330K/ 1K, which gives 10mV @ 5v supply.



  2. #82
    Super Moderator
    Points: 258,547, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,137
    Helped
    13722 / 13722
    Points
    258,547
    Level
    100

    Re: how to design a thermostat without Microcontroller?

    Unfortunately we didn't yet see a complete schematic that comprises the various changes and supplements mentioned in the posts, including power supply, voltage regulation, bypass capacitors. I'm not motivated to make guesses based on vague information.

    Relay chatter shouldn't happen despite of exact hysteresis amount. There are possible improvements like a low pass filter for the temperature sensor output. Waiting for a valid schematic.



  3. #83
    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?

    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.



  4. #84
    Super Moderator
    Points: 29,553, Level: 41
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,820
    Helped
    1114 / 1114
    Points
    29,553
    Level
    41
    Blog Entries
    9

    Re: how to design a thermostat without Microcontroller?

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



    •   AltAdvertisement

        
       

  5. #85
    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 andre_teprom View Post
    @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.
    Yeah, you are right Mr. Andre.
    Iīm tied up and tomorrow will share the conclusion. Thanks for your patience, that is very nice of you.
    After getting results, the unnecessary parts of the thread will be removed and the final scheme will soon be posted for public usages.
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  6. #86
    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
    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.
    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.



  7. #87
    Super Moderator
    Points: 29,553, Level: 41
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,820
    Helped
    1114 / 1114
    Points
    29,553
    Level
    41
    Blog Entries
    9

    Re: how to design a thermostat without Microcontroller?

    Today, 330k/1k resistors tested but the chattering still persists
    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.
    Simulation shows 10mv hysteresis with no chattering but in practice not
    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.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  8. #88
    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 andre_teprom View Post
    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.
    Your words about creating hysteresis are opposite of the expertsī comments in this thread. moreover, Nothing is trial and error approach, Nothing. My room is full of papers which have filled with too many calculations. Please search my name in IEEE to see my papers in all-optical computers which proving my efforts are not based on trial and error approach.



  9. #89
    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
    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.
    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?



  10. #90
    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
    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?
    BY Proteus.
    here is the new design.
    Click image for larger version. 

Name:	UntitledHH.jpg 
Views:	21 
Size:	144.4 KB 
ID:	154468Click image for larger version. 

Name:	IMG_20190718_1743433(1).jpg 
Views:	9 
Size:	515.1 KB 
ID:	154469
    Click image for larger version. 

Name:	IMG_20190718_1743433(1).jpg 
Views:	5 
Size:	519.7 KB 
ID:	154470
    Last edited by Dr_Mohammad; 18th July 2019 at 14:21.
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  11. #91
    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 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.



  12. #92
    Advanced Member level 5
    Points: 23,818, Level: 37
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,569
    Helped
    1006 / 1006
    Points
    23,818
    Level
    37

    Re: how to design a thermostat without Microcontroller?

    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.


    1 members found this post helpful.

  13. #93
    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
    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.
    c1 is connected to op-amp power rails.
    today I will connect 0.33uf and 0.1uf to input andoutput pins of 7805 Regulator as decoupling Caps. please say their type & capacity too.

    - - - Updated - - -

    Quote Originally Posted by kripacharya View Post
    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.
    Click image for larger version. 

Name:	IMG_20190718_1821034.jpg 
Views:	4 
Size:	485.8 KB 
ID:	154471

    in this picture the LM35 is visible.
    Last edited by Dr_Mohammad; 18th July 2019 at 15:15.
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  14. #94
    Super Moderator
    Points: 80,586, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,205
    Helped
    4410 / 4410
    Points
    80,586
    Level
    69

    Re: how to design a thermostat without Microcontroller?

    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.
    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.



  15. #95
    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
    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.
    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
    Last edited by Dr_Mohammad; 18th July 2019 at 15:30.
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  16. #96
    Advanced Member level 5
    Points: 16,730, Level: 31

    Join Date
    Nov 2012
    Posts
    3,071
    Helped
    743 / 743
    Points
    16,730
    Level
    31

    Re: how to design a thermostat without Microcontroller?

    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.



  17. #97
    Advanced Member level 5
    Points: 23,818, Level: 37
    barry's Avatar
    Join Date
    Mar 2005
    Location
    California, USA
    Posts
    4,569
    Helped
    1006 / 1006
    Points
    23,818
    Level
    37

    Re: how to design a thermostat without Microcontroller?

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

    I pretty much disagree with most of this.

    1) C1 should just be replaced with a 0.1.

    2) LM35 does not like to drive a capacitive load (I assume that's what U1 is); eliminate C3 altogether.

    4) Adding capacitance to the output of an opamp will just make it more unstable. If you want to put it anywhere, put it on the base of Q1.

    5) Adding a resistor from pin 3 to ground won't help anything.

    6) Voltage adder? What voltages are you adding?



    •   AltAdvertisement

        
       

  18. #98
    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
    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
    He means between lm35 output pin and lm358 input pin, but close to lm358 side.

    I urge you again to put lm35 directly on board temporarily just for testing purpose, and try then.



    •   AltAdvertisement

        
       

  19. #99
    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?

    Mission Complete!

    Fistly, I should express my fullest appreciation to @betwixt, @Klaus, @kripacharya,@c_mitra, @barry, @FvM, and @andre_teprom and those who valuable guidlines and patience helped me to get a better results. surely your efforts and patience will not be forgotten.

    Dear Experts, after yesterday discussion I applied the following modifications to the circuit and furtunatlly the relay chattering removed and the thermostat works accurately:

    1-the emmiter of Transistor connected to the Powe Supply ground.
    2-the pararelled capacitor to LM35 removed.
    3- an RC network connected as close as to pins 2 and 4 (R=4.7K & C=0.1UF).
    4-decoupling capacitors imported to the circuit. 0.47uf & 0.1uf connected to input and output pins of 7805 Regulator, respectively.
    5- 0.1uf also pararelled to the relay coil.
    6-10uF cpacitore connected to Q1's base.

    Click image for larger version. 

Name:	final3.jpg 
Views:	8 
Size:	158.5 KB 
ID:	154485
    Click image for larger version. 

Name:	IMG_20190719_1442305.jpg 
Views:	4 
Size:	509.8 KB 
ID:	154486
    Click image for larger version. 

Name:	IMG_20190719_1442477.jpg 
Views:	5 
Size:	526.7 KB 
ID:	154487

    Excuse me for troublig you. good luck.
    your lover, Mohammad Pirzadi from Iran.
    Last edited by Dr_Mohammad; 19th July 2019 at 14:05.
    Hope is a good thing, maybe the best of things and no good thing ever dies (The Shawshank Redemption).



  20. #100
    Advanced Member level 5
    Points: 16,730, Level: 31

    Join Date
    Nov 2012
    Posts
    3,071
    Helped
    743 / 743
    Points
    16,730
    Level
    31

    Re: how to design a thermostat without Microcontroller?

    furtunatlly the relay chattering removed and the thermostat works accurately:
    You still need to work on the span control (the hysteresis range) and the temp setting.

    In the present case, they are strongly interacting. You should be able to set the actual temp and the hysteresis control independently.

    That will involve only a couple of resistors and one more potentiometer.

    You are using film capacitors but for this application, ceramic capacitors will be somewhat better.

    See the application note for LM35 for more ideas.



--[[ ]]--