+ Reply to Thread
Page 1 of 3
1 2 3 Last
Results 1 to 15 of 35

Thread: Need help increasing hysterisis for comparator circuit

  1. #1
    1abeng Newbie
    Join Date
    Jun 2009
    Location
    Wilmington NC
    Posts
    11

    Need help increasing hysterisis for comparator circuit

    This circuit determines which voltage supply to switch to the motor - solar panel (SUN+) or power supply (24V+). My comparator circuit is toggling on/off when the +V IN is near the -V IN (6.5V). It cycles very fast.

    Can anyone give advice on preventing the toggle? Circuit is attached.

    Thanks in advance
    Attached Images


  2. #2
    Chippie Excellent Chippie Excellent Chippie Excellent Chippie Excellent Chippie Excellent
    Join Date
    Mar 2003
    Location
    Good 'ole England
    Posts
    939

    Looks to me like there's no feedback around the controlling comparator... U4.1, but I could be wrong..

    See the attached sketch
    Attached Images
    Last edited by Chippie; 18th June 2009 at 04:28 PM.
    Eccentric millionaire financed by 'er indoors

  3. #3
    1abeng Newbie
    Join Date
    Jun 2009
    Location
    Wilmington NC
    Posts
    11

    I can't claim the design. It is a prototype product for me. I tried a few feedback options but I don't know enough to select the right components or put them in the right place.

  4. #4
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,454
    Blog Entries
    9

    Quote Originally Posted by 1abeng View Post
    This circuit determines which voltage supply to switch to the motor - solar panel (SUN+) or power supply (24V+). My comparator circuit is toggling on/off when the +V IN is near the -V IN (6.5V). It cycles very fast.

    Can anyone give advice on preventing the toggle? Circuit is attached.

    Thanks in advance
    hi,
    Usually adding a resistor between pins 1 and 3 of the comparator will add hysteresis.
    Start with a high value, say 470K,, the lower the value the greater the 'dead band'.

    EDIT: if you do add hysteresis you may have to readjust the SUN on/off points!!
    Last edited by ericgibbs; 18th June 2009 at 04:24 PM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  5. #5
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,454
    Blog Entries
    9

    hi 1ab,
    This are the results from a LTspice simulation.

    The results dont agree with what you say on the circuit diagram.???

    Check thru this LTS circuit, the caps have been omitted for clarity.

    What colour is the LED 'D2' on my circuit.???
    Attached Images
    Last edited by ericgibbs; 18th June 2009 at 05:56 PM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  6. #6
    1abeng Newbie
    Join Date
    Jun 2009
    Location
    Wilmington NC
    Posts
    11

    Thank you for your review! The D2 color is green, D1 is Yellow. The Vsun doesn't react the same as the simulation. As soon as the load is removed, the voltage shoots up past the upper threshold but it can't generate the current to keep it above the bottom threshold when it switches back. I connected a resistor (180ohm/5W) across the +Vsun and -Vsun when not in SUN mode (same trigger as relay K1) to keep the voltage down but it required a delay-on-release relay (50ms) to work. There must be a better way.

    Thanks again.

  7. #7
    BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent
    Join Date
    Jun 2009
    Location
    Huntsville, Alabama USA
    Posts
    1,942

    Quote Originally Posted by ericgibbs View Post
    hi 1ab,
    This are the results from a LTspice simulation.

    The results dont agree with what you say on the circuit diagram.???

    Check thru this LTS circuit, the caps have been omitted for clarity.

    What colour is the LED 'D2' on my circuit.???

    I thought it was U1 that needed the feedback?!?!

    EDIT: Ok, I see where the hysteresis is coming from now. Never saw it done that way before. Duh!
    Last edited by BrownOut; 18th June 2009 at 06:48 PM.

  8. #8
    MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent MrAl Excellent
    Join Date
    Sep 2008
    Location
    NJ
    Posts
    1,191

    Hi,

    The placement of C23 is part of the problem because it prevents the
    snap action of the hysteresis from working properly. The design should
    be changed to eliminate this cap or to modify the hysteresis feedback.

    One way might be to place the hysteresis resistor (of the right value)
    between pins 1 and 3 and let the LED section go without any hysteresis.
    This way the cap C23 can be left there for a little filtering.
    You also need to add some resistance between pin 3 and the two
    caps connected to that pin so the hysteresis works properly.
    Last edited by MrAl; 18th June 2009 at 06:40 PM.

  9. #9
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,454
    Blog Entries
    9

    Quote Originally Posted by 1abeng View Post
    Thank you for your review! The D2 color is green, D1 is Yellow. The Vsun doesn't react the same as the simulation. As soon as the load is removed, the voltage shoots up past the upper threshold but it can't generate the current to keep it above the bottom threshold when it switches back. I connected a resistor (180ohm/5W) across the +Vsun and -Vsun when not in SUN mode (same trigger as relay K1) to keep the voltage down but it required a delay-on-release relay (50ms) to work. There must be a better way.

    Thanks again.
    hi,
    The point I noted was the switching points, the sim makes these 4V and 10V.!

    The voltages marked on the circuit marked at point Vr dont agree with the sim.

    EDIT:

    I'll re-run sims with C4, also introduce the offload jump OK, let you know the result.

    BTW: making D2 a green LED, changes the limits to 4V and 11V
    Last edited by ericgibbs; 18th June 2009 at 06:52 PM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  10. #10
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,454
    Blog Entries
    9

    Quote Originally Posted by BrownOut View Post
    I thought it was U1 that needed the feedback?!?!
    hi,
    The circuit uses the upper LM393 to provide the hysteresis for the first LM393.

    The range is +4V and +10V according to the LTS sim,
    Last edited by ericgibbs; 18th June 2009 at 06:51 PM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  11. #11
    BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent BrownOut Excellent
    Join Date
    Jun 2009
    Location
    Huntsville, Alabama USA
    Posts
    1,942

    Quote Originally Posted by ericgibbs View Post
    hi,
    The circuit uses the upper LM393 to provide the hysteresis for the first LM393.

    The range is +4V and +10V according to the LTS sim,
    Right! Took me a moment to realize that. Never saw it done that way before.
    Last edited by BrownOut; 18th June 2009 at 06:49 PM.

  12. #12
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,454
    Blog Entries
    9

    Quote Originally Posted by BrownOut View Post
    Right! Took me a moment to realize that. Never saw it done that way before.
    Its a nice method to get such a wide hysteresis limit.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  13. #13
    1abeng Newbie
    Join Date
    Jun 2009
    Location
    Wilmington NC
    Posts
    11

    I'm not sure what the difference is. The actual circuit switches at 4.5V and 13.1V.

    Quote Originally Posted by MrAl View Post
    Hi,

    The placement of C23 is part of the problem because it prevents the
    snap action of the hysteresis from working properly. The design should
    be changed to eliminate this cap or to modify the hysteresis feedback.

    One way might be to place the hysteresis resistor (of the right value)
    between pins 1 and 3 and let the LED section go without any hysteresis.
    This way the cap C23 can be left there for a little filtering.
    You also need to add some resistance between pin 3 and the two
    caps connected to that pin so the hysteresis works properly.
    MrAI, Are you talking about moving R29 to U4.1 pins 1 and 3 then adding R31 between pin 3 and C21 / C22? What value is needed for R31?

    FYI - the circuit reacts very differently on the solar panel than on a power supply simulating the panel by restricting the current. The cycling is very fast when on the panel partially covered.

  14. #14
    ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent ericgibbs Excellent
    Join Date
    Jan 2007
    Location
    Hampshire. England.
    Posts
    10,454
    Blog Entries
    9

    hi 1ab,
    With the high jump in SUN voltage when going off load, the circuit is definitely unstable when running in simulation.!

    I'll see if I can suggest any changes,, it will be tomorrow OK.
    Attached Images
    Last edited by ericgibbs; 18th June 2009 at 07:35 PM.
    Eric " Good enough is Perfect "
    I will NOT answer PM's requesting technical help, please use the Forum
    PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

  15. #15
    1abeng Newbie
    Join Date
    Jun 2009
    Location
    Wilmington NC
    Posts
    11

    A 220KOhm resistor accross U4.1 pins 1 and 3 didn't make much difference. It may have slowed the cycling a little. I have limited resistor values to test.


    If this works, what are the pros and cons of doing this:
    I connected a resistor (180ohm/5W) across the +Vsun and -Vsun when not in SUN mode (same trigger as relay K1) to keep the voltage down but it required a delay-on-release relay (50ms) to work.
    Last edited by 1abeng; 18th June 2009 at 09:56 PM.

+ Reply to Thread
Page 1 of 3
1 2 3 Last

Similar Threads

  1. Increasing output current for charge pump circuit
    By eafindme in forum Electronic Projects Design/Ideas/Reviews
    Replies: 1
    Latest: 14th May 2009, 12:37 PM
  2. Comparator circuit + OP Amp 741 help
    By Hussain in forum Electronic Projects Design/Ideas/Reviews
    Replies: 10
    Latest: 22nd January 2009, 12:50 PM
  3. Comparator circuit
    By prprog in forum General Electronics Chat
    Replies: 22
    Latest: 5th June 2008, 01:59 PM
  4. Comparator Circuit
    By bigG in forum General Electronics Chat
    Replies: 4
    Latest: 22nd March 2007, 10:52 PM
  5. Comparator circuit
    By George L. in forum General Electronics Chat
    Replies: 3
    Latest: 21st June 2005, 06:51 AM

Tags for this Thread