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\$
2
  • \$\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

4 Answers 4

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\$
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\$

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\$
1
  • \$\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

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.