Zero Crossing Detector Comparator's output noisy - Page 1
Forum section: electronics / beginners

author: RawCode
author_rank: Regular Contributor
timestamp: June 12, 2023, 06:04:35 pm
content: Hello everyone,I have a quite newbie question.I have built a Zero Crossing Detector using a TLV3602 according to the attached schematic (sorry for the everycircuit schematic, I'm on the go).The problem is that this circuit oscillates when the input is low/near ground/floating, I.e., the comparator instead of outputting zero volts it oscillates. I also tried to tie the non-inverting input to ground via a 10k resistor, but it didn't solve the problem.The idea was to obtain a perfect ZCD, but clearly noise/offsets affect the output. Adding hysteresis could solve the issue, but it will shift the detection from zero to few mV. How can I fix this problem maintaining the ZCD feature?

author: TimFox
author_rank: Super Contributor
timestamp: June 12, 2023, 07:13:11 pm
content: The input common-mode operating range for the TLV3602 only goes toVEE- (0.3 V) at the negative end.What diode are you using? With an 1N4148 or equivalent, the input will go to aboutVEE- (0.6 V).You didn't indicate the power connections to the device, but this device usually is single-rail, withVEE= 0 (ground).If you want very accurate ZCD, it would be easier to use split power rails and use a precision op amp before the comparator.Do you need such a fast device for your application? It makes noise issues far more difficult.

author: RawCode
author_rank: Regular Contributor
timestamp: June 12, 2023, 08:32:16 pm
content: Yes, it need to be that fast, since I need to perform ZCD of fast signals.If I would add a resistor from the output to the non-inverting node, how much can I reduce this behaviour?

author: TimFox
author_rank: Super Contributor
timestamp: June 12, 2023, 09:47:07 pm
content: That will give you hysteresis, possibly useful, but if you use a single-rail power supply, the output swing will be positive definite, and that will add a positive offset to your input.

author: MasterT
author_rank: Frequent Contributor
timestamp: June 12, 2023, 09:52:53 pm
content: Use capacitor in positive feedback line, see picture, probably you don't need a diode and 100k resistor - just cap.

author: TimFox
author_rank: Super Contributor
timestamp: June 12, 2023, 10:13:23 pm
content: Also note that by its very nature, which produces different thresholds for positive-slope and negative-slope input, hysteresis (even carefully done) cannot give you the same zero-crossing trigger voltage for positive and negative slopes.When faced with a similar need, and not afraid of split power supply rails, I used a high-speed inverting op amp, with back-to-back Schottky diodes in parallel with a suitable resistor for feedback, to drive a high-speed comparator.The diodes in the feedback circuit limited the output swing and avoided saturation of the amplifier (hence the need for Schottkys), and the gain as the input went through zero was high enough to drive the comparator input cleanly.

author: Circlotron
author_rank: Super Contributor
timestamp: June 13, 2023, 12:34:36 am
content: If you are only interested in negative going ZCD maybe you could have the comparator output trigger a monostable that clamps the input for a duration slightly shorter than the expected time until the next negative going zero crossing.

author: David Hess
author_rank: Super Contributor
timestamp: June 13, 2023, 08:14:54 am
content: Hysteresis from capacitive positive feedback can reset between cycles if the capacitance is small enough, but the comparator is still going to trigger on noise causing jitter.A better way is to phase lock a clean oscillator to the noisy input signal and then do zero crossing detection on the clean oscillator signal.