Comparator with Hysteresis problem - Page 1
Forum section: electronics / projects

author: ranthalion
author_rank: Contributor
timestamp: August 04, 2019, 03:17:21 pm
content: 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.

author: duak
author_rank: Super Contributor
timestamp: August 04, 2019, 05:47:28 pm
content: 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?

author: ranthalion
author_rank: Contributor
timestamp: August 04, 2019, 09:14:27 pm
content: 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 Cycle0%10%11%10%OpAmp OutputU1A-10.04v0.95v0.99v0.95vComparator OutputU2A-10.03v0.03v4.72v0.03vComparator Inverting InputU2A-20.99v0.99v0.99v0.99vComparator Non-inverting InputU2A-30.05v0.94v1.01v0.94v

author: JagV12
author_rank: Contributor
timestamp: August 04, 2019, 09:37:17 pm
content: What about J6 ?

author: ranthalion
author_rank: Contributor
timestamp: August 04, 2019, 09:38:57 pm
content: 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.

author: StillTrying
author_rank: Super Contributor
timestamp: August 05, 2019, 02:13:35 pm
content: 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.

author: ranthalion
author_rank: Contributor
timestamp: August 05, 2019, 02:20:38 pm
content: 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.

author: David Hess
author_rank: Super Contributor
timestamp: August 06, 2019, 04:15:49 am
content: Comparators do not like high input impedances so it may be oscillating.

author: duak
author_rank: Super Contributor
timestamp: August 07, 2019, 06:12:31 pm
content: 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.

author: njmicheli
author_rank: Newbie
timestamp: August 12, 2019, 02:37:39 pm
content: Quote from: ranthalion on August 04, 2019, 03:17:21 pmIs your meter probe completing a connection that is otherwise poor?