Op Amp circuit for analog computing (addition) won't work

Thread Starter

wouter368

Joined Sep 22, 2022
20
Hey,


With advise of an earlier thread I posted I tried making this circuit:
asdfadf.png
In this circuit, if you would measure the voltage after the output of the second Operational amplifier (unfortunately in this circuit the voltage meter is not drawn, but it should be connected to the ground on one end and to the output of U2 (the second op amp) on the other), you should get these results:

Vout = V1 + V2. I based this on this circuit I found in a paper about analog computing:
1663963786478.png

However, I'm not getting those values for Vout. Actually, I'm not getting any explainable values for Vout at all, no matter which voltages I apply to V1, V2, V3 and V4. I've been stuck on this for weeks so I really don't know what's causing the issue... since I checked my breadboard multiple times with the help of teachers as well and they couldn't figure out any mistakes I made while building the circuit in the first image. It would be awesome if someone is able to figure out what's wrong with this setup or circuit.

The op amp type is LM358 and the resistors are all 3k Ohm.

Here's some pictures of my breadboard (sorry if they're unclear, let me know if there's a better way to photograph it)
WhatsApp Image 2022-09-23 at 22.04.14.jpegWhatsApp Image 2022-09-23 at 22.04.15 (2).jpeg
1663964190711.png

Thanks in advance!
 

Thread Starter

wouter368

Joined Sep 22, 2022
20
What values are your V3 and V4 supply voltages?

What is the yellow terminal on the supply and where is it connected?
The values of V3 and V4 I put both at 8V, so that a voltage of 16V is supplied to the Op amps.

The yellow terminal on the supply is the ground.
 

MrChips

Joined Oct 2, 2009
27,686
V3 and V4 are your supply voltages.
They need to be floating supplies.
One must be set up for positive supply, the other for negative supply.
Show us how you have wired the supplies.
 

WBahn

Joined Mar 31, 2012
27,893
Check your resistor values. Looks to me like you have three 4.3 kΩ resistors, a 470 Ω resistor, and I can't see the bands on the other one.

If the other one is also 470 Ω, then the output from the first amp would want to be less than -9 V, which would make it rail at -8.8 V (since the output can get close to the negative rail). When you then put that through your inverter, that would result in it's output wanting to be about +8.8 V, but the typical output range for the LM358 only goes to 1.35 V below the positive rail, which in your case would be 7.6 V less 1.35 V, or about 6.25 V. That sure looks to be right about what you are seeing.

In addition to verifying that your resistor values are what you think they are, I would recommend tying the inputs (NOT the outputs!) of the two unused opamps to the rails -- for each opamp, tie one input to the positive rail and the other to the negative rail. You might do this through a 10 kΩ resistor (value isn't too important). This will force the output to be railed instead of potentially flailing around due to floating inputs. I would also recommend putting a 0.1 µF cap, preferably ceramic, across from each of the opamp power pins to the ground node as close to the chip as possible.

Your supplies are not balanced. One is 7.6 V and the other is 8.8 V. Get these to match, at least so the displayed voltages differ by no more than 0.1 V.

Instead of just showing what the final output is, measure the voltages at each of the opamp inputs and outputs and post those measurements as well.

Finally, I'd recommend spending some time cleaning up your layout. Some suggestions:

1) Connect the yellow ground ports on all four supplies together using banana plug cables and connect this to the ground binding post on the breadboard.
2) Also use cables to connect the ground to the negative terminals of your two signal supplies and your positive supply, and to the positive terminal of your negative supply.
3) Bring the positive and negative rails to the red and black binding posts on your breadboard.
4) Connect the binding posts to appropriate vertical longlines on the breadboard.

Make yourself some labeled test points by taking solid wire (or component leads that have been trimmed) and write a label on a small piece of masking tape and put in on the wire far enough down to enable you to clip a grabber lead onto it (if you have those). Even if you don't, having those sticking up from the breadboard is very helpful to visually keep track of what signals are where.
 
Last edited:

MrChips

Joined Oct 2, 2009
27,686
Bench power supplies are often “floating”.
You need to know how to make a positive voltage supply and a negative voltage supply. If you don’t know don’t be afraid to ask.

The ground connection on your PSU is “earth” or “safety” ground.
This is not connected to the PSU output. You also need to know how to make this connection.
 

Thread Starter

wouter368

Joined Sep 22, 2022
20

Thread Starter

wouter368

Joined Sep 22, 2022
20
Check your resistor values. Looks to me like you have three 4.3 kΩ resistors, a 470 Ω resistor, and I can't see the bands on the other one.

If the other one is also 470 Ω, then the output from the first amp would want to be less than -9 V, which would make it rail at -8.8 V (since the output can get close to the negative rail). When you then put that through your inverter, that would result in it's output wanting to be about +8.8 V, but the typical output range for the LM358 only goes to 1.35 V below the positive rail, which in your case would be 7.6 V less 1.35 V, or about 6.25 V. That sure looks to be right about what you are seeing.

In addition to verifying that your resistor values are what you think they are, I would recommend tying the inputs (NOT the outputs!) of the two unused opamps to the rails -- for each opamp, tie one input to the positive rail and the other to the negative rail. You might do this through a 10 kΩ resistor (value isn't too important). This will force the output to be railed instead of potentially flailing around due to floating inputs. I would also recommend putting a 0.1 µF cap, preferably ceramic, across from each of the opamp power pins to the ground node as close to the chip as possible.

Your supplies are not balanced. One is 7.6 V and the other is 8.8 V. Get these to match, at least so the displayed voltages differ by no more than 0.1 V.

Instead of just showing what the final output is, measure the voltages at each of the opamp inputs and outputs and post those measurements as well.

Finally, I'd recommend spending some time cleaning up your layout. Some suggestions:

1) Connect the yellow ground ports on all four supplies together using banana plug cables and connect this to the ground binding post on the breadboard.
2) Also use cables to connect the ground to the negative terminals of your two signal supplies and your positive supply, and to the positive terminal of your negative supply.
3) Bring the positive and negative rails to the red and black binding posts on your breadboard.
4) Connect the binding posts to appropriate vertical longlines on the breadboard.

Make yourself some labeled test points by taking solid wire (or component leads that have been trimmed) and write a label on a small piece of masking tape and put in on the wire far enough down to enable you to clip a grabber lead onto it (if you have those). Even if you don't, having those sticking up from the breadboard is very helpful to visually keep track of what signals are where.
Thanks, awesome advice. I'll try this monday and let you know if it worked.
 
Top