LM358N Inverting Closed Loop?

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
I am trying to understand the math that produces the results shown on the following schematic. From reading about op-amps used in inverting closed loop configurations, I would have expected an output at pin 1 of 367 mV (the ratio of R2 to R1 [10x] times the input voltage.) As you can see, that's not even close. What am I missing?

Yes, this looks like homework, but I assure you that it is self inflicted work.

Thanks.


 

Attachments

Last edited:

John P

Joined Oct 14, 2008
1,762
You've got three issues here, unless there's more that I'm too dumb to see.

1 R3 and R4 are in the wrong order. You'll get (12.0 -.0395) out of that circuit.

2 You've correctly said that it's an inverting circuit. So how do you expect to feed a positive input to the op amp and get a positive output? Your op amp needs a negative power supply or this circuit cannot work.

3 I'm afraid that you have a fundamental misunderstanding about op amps. If it's operating in the linear range, the two inputs must be at the same voltage: so if one is Gnd, the other must be also. That 36.7mV is simply wrong.
 

Audioguru

Joined Dec 20, 2007
11,251
You connected the positive input voltage to the inverting input. Then the opamp inverts it and the output must be a negative voltage which is impossible without a negative supply voltage at pin 4.

Frequently an opamp is operated as a non-inverting amplifier then the LM358 will work with only a positive supply. Also, the input resistance of as non-inverting opamp is much higher than an inverting opamp circuit.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
You've got three issues here, unless there's more that I'm too dumb to see.

1 R3 and R4 are in the wrong order. You'll get (12.0 -.0395) out of that circuit.
I had R3 and R4 labeled wrong in the drawing; it's corrected now. The voltage out of the divider measures 39.5 mV.

2 You've correctly said that it's an inverting circuit. So how do you expect to feed a positive input to the op amp and get a positive output? Your op amp needs a negative power supply or this circuit cannot work.
I have used the LM358 in other applications successfully with only a single voltage supply, but never with a dual voltage supply, so I didn't know what to expect. That's the reason I breadboarded the circuit, and the observed that I did have a positive output (albeit much lower than I expected.)

3 I'm afraid that you have a fundamental misunderstanding about op amps. If it's operating in the linear range, the two inputs must be at the same voltage: so if one is Gnd, the other must be also. That 36.7mV is simply wrong.
The 36.7 mV is a direct measurement and is correct unless my DMM or the LM358 has failed. I was attempting to duplicate a circuit from Microelectronic Circuits Fifth Edition (p. 69, Figure 2.5.) It is reproduced below.

 

Attachments

Last edited:

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
You connected the positive input voltage to the inverting input. Then the opamp inverts it and the output must be a negative voltage which is impossible without a negative supply voltage at pin 4.

Frequently an opamp is operated as a non-inverting amplifier then the LM358 will work with only a positive supply. Also, the input resistance of as non-inverting opamp is much higher than an inverting opamp circuit.
Thanks. I will rebuild the circuit with a dual voltage supply and post the results.
 

Audioguru

Joined Dec 20, 2007
11,251
An opamp is not a voltage generator. If it inverts and has a positive input voltage and its (+) input is at 0V then the output voltage will be negative voltage only if it has a negative supply voltage.
 

crutschow

Joined Mar 14, 2008
23,506
Since the op amp isn't working due to no negative supply, you are measuring those voltages at the op amp input and output simply due to the voltage division of the resistors. The op amp cannot generate a negative voltage without a negative supply so the output is similar to there being no op amp in the circuit. Remove the op amp and measure the voltages.
 

Audioguru

Joined Dec 20, 2007
11,251
The output voltage is a little lower than it should be because the input bias current pulls the (-) input a little more positive than the resistors make.

The negative supply can be only -0.5V and the results will be the same.
 

Audioguru

Joined Dec 20, 2007
11,251
The opamp is old so it uses BJT input transistors. They are PNP so their input bias current pulls the (-) input up a little.
The feedback resistors set the voltage gain at 1+ (100k/10k) = 11 times so the output will be 0.319V if the opamp is a modern Jfet-input one that has no input bias current.
 

John P

Joined Oct 14, 2008
1,762
Earlier I said that the two inputs of the op amp will settle at the same voltage. Actually they won't, and the difference between them is called "offset voltage". It's a specification that you can look up, but basically if you have a high-quality op amp it will be small, and for the LM358, which is not high quality, it will be significant.

OK, I just looked it up. LM358 offset voltage is 2mV typical, 3mV max. So your output will be that much, times the gain. Your error seems to be within that range.

Bias current is 100nA max, and your resistor network is around 10K, so the voltage error there is 10E-7 * 10E4, or another 1mV. So I think you're getting the expected result.

If you can find a better op amp, try it and see how the result is different.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
OK, I just looked it up. LM358 offset voltage is 2mV typical, 3mV max. So your output will be that much, times the gain. Your error seems to be within that range.

Bias current is 100nA max, and your resistor network is around 10K, so the voltage error there is 10E-7 * 10E4, or another 1mV. So I think you're getting the expected result.

If you can find a better op amp, try it and see how the result is different.
Interesting. I just measured the two inputs. In the circuit above, pin 3 measures 31.3 mV and pin 2 measures 29.5, an offset of 1.8 mV - just about typical.

As to the rest of your comment, my math is so weak, I'll have to work on the exponential notation before I understand it.

Thanks.
 

John P

Joined Oct 14, 2008
1,762
Hey, you're right. I was looking at the LM358A , which has better specs. Well anyway, none of the versions are the part to use if you need an accurate amplifier. But they're cheap and readily available, and good enough for a lot of things.
 

Adjuster

Joined Dec 26, 2010
2,148
If you want to minimise the error due to the bias current, insert a 9.1kΩ resistor in series with the non-inverting input. It will create a compensating voltage drop which should somewhat improve the result

You would be well advised to master the use of scientific number notation. It is very much used in electronics, and becomes pretty much indispensable when dealing with very small or very large quantities, whether on paper or using a calculator. Personally, I find counting more than a few zeros either side of the decimal point can all too easily lead to mistakes.

Understanding the use of prefixes such as kilo, mega, giga, tera... or milli, micro, nano, pico... is almost half-way there (or would you say that not understanding exponential notation makes the prefixes less meaningful?)
 
Top