LM358 Issues

I’m having problems troubleshooting a circuit using the LM358 Dual OPAMP. Troubleshooting the application using a non-inverting example of 100x gain. When no input is connected to the positive terminal (pin3), I read ~12V on the output. I’m using an unregulated 12V power supply reading output ~15V. Output to the second OPAMP (pin7) i get the same result with nothing hooked up to the inputs.

My original design was using an LM324 but I wanted to shrink the package because I was only going to use two opamps instead of four. When hooking up the circuit on the LM324 I get zero on the outputs of all the OPAMPs with exception of outputs on pin14 and pin8 (OPAMPS 4 and 3).

I don’t understand why the outputs on the LM358 have an output if there inputs are ground. My application worked using an LM324 but moving to an LM358 I get this result. I tried multiple LM358s so I don’t think they are bad. I also tried a TL-082 with the same result.

Thanks in advance.

Can you post a schematic? Are the inputs floating, i.e. "nothing hooked up" (this is probably not a good thing) or grounded? There is a difference...

I don't have a spice diagram available but here's the gist:

Pin 4 = GND Pin 8 = Vcc = 12V

Pin 3 (+ in) = AC source ~ 200mV Pin 2 (- in) -> Pin 1 (Out) = 100kOhm Pin 2 (- in) -> GND = 1kOhm

Tried grounding both inputs and with and without components, so they are essentially zero and the output still has ~10VDC output.

Here’s the image:
R1 = 1k
R2 = 100k


As a minimum, you need to connect a resistor between the non-inverting input of the LM358 and ground, to provide a path for the input bias current. 1K would be best to match (almost) the resistance seen by the inverting input. A capacitor between the AC source and the input would also be a good idea, although I suspect that the AC source already has one internally.

In that configuration, the LM358 will act like an amplifying half-wave rectifier, assuming you are supplying it from +12v and ground. That will suffice if you just want to detect an input signal and get some idea of its amplitude.

I don't know why on these dual opamps i get this result. I have the same setup on the LM324. I do have a 1k connected from the inv input to ground. The AC signal has a cap and resistor to ground to remove any DC offset to the non-inv input. It just bugs me as to see that the output has a signal when there is nothing driving the circuit. Still t/s the circuit. Seems to be so simple. I move the whole circuit from the LM324 to this dual op amp and trying to troubleshoot what should be the most simplest part of the circuit. Still in need of some troubleshooting help...

thanks again for the help so far.

What value is the resistor from the non-inverting input to ground? It would be helpful if you posted the complete schematic - quickest way is to draw one by hand and scan it (that's what I do).

The circuit you posted before has a gain of 100 right down to DC. This means that in the absence of an AC input, any voltage appearing between the inputs gets multiplied by 100 and appears at the output. That's why you should have equal resistance on the two inputs, so that the input bias currents of the 2 inputs cause equal voltage drops. Likewise, the internal offset voltage of the op amp (9mV max for the LM358) gets multiplied by 100.

There is no DC offset. Here’s the circuit as designed in PSPICE using and LM324.

Like I said when using a LM324 on the bboard it works as advertised. The output is relatively small (DC offset inherent to OPAMP). When using the LM358, it didn’t work the same way. Instead the output is set high and the signal coming oscillates the output below that value.


There will be a significant DC offset in that circuit. The LM358A datasheet gives the input bias current as -45nA typical, -250nA maximum. It is negative because current flows out of the pin. Let's suppose the current is 100nA for each input. The current flowing out of the non-inverting input flows through 100K (R7) to ground, so by Ohms law there is a voltage drop of 100nA * 100K ohm = 10000uV = 10mV across it. The current flowing out of the inverting input flows through R8 and (R9 + R10), which can be considered as being in parallel for this purpose, giving just under 1K. So the voltage drop due to bias current for the inverting input is only around 0.1mV. This gives an offset voltage between the two inputs of about 9.9mV when the op amp output is at zero volts. If the DC gain of the circuit is 100, this will appear as 0.99v at the op amp output.

To minimise the offset, you need to design your circuit so that the DC resistance to both inputs is the same. For example, reduce R7 to 1K. Or reduce R7 to 10K and increase R8, R9 and R10 by a factor of 10. This won't completely eliminate the offset, because the bias currents may differ between the two inputs, by up to 75nA for the LM358A.

Having said all that, even at maximum input bias current (250uA), the offset at the output of your circuit as it is should only be about 2.5v at worst. So I suspect you have wired your circuit incorrectly, or the resistor values you have used are not what you intended, making the gain higher than intended.

PS - you should also include a decoupling capacitor across the supply pins of the op amp.

I'll have to check again once I get back to the lab. I compared the LM358 with the LM324 and the layout is the same for the first opamp exception obviously the supply pins and the output is railed on the LM358. I also tried tying the inv and non-inv to ground to see what was the result, and the output is railed as well. Shouldn't the output be ~zero?

Thanks for the advice on the decoupling cap as well.

dashiznitz: I'll have to check again once I get back to the lab. I compared the LM358 with the LM324 and the layout is the same for the first opamp exception obviously the supply pins and the output is railed on the LM358. I also tried tying the inv and non-inv to ground to see what was the result, and the output is railed as well. Shouldn't the output be ~zero?

With both outputs tied to ground, there is no feedback and the input offset voltage of the op amp (which I didn't mention in my previous post, but is +/- 7mV max for the LM358 according to the datasheet) gets multiplied by the open loop gain of the op amp, which is around 100000. So in practice, the output will saturate close to Vcc or ground (it could be either). The input offset voltage only needs to be +0.1mV or higher for the output to saturate close to Vcc.

If you connect the noninverting input to ground (either directly or through a resistor), and the inverting input to the output, then the output voltage should be close to zero.

thanks for all the help dc42…
solution after checking the components, there was a slightly different brand/model ceramic cap and that’s what was causing the problem. they are both labeled 104 corresponding to .1uF the large size 104z was on the original circuit using the lm324. once i put it on the smaller circuit using the lm358, i got the proper results… i dont know why the other cap produced the dc offset in the circuit… anyone know why?


I'm glad you got it working. It sounds to me that the other cap is faulty, either shorted or very leaky. Ceramic caps are good for decoupling, but I prefer metallised film caps for signal paths.