2
\$\begingroup\$

Given a reference voltage level, I need to pick the difference with respect to that reference, amplify it and then convert it to digital. (Yes, I want to measure small voltage drops between two lines).

I'm trying to achieve this by using a OPA379AIDCKR (https://www.ti.com/general/docs/suppproductinfo.tsp?distId=10&gotoUrl=https%3A%2F%2Fwww.ti.com%2Flit%2Fgpn%2Fopa379) in the following configuration:

schema

My simulation result:

enter image description here

As you can see I'm not able to make it work since the computed output should be (2.2)*(V+ - V-) = 0.66 V. Instead the simulation saturates.

I've tried with many resistance values and different configurations, but I always see the same. What did I do wrong? Is there something I'm missing?

PS: Spice model taken from manufacturer's website.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Also probe on the inputs of the opamp, are the values what you expect? \$\endgroup\$ Commented Nov 14, 2021 at 16:19
  • 2
    \$\begingroup\$ Please use the standard symbol for op-amps, not boxes. It makes it hard to read. \$\endgroup\$ Commented Nov 14, 2021 at 19:15

3 Answers 3

4
\$\begingroup\$

Your symbol pinout order does not match the model's pinout order. Here is the relevant section in your OPA379.LIB file:

* END MODEL FEATURES
*
* PINOUT ORDER +IN -IN +V -V OUT
* PINOUT ORDER  1   3   5  2  4
*
.SUBCKT OPA379 1 3 5 2 4
*
Q21 25 26 24 QNL
R77 27 28 200
R78 29 28 200
R79 30 26 100

Notice how the order is listed as: +IN -IN +V -V OUT ? Well, your symbol needs to match this order. It does not, but KiCad/Eeschema has an option to help you in dealing with this problem within the "Spice Model Editor". It is called "Alternate node sequence" and is found at the bottom of the second tab. This allows you to shuffle the symbol's pin order so that it matches the SPICE model/subcircuit. In this specific case, you want to set it to 1 3 5 2 4, as shown below.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Yes! That did the trick! Thank you very much! \$\endgroup\$
    – dew54
    Commented Nov 15, 2021 at 9:44
2
\$\begingroup\$

There is something wrong with the model and/or symbol, perhaps the connections to inputs are reversed. It should work, at least within a few mV at the output.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Yep. Your circuit is fine. You have a reality failure. \$\endgroup\$
    – td127
    Commented Nov 14, 2021 at 17:55
  • \$\begingroup\$ Vcm is to 0.1V outside both rails. \$\endgroup\$
    – Russell McMahon
    Commented Nov 14, 2021 at 18:28
  • \$\begingroup\$ SOLVED: Yes it was a pin misconfigurtion.. see here ngspice.sourceforge.net/ngspice-eeschema.html#OpAmp for alternative pin configurations Thank you! \$\endgroup\$
    – dew54
    Commented Nov 15, 2021 at 9:41
0
\$\begingroup\$

Your pins are in the wrong circular sequence:

OPA379

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