Electronics > Beginners

Comparator (LM393) not saturating at low frequencies

(1/7) > >>

Frongach:
Hello,
I've made a circuit to detect the zero crossing point of a low voltage sine wave from a signal generator (for testing) using an LM393 and based on the design from (http://www.ti.com/lit/an/snoa999/snoa999.pdf) "Zero crossing detection using comparator circuit" application note, the circuit is shown below. The output of the comparator is a square wave.

The circuit works great at frequencies above about 200 Hz. Below this, the square wave high and low levels begin to have a slope where the low level increases and the high decreases from their initial levels at the beginning of each cycle. I've attached a photo of the scope waveform. The lines are faint, but if the faint lines were darker, this is exactly what I see.

I've tried many of the usual advised things to improve comparator performance. Hysteresis (from output to + terminal) kills the signal below 50k Ohms, and a 100k resistor has no effect. I've attached (and removed!) a 2k2 pullup resistor from output to Vcc, which is required anyway for a decent output, but other values higher and lower give no further improvement. I've also tried capacitors (1pf +) to bypass the input voltage.

I've tried 5v up to 15v input voltage on the LM393, and have also put the output through a schmitt trigger, neither of which solved this.

Would anyone have any advice on this? Maybe I just need a different comparator, as I'm assuming what is happening is that the output transistors are not saturating.. I've looked for low frequency comparators but they don't seem to exist.

Thanks in advance, please let me know if any other details would help,
Brian

Gyro:
From your picture, you have your scope input coupling set to AC. The trace corresponds to what you would see at low frequencies with AC coupling. The faint lines are probably due to your scope not triggering properly on the degrading signal [EDIT: Or you have your dual timebase set to 'Mixed']


P.S. You may also start getting multiple transitions due to noise at low frequencies. You can add a high value feedback resistor from output to + input to provide some hysteresis too.

Frongach:
Gyro,
Thanks for your reply. I've tried many values for the hysteresis resistor, from 10k to 1M and like I said, below 50k the output disappears and above this there is no effect of the output. You're quite right about the AC coupling!
All the best,
Brian

Gyro:
Glad you've now got a sensible waveform. The first thing to do in such situations is look at your scope setting to see if it is lying to you - the AC coupling is a common one and you will learn to spot it immediately.

The value of the hysteresis resistor needs to be high compared to the source impedance - the idea is to feed back just a tiny amount of current from the output (which is swinging a long way compared to the input). You want just enough to ensure clean transition of the output as the input goes through zero (and is susceptible to noise) and no more.

As you have found, anything down at the 50k level will be enough to completely mess up the operation of your comparator circuit (~10k input impedance), causing it to latch in one state or the other. You need to be at least an order of magnitude higher.

Now that you are not trying to correct a non-existent output waveform problem, you can look at cleaning up any multiple transitions (you may not see any) as your input waveform goes through zero at low frequency.

floobydust:
LM393 output is open-collector, so you must have a pullup resistor to VCC, and low enough value the hysteresis resistor does not load it .
Compare to TLV7011 which has a push-pull output.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod