4
\$\begingroup\$

I am applying a Schmitt-trigger to the waveform given in the figure below.

enter image description here.

This is a 3.5 volt signal and I want to perform thresholding so I use 1.58 volts as upper threshold and 1.17 volts as lower threshold for my Schmitt-trigger circuit. My designed Schmitt trigger is given in the image below.

enter image description here

After applying Schmitt-trigger I was expecting a square waveform and it should be. But I got a signal that was not a pure square wave it was rounded from the top. the resulting waveform is as follows:

enter image description here

My question is why it is happening? Why I am not getting a square waveform as an output?

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Could you clarify the schematic? the values are those in red or in blue? Are you sure you mounted an LM339? it shouldn't be able to make such a waveform since it has an ouput only stage. Is seems the output from an opamp and not a comparator \$\endgroup\$ Mar 31, 2021 at 7:08
  • \$\begingroup\$ Have you probed VDD at R6? I am guessing that it is not always 5V. The 5V may be sagging when the output is high, but the sagging wouldn't be caused by this circuit, but another circuit not shown. Do you have decoupling caps on your 5V? \$\endgroup\$
    – Mattman944
    Mar 31, 2021 at 7:21
  • \$\begingroup\$ What frequency is the signal and have you considered the RC effect of the scope probe. \$\endgroup\$
    – Andy aka
    Mar 31, 2021 at 7:43
  • \$\begingroup\$ red are the actual values and i have used lm339 ic. \$\endgroup\$ Apr 2, 2021 at 6:01

2 Answers 2

3
\$\begingroup\$

The LM339 has an open-collector output stage, which makes it's high state output value dependent on many things - none of which are the LM339 itself.

When the output is supposed to be high, the voltage level is dependent on VDD5B, R6, R7, R8, R9, the input voltage OUTB and its source impedance, and whatever OUT2 is connected to, its bias point voltage, and its impedance. As long as all of those details are secret, so is the reason the waveform top is not flat.

For example, if the waveform peak value is 4.5 V, then 167 uA of current is going somewhere. It cannot be going through R7, because that would create a 50 V voltage crop across the resistor. However, if whatever OUT2 goes to is held at approx. 2.8 V with a zero ohm source impedance, that would explain the output not being the full 5.0 V.

Disconnect R9 and see what the pin 1 waveform looks like.

Note - your schematic does not show the power supply rails for U1 or any power supply decoupling. These are important for proper operation.

\$\endgroup\$
2
\$\begingroup\$

Your 2nd figure shows that your output levels are of 4.5V. But according to datasheet lm339A is not rail to rail. So your max output should be of 3.4V. By changing the resistor R6 from 3K to 10K will solve the problem.

\$\endgroup\$
2
  • \$\begingroup\$ The strange thing is that the LM339 is a pull-down only output comparator so the output should be much more than 4.5V. From the input side the 3.5V signal is on the limit of the VCC-1.5 limit but the 339 works fine if even one input is in the common mode range (it's specified) \$\endgroup\$ Mar 31, 2021 at 7:11
  • \$\begingroup\$ Why do you think the max output should be 3.5 V? Have you read this in the datasheet? \$\endgroup\$
    – AnalogKid
    Apr 1, 2021 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.