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
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.
Please explain exactly what you want to do, and we can suggest a different design.
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.
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.
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.
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
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)
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.
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.