LM393 doesn't play well with any amount of input capacitance. (SOLVED)

Started by Andon, June 14, 2021, 03:52:15 PM

Previous topic - Next topic

Andon

Howdy! I'm putting together a comparator fuzz style circuit using an LM393, but I can't seem to get it to pass any signal at all when using an input capacitor, regardless of how large or small the value (larger values above 100nF will allow signal for a brief moment, but I assume that this is just alternating current that has been stored and then discharged).

I've even just stripped it down to just a basic comparator (see Figure 11 on page 10 of the LM393 data sheet) and no value of input capacitor will allow signal to pass. Is there any reason for this?

I've tried several LM393 ICs I have, and the problem is present with all of them, so it seems like a design issue that I'm missing. There's no mention of it in the data sheet that I can see, and I've searched just about every combination of terms that I can think of regarding this issue to no avail. Looking at other comparator fuzz designs (such as the LM311 Comparator Fuzz from Parasit Studio) I can see that input capacitors can be successfully used with those ICs, so perhaps this is just an issue with the LM393?

On the plus side the fuzz itself is a lot of fun to play, but unless I don't really need it I'd like to be able to add an input capacitor as a matter of good practice. Thanks!
  • SUPPORTER

antonis

Could you plz post a schematic of your particular design..??

P.S.
As you can see, LM311 Fuzz has DC on both inputs.. :icon_wink:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Andon

Quote from: antonis on June 14, 2021, 04:08:31 PM
Could you plz post a schematic of your particular design..??
I'm mean even with just the basic comparator diagram I linked (signal in to non-inverting input, inverting input tied to ground, output with a 3k resistor to V+) it won't work with an input cap, but...

Quote from: antonis on June 14, 2021, 04:08:31 PM
P.S.
As you can see, LM311 Fuzz has DC on both inputs.. :icon_wink:
I had noticed that, but oh goodness, was it really that simple? I connected a 1K resistor across the non-inverting and inverting input (the latter is tied to ground per the data sheet regarding what to do with unused inputs) and it works with an input cap!  :icon_redface:

But... why? With the inverting input tied to ground and no input cap on the non-inverting input the circuit works, but if the inputs aren't linked then any capacitance will prevent the circuit from passing signal. What does connecting the inputs do that allows signal to pass when using an input capacitor?  :icon_confused:

EDIT: To clarify, even if you just add an input capacitor to the "basic comparator" diagram from the data sheet linked above it won't work as is, but connecting the inputs allows it to pass signal, and that's what I don't understand. I've also posted the diagram from the data sheet below:

  • SUPPORTER

antonis

Quote from: Andon on June 14, 2021, 04:30:20 PM
But... why? With the inverting input tied to ground and no input cap on the non-inverting input the circuit works, but if the inputs aren't linked then any capacitance will prevent the circuit from passing signal. What does connecting the inputs do that allows signal to pass when using an input capacitor?  :icon_confused:

EDIT: To clarify, even if you just add an input capacitor to the "basic comparator" diagram linked above it won't work as is, but connecting the inputs allows it to pass signal, and that's what I don't understand.

Comparators need DC voltage for both their inputs VREF & VIN..
AC signal disturbes "instantly" that DC level resulting in alternative High-Low output..
When there is DC on VREF but AC only on VIN, signal can't be superimposed to "anything", cause there isn't any DC path for input cap discharge..

P.S.
Do you feed comparator with dual supply or single one..??

edit:
Quote from: Andon on June 14, 2021, 04:30:20 PM
I connected a 1K resistor across the non-inverting and inverting input (the latter is tied to ground per the data sheet regarding what to do with unused inputs)
That puzzles me a bit..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Andon

Quote from: antonis on June 14, 2021, 04:47:12 PM

Comparators need DC voltage for both their inputs VREF & VIN..
Ah, even when an unused input is tied to ground it seems.

Quote from: antonis on June 14, 2021, 04:47:12 PM
P.S.
Do you feed comparator with dual supply or single one..??
I'm using a single 9v supply, so my LM393 pinout now looks like this:

pin 1: output, 3k resistor to 9v
pin 2: ground
pin 3: input, 1k resistor to pin 2
pin 4: ground
pin 5: ground
pin 6: ground
pin 7: x
pin 8: 9v
  • SUPPORTER

anotherjim

I think both the inputs of the comparator have input bias leakage current. Without a DC input (via a resistor), your input capacitor charges from the input leakage eventually reaching some voltage so far away from the DC voltage on the other input that signal voltage cannot swing far enough for the comparator output to switch.

Datasheets may only show incomplete circuits. In the 393 data, it is assumed the "rest of it" provides an appropriate connection to the inputs. The DC input voltages, AC coupling, input impedance or any other signal conditioning is not the comparators problem. The only thing the basic comparator needs to work is the output pull-up resistor to +V.

antonis

Quote from: Andon on June 14, 2021, 04:58:22 PM
Ah, even when an unused input is tied to ground it seems.

Unused inputs refer on unused amps.. :icon_wink:
(there is no functional connection between the 2 amps internally other than power supply..)

Connect VREF pin (2) to 4.5V (via a resistive voltage divider) and VIN to VREF (actually, also to 4.5V) via some kilo resistor..
(just like LM311 Fuzz..)
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Andon

Ah ha ha, right I knew both sides of the dual IC weren't connected but I was just taking the data sheet literally and playing it safe. I had tried using 4.5v for both but couldn't get any signal, so I'll try reconnecting using resistors per your suggestion. Thanks!

What I was typing out as you replied:

Quote from: antonis link=topic=127360.msg1221033#msg1221033
edit:

That puzzles me a bit..
Per section 7.4 and 8.1 of the data sheet (though I think it assumes a dual supply since it mentions battery use, a la the Anderton Comparator Fuzz, and I also suppose I should ground pin 7 as well according section 7.4, while section 8.1 just mentions input pins), and I've also seen it mentioned elsewhere to ground unused inputs of comparator ICs.

Quote from: anotherjim on June 14, 2021, 05:04:26 PM
I think both the inputs of the comparator have input bias leakage current. Without a DC input (via a resistor), your input capacitor charges from the input leakage eventually reaching some voltage so far away from the DC voltage on the other input that signal voltage cannot swing far enough for the comparator output to switch.
Okay, this makes some sense.

Quote from: anotherjim on June 14, 2021, 05:04:26 PM
Datasheets may only show incomplete circuits. In the 393 data, it is assumed the "rest of it" provides an appropriate connection to the inputs. The DC input voltages, AC coupling, input impedance or any other signal conditioning is not the comparators problem. The only thing the basic comparator needs to work is the output pull-up resistor to +V.
Oh of course, just like an effect circuit may not show the input/output buffers, power supply, etc., but I just would have figured that with something like both inputs needing supply it would have been mentioned a little more explicitly outside of VREF which I mistook as ground (so I guess that's on me).

EDIT: I should say I conflated VREF for ground because of the Anderton Comparator Fuzz thread mentioning that builds modified to use 9v supply instead of battery could be tied to ground instead of VREF, but still.
  • SUPPORTER

anotherjim

Different comparator types have different input limits. For a single supply, the 0v ground may not be a "legal" input voltage since it's the same as the chip negative supply pin. Even if it can allow the negative supply voltage at an input, it may not allow the input to be negative below that -  if you AC couple a signal to a 0v referenced input, when the signal swings negative, it will try to pull that pins input voltage negative with it. Further on in the datasheet, you will find inputs including a diode and some resistors to prevent excessive negative voltages when the reference DC is 0v
.