Author Topic: Comparator with Hysteresis problem  (Read 1706 times)

0 Members and 1 Guest are viewing this topic.

Offline ranthalionTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Comparator with Hysteresis problem
« on: August 04, 2019, 03:17:21 pm »
I'm having an issue with the following circuit.  Channel 2 behaves as intended and turns the output off when the input duty cycle is <10%, but Channel 1 does not turn off.  I found that Channel 1 will turn off if I measure the voltage on the non-inverting input of the comparator.  So, it works if I am measuring the voltage, but not under normal operation? 

What would be the cause of this?  How should I fix it?

I also tried adding a 5.1M resistor to ground to maybe simulate having the meter connected.  That did change the behavior, but it seems to break the hysteresis since the output starting oscillating.

803130-0

803124-1

 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1048
  • Country: ca
Re: Comparator with Hysteresis problem
« Reply #1 on: August 04, 2019, 05:47:28 pm »
What are the voltages on U1A-1, U2A-1, -2, -3?

The schematic shows the power pins of U1 are connected twice - are the power pins of U2 connected?
 

Offline ranthalionTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: Comparator with Hysteresis problem
« Reply #2 on: August 04, 2019, 09:14:27 pm »
The appearance of the double connection on U1 is just a side effect of the symbol. The single pin is connected to 12v.  U2 is correctly connected to 12v and GND, but the symbol doens't show it.

That's the part that is troublesome.  The circuit works correctly if I measure voltage.


Duty Cycle
0%
10%
11%
10%
OpAmp OutputU1A-10.04v   0.95v   0.99v   0.95v   
Comparator Output    U2A-10.03v0.03v4.72v0.03v
Comparator Inverting Input    U2A-20.99v0.99v0.99v0.99v
Comparator Non-inverting Input    U2A-30.05v0.94v1.01v0.94v

« Last Edit: August 04, 2019, 09:24:35 pm by ranthalion »
 

Offline JagV12

  • Contributor
  • Posts: 25
  • Country: fr
Re: Comparator with Hysteresis problem
« Reply #3 on: August 04, 2019, 09:37:17 pm »
What about J6 ?
 

Offline ranthalionTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: Comparator with Hysteresis problem
« Reply #4 on: August 04, 2019, 09:38:57 pm »
J6 is a jumper to select between 3.3v or 5v PWM input.  I have it configured for 3.3v PWM input.  It configures the gain to appropriately scale the input signal to approximately 0-10v.
« Last Edit: August 04, 2019, 09:40:42 pm by ranthalion »
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Comparator with Hysteresis problem
« Reply #5 on: August 05, 2019, 02:13:35 pm »
I can't see any reason why that shouldn't work. LM358 outputs don't sink below 1V very well but with those high resistances it should be fine. Are you sure the LM393's R19 and R20 are really 100k and 5M1.
.  That took much longer than I thought it would.
 

Offline ranthalionTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: Comparator with Hysteresis problem
« Reply #6 on: August 05, 2019, 02:20:38 pm »
They are pretty close to those values (1 percent).  I'll be able to hook it up to a scope tomorrow to see if that gives any new clues.
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Comparator with Hysteresis problem
« Reply #7 on: August 06, 2019, 04:15:49 am »
Comparators do not like high input impedances so it may be oscillating.
 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1048
  • Country: ca
Re: Comparator with Hysteresis problem
« Reply #8 on: August 07, 2019, 06:12:31 pm »
Are the decoupling caps on +12V right near U1 & U2?

Can you see anything unusual on U2A-1 with a scope when a triangle wave input signal is applied to the input? 

Since U2A isn't switching correctly, I'm thinking there's some spurious coupling to its '-' input.  A quick fix is to try 10 to 100n in parallel with R23 and if no joy then a few pF in parallel with R20 and then R19.
 
David makes a good point about possible oscillation due to high impedances.   I'd consider reducing the values of R19, R20, R22 & R23 by a common factor of 5 to 25.  Many spurious coupling paths are layout dependant so in the worst case, all of the changes may be needed. 
 

Offline njmicheli

  • Newbie
  • Posts: 3
  • Country: us
Re: Comparator with Hysteresis problem
« Reply #9 on: August 12, 2019, 02:37:39 pm »
So, it works if I am measuring the voltage, but not under normal operation? 



Is your meter probe completing a connection that is otherwise poor?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf