0
\$\begingroup\$

I am a year 2 EE student and I'm still struggling with getting simulations to work in practice.

Components:

10k resistor x2 Arduino LM741 Op Amp (pinout: https://www.ti.com/lit/ds/symlink/lm741.pdf)

  1. Connected +5V from the Arduino to the positive rail of the breadboard.
  2. Connected GND from the Arduino to the negative rail of the breadboard.
  3. Connected pin 7 (V+) to the positive rail.
  4. Connected pin 4 (V-) to the negative rail.
  5. Connected pin 3 (Non-inverting input) to the negative rail.
  6. Connected a 10k resistor (Rin) directly to pin 2 (Inverting input) and to the positive rail.
  7. Connected a 10k resistor (Rf) directly to pin 6 (Output) and the other end to pin 2.
  8. Connected a wire to pin 6 (Output) to measure.
  9. I connect the red end of a voltmeter to the wire from pin 6 (Output)
  10. I connect a wire to the negative rail and connect the black end of the voltmeter.

Please let me know if I have this done correctly?

Here is a TinkerCAD sketch of the exact connections I used.

enter image description here

Orange wire = Rin (10k) Green wire = Rf (10k) Brown wire = Multimeter connections (positive to pin 6, output), (negative multimeter terminal to negative rail) Grey wire = bridging

In real life:

Vout = -Rf/Rin

My output should be -5v.

I'm getting 1.37v

I need help. Thanks in advance.

\$\endgroup\$
3
  • \$\begingroup\$ Please draw a proper circuit diagram. A cartoon of your wiring is unhelpful. \$\endgroup\$
    – Andy aka
    Commented Jul 31, 2023 at 12:05
  • \$\begingroup\$ Decoupling capacitor wired nearest power supplies pins. LM741 not rail to rail. Powering with only 5V should be not "correct". \$\endgroup\$
    – Antonio51
    Commented Jul 31, 2023 at 12:13
  • \$\begingroup\$ @NonComposMentis, Are you still curious about the concept behind inverting amplifiers? \$\endgroup\$ Commented Nov 27 at 10:30

5 Answers 5

1
\$\begingroup\$

An op-amp cannot output a potential (voltage) greater than its own positive supply potential. That's +5V in your case. No op-amp can output a potential less than its own negative supply potential, that's 0V here. Since your op-amp's negative supply is 0V, you will never obtain an output under 0V. Worse still, no op-amps that I know of can output potentials all the way to either supply potential. The 741 is the worst offender. Referring to the datasheet (page 5, "Output voltage swing") you will find that this device can't get its output closer than 1V to either supply rail. It might even be worse than this; in the worst case, if you are unlucky enough to have bought the worst 741 in existence, you might not even get within 3V!

Typically, for a 741 with 0V and +5V supply potentials, the output will never be outside the range +1V to +4V. The 741 is a terrible choice for any application, and I believe your +1.37V output is a symptom of this constraint. For this reason, among others, the 741 is not recommended for operation at 5V.

Your own design is an inverting amplifier with gain \$-\frac{10k\Omega}{10k\Omega}=-1\$. With an input of +5V, you seem to expect an output of -5V, which is impossible without a negative supply beyond -5V. If you want a negative output, you must provide a negative supply to the op-amp. To produce -5V out, the 741 will require a negative supply of at most -6V, probably even lower (more negative).

All op-amps also require that input potentials fall within a certain range. The 741 will not tolerate inputs that get closer than 2V from either supply rail, as can bee seen on page 5, under "Input voltage range". Therefore, with supplies of 0V and +5V, you may not apply anything outside the range +2V to +3V to either of the 741 inputs! If you do, then you can expect the op-amp to behave badly, with unpredictable outputs. Again, the 741 is clearly not suited for such a low supply voltage.

There are much better op-amps than the 741. Consider, for example, the TLC2272 or AD822 which will work well with supplies of 0V and +5V, can produce an output to within tens of millivolts of those supplies, and can tolerate input potentials all the way down to the negative supply (0V in your case).

There are not many op-amps that will work with inputs all the way up to the positive supply, since this isn't a common requirement.

Your diagram may be fine for people at Lego or Fisher-Price, but it isn't appropriate for a second-year engineering student. There are many free tools that permit you to create professional schematics, one of which is CircuitLab, used by this very site. Others are LTSpice and Kicad (which uses ngspice). All of them provide simulation features, and all are free. I recommend that you try CircuitLab for a very easy and intuitive interface and experience. Here's your schematic produced using CircuitLab:

schematic

simulate this circuit – Schematic created using CircuitLab

It's not the best simulator in the world; it has very simplistic models (which is why you see 24mV output, instead of one-point-something), but it's designed for use in a web browser, and for simplicity. It's an excellent tool to get something done quickly, and for a ball-park idea of behaviour. And it makes really pretty easy-to-read schematics.

With a small change, a sufficiently negative supply for the op-amp, we can immediately see the desired result:

schematic

simulate this circuit

\$\endgroup\$
2
  • \$\begingroup\$ "Worse still, no op-amps that I know of can output potentials all the way to either supply potential." Rail-to-rail output, particularly the lower rail, is a common feature with today's opamp generations, particularly those operating on low power. If an opamp like OPA334 runs on just +2.7V, there is not much headroom for anything but rail-to-rail... \$\endgroup\$
    – user107063
    Commented Aug 4, 2023 at 13:30
  • \$\begingroup\$ @user107063 "rail-to-rail" is almost always a lie. There are op-amps with current source outputs that can generate a true 0V output into a resistive sink, but they are few and far between. A standard push-pull rail-to-rail output can only get within millivolts at best, and the gap worsens with output current. \$\endgroup\$ Commented Nov 27 at 12:22
0
\$\begingroup\$

The V- you gave the opamp is 0V. Where do you expect -5V of output voltage to come from? The opamp outputs this 0V, reduced by its output swing margin (it is not a rail-to-rail output opamp).

It would appear your simulation is not taking supply voltages and actual device limitations into consideration.

\$\endgroup\$
3
  • \$\begingroup\$ Is it because I'm using a single source voltage supply? If I powered V+ with +5v with one Arduino and V- with -5v from another, would that correct this issue? \$\endgroup\$ Commented Jul 31, 2023 at 11:10
  • \$\begingroup\$ You will get output according to the output swing specs of the opamp. An LM741 does not have a lot of swing left when powered with 5V. In fact, the minimum recommended voltage is ±10V, and the minimum output swing at ±15V and 10k load(!) is ±12V, a whole 6V less than the supply voltage. It would appear that your simulation does not at all capture the specifics of an LM741. Even a rail-to-rail opamp could not conjure -5V from a V- of 0V. \$\endgroup\$
    – user107063
    Commented Jul 31, 2023 at 11:22
  • \$\begingroup\$ The 741 opamp is antique and is 55 years old! Use a much newer opamp. \$\endgroup\$
    – Audioguru
    Commented Aug 3, 2023 at 14:49
0
\$\begingroup\$

Usually the output of an Op Amp can't go higher or lower than the voltages within which you're powering the chip. Some modern devices can go a little bit further, but certainly not an old device like the LM741.

With a 741 the output probably won't get closer than a volt or so of the supply rails, and you're powering it from +5v and GND (0v) which is why your output is sitting at about +1.4v.

But apart from that, if you look at the LM741 datasheet you'll see that its minimum supply voltage is -10v on the negative supply pin and +10v on the positive one (i.e. a span of 20v) so trying to use it with just 0v and +5v is very unlikely to work.

If you are stuck with using the LM741 then you will need to find some batteries to use as a power source, but to be honest if I were you I'd choose a different device that takes a lower power supply voltage - maybe have a look at the LM321.

Note on using Op Amps with a single supply: when you power an Op Amp using just a positive voltage (e.g. +5v on the positive supply pin and GND on the negative one) it's called a "single supply" setup. It's absolutely fine to do this, but you do need to design your circuit accordingly. A great place to understand how to do that is this very useful application note from Texas Instruments: Single Supply Op Amp Design Techniques.

\$\endgroup\$
2
  • \$\begingroup\$ What devices are you thinking of that can output voltages higher or lower than their rails‽ \$\endgroup\$
    – Hearth
    Commented Jul 28 at 16:14
  • \$\begingroup\$ @Hearth my apologies, I meant to say the common-mode input range of some modern Op Amps can extend slightly outside the power rails (e.g. the Ti OPA340) \$\endgroup\$
    – MartinC
    Commented Aug 8 at 12:23
0
\$\begingroup\$

You should get something with this one.

This should not really "work" ...

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for this. I will try it. I feel like a caveman with my understanding - could you try and clear something up -- The schematic you offered has a voltage divider and you have V- to GND. Is that because I'm using a single 5v voltage source (and you are offering the solution to it)? If I was using a dual supply, would I simply connect V+ to 5v and V- to -5v? Apologies if these questions seem too pedestrian and obvious. \$\endgroup\$ Commented Jul 31, 2023 at 12:42
  • \$\begingroup\$ No. many old 741 opamps DO NOT WORK if supplied only +5V and -5V, the datasheet recommends a minimum supply of +10V and -10V. Get rid of the antique 741. \$\endgroup\$
    – Audioguru
    Commented Jul 31, 2023 at 16:45
  • \$\begingroup\$ I would just show that this "does" not really "work" ... \$\endgroup\$
    – Antonio51
    Commented Aug 3, 2023 at 9:04
0
\$\begingroup\$

How to reveal the inverting idea

A good approach to understanding the inverting amplifier is to start by examining, step by step, the simpler non-inverting amplifier. This allows one to see the rationale behind this more complex circuit solution.

Since the question is conceptual, we will use conceptual circuits where the role of transistors is performed by man-controlled voltage sources and resistors.

Negative feedback

Paradoxically, we aim to create a unity-gain amplifier using an amplifier with a gain that is thousands and even millions of times greater; but the purpose of this is to achieve precision and stability. We do this through the principle of negative feedback: the output voltage is compared to the input voltage and adjusted accordingly, so that the difference between them becomes zero.

Non-inverting follower

schematic

simulate this circuit – Schematic created using CircuitLab

Man-controlled output voltage source

According to the general idea above, the simplest negative feedback circuit can be made by a subtractor and a non-inverting amplifier (op-amp). The loop can serve as a subtractor if we connect the two voltages in series. We can serve as an “amplifier” if we control the output voltage so that the null indicator NI shows zero voltage difference Vin - Vout = 0.

schematic

simulate this circuit

Behavioral voltage source

We can automate this procedure by replacing Vout with a behavioral voltage source that copies the input voltage.

schematic

simulate this circuit

Op-amp follower

In the practical circuit of an op-amp follower, an op-amp serves as the output voltage source Vout. Note that it must have a "floating" (differential) input. In some cases, it can be single supplied (with only a positive voltage source of +10 V).

schematic

simulate this circuit

Inverting follower

schematic

simulate this circuit

Man-controlled positive voltage source

In other cases, we need an “inverting follower”. It can be implemented by a summer and an inverting amplifier (op-amp). The summer is implemented by two resistors in series (aka "voltage divider"). As above, we can serve as an “amplifier” if we control the output voltage so that the null indicator NI shows zero voltage difference.

schematic

simulate this circuit

However, a problem arises here. For the R1-R2 resistor network to function as a subtractor, the output voltage Vout must go below zero (the Vout source must be negative).

Single-supplied op-amp follower

So, this is the problem of the single-supplied op-amp inverting amplifier:

schematic

simulate this circuit

... the output voltage of an op-amp powered by a positive voltage cannot become negative.

STEP 2.1.2

Man-controlled voltage source

So, in the conceptual circuit, the output voltage source Vout must be negative.

schematic

simulate this circuit

Behavioral voltage source

The same is true for the automated circuit with a behavioral voltage source.

schematic

simulate this circuit

Then the result is perfect.

STEP 2.2.2

Op-amp inverting follower

This means that in the practical circuit of an inverting amplifier, the op-amp must be supplied by a bipolar voltage source (split supply)...

schematic

simulate this circuit

... and the result is perfect.

STEP 2.2.3

What is inside the op-amp output?

The root of confusion when dealing with op-amp circuits often lies in a limited understanding of the op-amp's internal workings. To grasp a specific circuit, it is crucial to visualize the output stage. A simplified model of this stage resembles a voltage divider, with additional low-value resistors (or diodes) connected to its terminals.

Vin = 0 V: When operating in a region where the output voltage is distant from the supply rails, the op-amp is capable of compensating for the input voltage.

schematic

simulate this circuit

Vin = 10 V: However, if the output voltage reaches either the negative...

schematic

simulate this circuit

Vin = -10 V: ... or positive supply rail...

schematic

simulate this circuit

... it stops changing and ultimately fails to compensate for the input voltage.

Real output stage

Inside the op-amp, the "potentiometer" is implemented using two complementary transistors.

schematic

simulate this circuit

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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