LM358N Inverting Closed Loop?

Discussion in 'General Electronics Chat' started by tracecom, Dec 15, 2011.

  1. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    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.


    [​IMG]
     
    Last edited: Dec 15, 2011
  2. k7elp60

    Senior Member

    Nov 4, 2008
    478
    69
    You need to connect pin 4 to a -voltage.
     
    tracecom likes this.
  3. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    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.
     
    tracecom likes this.
  4. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    The LM358N can be operated from a single voltage in many applications. Are you saying that for this application, I must have a dual voltage supply?
     
  5. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  6. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I had R3 and R4 labeled wrong in the drawing; it's corrected now. The voltage out of the divider measures 39.5 mV.

    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.)

    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.

    [​IMG]
     
    Last edited: Dec 15, 2011
  7. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Thanks. I will rebuild the circuit with a dual voltage supply and post the results.
     
  8. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
    tracecom likes this.
  9. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    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.
     
    tracecom likes this.
  10. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    OK, I see. Attached is the corrected circuit; thanks to you all.

    [​IMG]
     
  11. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  12. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    So, is that the reason that the output of the non-inverting version is not exactly the positive value of the inverting version?

    [​IMG]
     
  13. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  14. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    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.
     
  15. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    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.
     
  16. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    You looked at the wrong datasheet.
     
  17. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    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.
     
  18. Adjuster

    Well-Known Member

    Dec 26, 2010
    2,147
    300
    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?)
     
  19. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Becauser they are low power they produce crossover distortion the same as their big sister the LM324 quad low power opamp. They also have trouble above only 2kHz and they are noisy.
     
Loading...