0
\$\begingroup\$

Calculation show Vin should be 1.02V as no current will be drawn towards negative terminal of opamp and Vout should be -1.02V. But simulation show Vin to be 114mV and Vout to be -114mV.

There must be something wrong in this simulation schematic.

I would be glad if you could help me out.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • 3
    \$\begingroup\$ Your 24 volt power supply appears to be floating relative to the rest of the circuit. You should probably have separate +12 and -12 volt supplies with their "ground" side connected to the circuit ground. \$\endgroup\$ – Peter Bennett Jul 22 '15 at 22:50
  • \$\begingroup\$ @peterBennett see the edited post \$\endgroup\$ – Taimoor Ali Jul 22 '15 at 22:56
  • \$\begingroup\$ If the point of R8 is to balance the bias currents of an op-amp that doesn't have IBCC (input bias current cancellation), its value has to be different, a little lower. Specifically, it has to match the impedance seen by the inverting input, which is R7 || (R6 + (R3 || R4)). \$\endgroup\$ – Kaz Jul 22 '15 at 23:00
  • \$\begingroup\$ Does your calculation show Vin to be 114mV \$\endgroup\$ – Taimoor Ali Jul 22 '15 at 23:03
  • 1
    \$\begingroup\$ You're voltage divider at your input, doesn't consider the additional resistances. So your voltage divider is wrong. That the problem. \$\endgroup\$ – efox29 Jul 22 '15 at 23:18
4
\$\begingroup\$

Calculations which show "show Vin should be 1.02V as no current will be drawn towards negative terminal of opamp" are badly in error. As Peter Bennett, has pointed out, your power supply must be grounded. So the op amp portion would look like

schematic

simulate this circuit – Schematic created using CircuitLab

However, this will also not work. Since the negative supply of the LM324 is ground, the output cannot drive lower than this. To fix this, you would make

schematic

simulate this circuit

At this point the op amp can drive its output to a negative current.

However, it still won't work as you think.

Although the inputs to an op amp don't actually draw zero current, you can generally treat them as if they can. That means that the + input will be held at ~ground. It's true that the -input will not draw any current, but the output will, through the feedback resistor. The - input will create what is called a "virtual ground", typically from microvolts to millivolts from ground, depending on the input characteristics of the op amp. Therefore the right-hand side of R1 will effectively be held at ground, and the voltage at the junction of R1/R4/R5 will be pulled down. In this case, since R1 is so much less than R4 and R5, it will be pulled down a lot. The actual value will be 0.114 volts, and the output will nominally be -0.114 volts.

EDIT - There are three ways to get -1.02 volts out of the op amp.

The "simplest", that is, the one involving the fewest changes in component values, is simply to add a buffer to the 1.02 volt junction. This can be done with another LM324 section configured as a voltage follower.

schematic

simulate this circuit

In this case, since the op amp inputs draw essentially no current, the voltage at the input of the op amp will be 1.02, and so will the output.

The second way is to change component values.

First, change R1 and R2 to 10k. You want to do this anyway, since an LM324 cannot put out the current you will need for large output voltages. As an example, if you wanted to output 10 volts, R2 would require 100 mA, and that is far beyond what an LM324 can provide.

Assuming you want to change the fewest number of components besides R1 and R2, you can either change R4 or R5. For instance, if R5 is increased to 1.11 k, the voltage will remain at 1.02 volts.

The third way, which minimizes the total number of components, is simply to eliminate R4 and R5, but change either R1 or R2 so that the gain of the op amp is approximately -.204 .

This can be done by

schematic

simulate this circuit

You should note that you can do this with an LM324, which is unity-gain stable (and then some) but you cannot do it with all op amps. Some require gains as high as 10 in order to be stable, and in this circuit would need a small feedback capacitor as well as R2.

Also note that, for what you are doing, R3 is not needed, and you can tie the + input directly to ground. If you decide to keep it, it should be equal to the parallel value of the resistors connected to the - input. I've shown the correct value in the last schematic. All of the previous examples have been wrong, but I didn't want to distract you.

\$\endgroup\$
  • \$\begingroup\$ What do you mean when you say "At this point the op amp can drive its output to a negative current" \$\endgroup\$ – Taimoor Ali Jul 22 '15 at 23:14
  • \$\begingroup\$ What Can I do to get +1 V at Vin ? \$\endgroup\$ – Taimoor Ali Jul 22 '15 at 23:15
  • \$\begingroup\$ @TaimoorAli increase your feedback resistors to be much higher. Like 100k or more. Is this a practical circuit or a for simulation only ? \$\endgroup\$ – efox29 Jul 22 '15 at 23:16
  • \$\begingroup\$ yes I had suspected that . It worked with 10K \$\endgroup\$ – Taimoor Ali Jul 22 '15 at 23:16
  • 1
    \$\begingroup\$ @TaimoorAli - No. Read the part about virtual ground. Let's say the op amp has an open-loop gain of 100,000. Then in order to provide -1.02 at the output, the difference between the + and - inputs has to be ~.00001 volts, or effectively zero. with 1.02 across R1, there must be current into the -input junction. Since the op amp itself draws no current, the current must equal the current through the feedback resistor. \$\endgroup\$ – WhatRoughBeast Jul 23 '15 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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