Unstability in comparator circuit

Discussion in 'The Projects Forum' started by skj, Jul 17, 2013.

  1. skj

    Thread Starter Member

    May 20, 2010
    22
    0
    I am comparing two signals at pin7 and 6 of Comparator Initially I did not provide any hysterisis resulting in the chattering of the relay when signals cross levels, then I added positive feed back to rectify this now my concern is :-

    1. whether my circuit is ok ?
    2. When I set a Reference at viper of VR5 (in my circuit it is 8.46v and monitor this ref by connecting a voltmeter. I observe a change (may be due to positive feedback) at VR5 viper whenever I vary RV5, So how do I monitor voltage at VR5 viper correctly?
    3. Circuit is very sensitive even touching screwdriver tip to vipers activates relay causing malfunction. any solutions please.
    4. I need a dead zone of around 0.1 to0.5 volts to avoid chattering of the relay.
    4. Circuit is a part of a system controlling further operations.
    5 I am attaching part of the circuit in PDF format.
     
  2. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,525
    It's kind of unusual to have a comparator circuit with bot inputs being variable. To get what your wanting, a 'dead zone?' of ~1/2 volt, you might want to consider a window comparator rather than a single comparator.
     
  3. rsfoto

    Member

    May 14, 2013
    134
    1
    I can not answer your other questions, but I noticed a similar thing even touching the LM339 with my finger while using only 2 of the 4 comparators.

    Connect all Unused pins to ground and it goes away. At least it worked for me. It is also recommended in the datasheet.

    Also use a wooden or isolated screwdriver when adjusting the Pot. I use Chopsticks :D
     
    Last edited: Jul 17, 2013
  4. wayneh

    Expert

    Sep 9, 2010
    12,100
    3,034
    Too many vipers! :eek:

    Snakes on a breadboard?
     
    SgtWookie, shortbus and tshuck like this.
  5. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,525
    All unused inputs should be tied to ground on ICs.
     
    rsfoto likes this.
  6. MOR_AL

    New Member

    Jun 13, 2013
    3
    0
    V1(max) =< 6,35V
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,720
    4,788
    As noted by others, you should tie unused inputs to a supply. I generally don't tie them both to ground because then I have nominally 0V differentail applied to the input of an opamp and if the input offset voltage is low enough (and if the input voltage range includes ground) then the amp can still flail. I'll generally tie one input to the low supply and one input to the high supply, preferably through resistors.

    You might want to look at using an LM339 since it is intended to be used as a comparator.

    What is the purpose of R3? It would be needed if you were using an LM339, but not an LM324.

    What is the value of VR5?

    To find your hysteresis, you want to assume the output of the opamp is high, which would be somewhere around 10V, and calculate the voltage on the non-inverting input of the amplifier. Then assume the output is low and repeat the exercise. The difference between the two is the hysteresis width.
     
  8. rsfoto

    Member

    May 14, 2013
    134
    1
    Thank you for the correction. Did read the data sheet to fast. Sorry
     
  9. skj

    Thread Starter Member

    May 20, 2010
    22
    0
    -------------------------------------------------------------------------

    Thanks for your comments I am using LM339, Value of VR5 is 10k R3 being pull-up resistance. with present values of R1 and R2 aprox hysterisis is about 0.5 Volts. Thanks for your’s and other member’s suggestion to connect unused inputs of LM339 to supply positive and grounds to avoid false actuation of the relay I am doing that.now, my concern is at the time of optimization of ckt in actual conditions, as I a have observed Varying input at pin 6 reflects change in reference value at viper of ref pot VR5 due to positive feedback at pin7.How do I monitor correct voltage at viper of VR5 or what changes are required in present ckt. Comments please.

    This circuit is a part of main circuit that is monitoring and controlling various conditions of charge and discharge of battery and in turn controlling inverter connected to solar panels

    PS I am attaching a slightly changed ckt for clarity
    [/CENTER]
     
  10. Johann

    Senior Member

    Nov 27, 2006
    190
    30
    Is your reference 12V (across VR5) the same 12V as the 12V supply to the relay? Also, is the relay protected with a diode?
    Your reference voltage should not come straight from your 12V that operates the relay. I usually put a small +8V regulator between the "raw" supply and the reference point.
     
  11. skj

    Thread Starter Member

    May 20, 2010
    22
    0
    Thanks for response Yes relay supply, comparator supply is derived from battery using positive regulator LM7812 except for the feed back RV5 which is derived directly from battery. Freewheeling diode is connected across relay coil,do you mean that a separate positive regulator say 8V be connected to 7812 output and VR5 to be connected across this supply?
     
  12. Johann

    Senior Member

    Nov 27, 2006
    190
    30
    Hi, Yes, it is more important to have a well stabilized reference, otherwise it will vary with varying loading on the main source of power. It won't harm to use an eight or 9 volt regulator to only supply VR5. Of course there are other ways too, like a zener or other dedicated fixed reference diode.

    If you are going to use a 7808, just remember the decoupling caps between +Vin and ground (common) and also between +Vout (+8V) and common. Usually 0.1mfd each and very close to the 7808. You then need to tweek the pot to suit the lower reference voltage.

    I hope this helps!
     
Loading...