op amp not inverting (SOLVED)

Hi all
I have an issue with this projects. The DAC is working just fine but the LM358D is not inverting.
I used this before with LM358N and everything worked fine, however with the SMD version i just follow the DAC input.
Supply to the opampis +/-15v

Thanks or any help

pin 2, +, is the non inverting input.
pin 3, -, is the inverting input.
swap the connections for pin 2 & 3.

swap the connections for pin 2 & 3.

It's not exactly that simple.

[u]inverting amplifier[/u]

The feedback resistor (R14) and gain resistor still connect to the minus input.

The signal-input needs to go into the minus input (through a resistor).

I assume you want the output biased at +2.5V? The bias (R12 & R13) needs to be switched to the positive input.

Sorry guys Im loosing on that one.
Explain me why is there such an issue? The 358n and 358d has the same pinout right? This schematic with 358n dip package did the job ok shifting btw +2.5/-2.5v.

why there is an issue has already been explained: you are expecting an inverted output when using a non-inverting input. OP-Amps don't work that way. none of them, regardless of subtypes. per your schematic, there is no way to get an inverted output from that circuit.....

Ok, I understand all of that. However, mcp4725 datasheet call for this design in order to archive what I need. Please see attached.
Also, for the 3rd time, I'm trying to explain that this design work with lm358n but does not work with lm358d

The design posted in reply #5 is a NON-INVERTING amplifier that applies a negative offset to the output.

Here is the formula, taken directly from the design document, for the output voltage as a function of the input voltage. Just about any op amp will work similarly.

output.png

Please explain exactly what you want to do, and we can suggest a different design.

output.png

Also, for the 3rd time, I'm trying to explain that this design work with lm358n but does not work with lm358d

N or D makes no difference to the circuit, that letter only specifiies the physical packaging of the 358.

However, mcp4725 datasheet call for this design in order to archive what I need.

Your circuit does not work because you did not replicate the reference design. If the datasheet design provided the desired functionality, why did you flip the input terminals?

Please show me where did I flip the input? Pin 3 is + pin 2 is - and pin 1 is out. My design and lm358 datasheet corresponds to each other along with the MCP. Sorry I just don't see where is the problem. MCP reference is the same as my schematic right? If not point it to me please as I don't see it.

Let's consider some realistic cases:

  1. the inputs have been swapped - swap them
  2. the chip is defective - replace it
  3. the chip is reversed - replace and turn it
  4. shorted pins - remove the shorts
  5. the chip lacks proper (balanced) power with a common Gnd - review your circuit

Some cases can be identified by feeding a known voltage into the output and find it appear at the input.

OP's schematic

What are you trying to achieve? , something like this :

DAC In   Output Voltage
------   --------------
0        +2.5
2048     0 
4096     -2.5

Your circuit design appears to be a classic differential amplifier.
The comment by R13 is not clear. Is the resistor present, absent or bridged ?

Here the amplifier is not inverting. If the original LM358N circuit was inverting, it must have been a different circuit.

6v6gt:
OP's schematic

What are you trying to achieve? , something like this :

DAC In   Output Voltage

------  --------------
0        +2.5
2048    0
4096    -2.5




Your circuit design appears to be a classic differential amplifier.
The comment by R13 is not clear. Is the resistor present, absent or bridged ?

Yup this is exactly what I have working with lm358n. I'm thinking that the lm358d is bad. The r13 is not in place and not bridged. This r13 was proposed in order to gain bigger offset hence I have +/-15v to the Opamp. The datasheet for 358n is different a little compared to the 358d, hence I wasn't sure if the 358d accepts dual supply.

Yup this is exactly what I have working with lm358n.

Then you are not using any of the circuits you have posted so far, because that is the behavior of an inverting amplifier.

But why do you care? Simply change the Arduino program so that it outputs the voltage you want.

Good luck with your project!

jremington:
. . .
But why do you care? Simply change the Arduino program so that it outputs the voltage you want.
. . .

Exactly. If you are stuck with the circuit design because say you've ordered a PCB, simply do the inversion of the 12 bit value you send to the dac in software.

inverted = 4095 - uninverted

6v6gt:
Exactly. If you are stuck with the circuit design because say you've ordered a PCB, simply do the inversion of the 12 bit value you send to the dac in software.

inverted = 4095 - uninverted

That's not the case bud. The thing is, that the proto with 358n and MCP goes from 2.5v down to -2.5 which is what I want, the smd PCB version, output from 358d follows MCP chip which os 5v to 0v both the dip and the and are made from the same schematic. +15 and -15 is on the chip. I checked all the traces like 10 times or more. I'm now going to put the dip package with short wires into the soic PCB

Very odd.

You can try feeding your values into this calculator to see what you get.
Fix V2 at 5 volts and feed values between 0 and 5 in at V1 (v1 corresponds to your DAC output)

~~https://www.allaboutcircuits.com/tools/op-amp-voltage-and-gain-calculator/~~

Edit.
That calculator is a complete mess (see the user comments) and is still wrong after a correction attempt.

I did a quick simulation using EasyEDA. The results are below. I guess your problem is the missing resistor for applying bias which you considered as optional.

DiffAmp.pdf (299 KB)

This, based on your original circuit, gives an output of -2.5 to +2.5 volts from a 0 to 5 volt input. The inversion you can do in software as previously stated.

6v6gt:
This, based on your original circuit, gives an output of -2.5 to +2.5 volts from a 0 to 5 volt input. The inversion you can do in software as previously stated.

6v6gt You are an absolute genius. Thanks a lot for sorting this our for me.!!!