Maker Pro
Maker Pro

Non zero output from LM358 even though input is zero

Arbit

Sep 21, 2021
2
Joined
Sep 21, 2021
Messages
2
Hi
I was using LM358 as voltage comparator in non inverting configuration
I gave 5V to vcc and 2.5V to inverting pin through a potentiometer
The issue is I am getting a output voltage of approx 3.8V even when the supply to the non inverting terminal is zero

I get output no matter I set the voltage of the non inverting pin zero or less than or more than that of inverting terminal
Also the ic gives the same output when non inverting is given some voltage and inverting is zero

The ic output gets zero only when both inverting and non inverting terminals are zero

Please help me to sort this

I desire to get high output only when the voltage at non inverting is greater than that at inverting i.e 2.5V
1632257534757-png.248535
 

Nanren888

Nov 8, 2015
622
Joined
Nov 8, 2015
Messages
622
Can't say that I am an expert on the LM358.
Looking at the datasheet it gives a typical high output level of 3.5 volts, if VCC is 5volts.
This seems to indicate that the output level you quote might be the high output: that is, as high as it goes.
.
Your circuit didn't seem to post. Maybe try shrinking the image a little.
.
Not quite sure what your references to zero volts are.
By comparator, do you mean no feedback resistors, just open-loop gain?
.
If so, as you suggest, a small offset voltage aside, you should see a transiition as one of the differential inputs crosses over the other.
The differential range of this amp, is good, I suspect. Setting one input near mid-rail should work as you suggest.
Checked the wiring?
LM358 is a dual, right?
Do you get the same efect on both amps?
Do you have another chip to try?
.
Someone with more experience may be able to point out something that I have overlooked.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Operational amplifiers do not make good comparators. Without additional measures opamps as comparators tend to instability. They can even exhibit phase reversal. See this article for more details.
Your circuit didn't seem to post. Maybe try shrinking the image a little.
@Arbit : try < 300 kB per image (rumors go < 1 MB should work, too).
 

Arbit

Sep 21, 2021
2
Joined
Sep 21, 2021
Messages
2
I replaced the opamp with LM393

The issue is when I test the comparator individually ,it works fine, i.e it will give output only when noninverting is greater than inverterting

But when I connect it in the whole circuit the same issue occurs of giving output when noninverting is zero

PLEASE HELP ME TO SORT IT

The four comparators marked in the circuit have issue
 

Attachments

  • forumbs.png
    forumbs.png
    22.4 KB · Views: 7

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
What is your load resistance? The value is not shown n the schematic. An overloaded output may lead to the observed effect.
But when I connect it in the whole circuit the same issue occurs of giving output when noninverting is zero
Double-check all connections in the circuit, especially the GND connections of the comparators.

A few issues with your schematic (unrelated to the comparator problem):
- Do not overlap connections In thiss example the lower circuit (X) should, I assume, look like the upper one (v), but it looks like a short circuit between the wiper of the pot and GND:
upload_2021-9-23_17-50-27.png

- Show values for all components. Showing e.g. resistors without resistance doesn't help in analyzing the circuit:
upload_2021-9-23_17-52-57.png
- Even if the software doesn't require it, show the connections of all ICs to power and GND. It is not always obvious which IC is powered by which supply - especially when multiple supplies are present. this may have an effect or not. It is imho good practice not to assume implicit connections but to show them explicitly. If only for the sake of others.

- When going off-page (e.g. via connectors) label the signals and give an indication what to expect. Otherwise nobody (but you) knows what to expect at these interfaces:
upload_2021-9-23_17-57-33.png

Regards,

Harald
 
Top