# LTSPice op-amp sim, fundamental understanding.

#### Sjöholm

Joined Jun 13, 2018
35
Hi Everyone!

I have this basic differential amplifier, it amplifies the voltage over R7 by 100 and the sim works fine. However if I connect V2(-) to V1(-) then it doesn't work, the output of U1 becomes basically zero. So I would like to know why? I think it's my lack of fundamental understanding of LTSpice and/or differential amplifiers that is the problem. And if I can't connect V2(-) to V1(-) and I wanted to do something useful with the U1 output e.g. connect it to the circuit made up of V1/R7/R6 then I would have to use a e.g. optocoupler,? That can't be so..

#### AlbertHall

Joined Jun 4, 2014
8,860
When the two negatives are connected, V2+ is 5V and this 5V is connected to the non-inverting input of U1.

#### Sjöholm

Joined Jun 13, 2018
35
When the two negatives are connected, V2+ is 5V and this 5V is connected to the non-inverting input of U1.
Yes I see that, but why does that make it non-functional? the diff amp should subtract -in from +in and amplify this difference?

#### LvW

Joined Jun 13, 2013
887
1.) Do not use such large resistor values like 10 meg. All the known formulas assume that the opamps internal input resistances can be neglected ...and this requires that all external resistors are much less than these input resistances.
2.) You are using single supply only - hence, your output cannot go to negative output voltages. Ust instead double supply.

#### Sjöholm

Joined Jun 13, 2018
35
1.) Do not use such large resistor values like 10 meg. All the known formulas assume that the opamps internal input resistances can be neglected ...and this requires that all external resistors are much less than these input resistances.
2.) You are using single supply only - hence, your output cannot go to negative output voltages. Ust instead double supply.
Hi LvW

1) The 10M was suggested by the datasheet, however it doesn't make any difference if I use 10k/100k
2) Yes, I don't need negative output voltage so it's ok with single supply in this case.

Joined Mar 10, 2018
3,726
Seems to work. ~ 35.7 mV in differential, ~ 3.56V out.

Joined Mar 10, 2018
3,726
On further examination, specifically allowable input CM range, you are
violating it - its 3.5V min, eg. the inputs will function up to 3.5 min, 3.8 typ,
but in your case they are almost 5V

Regards, Dana.

Last edited:

#### Sjöholm

Joined Jun 13, 2018
35
On further examination, specifically allowable input CM range, you are
violating it - its 3.5V min, eg. the inputs will function up to 3.5 min, 3.8 typ,
but in your case they are almost 5V

View attachment 178269

Regards, Dana.
Yes you are right, I just lowered V2 to 2V and then it worked, THANK YOU!

#### crutschow

Joined Mar 14, 2008
23,826
Your original circuit will work if you use a Rail-Rail input type opamp, such as an LT1366.

#### Sjöholm

Joined Jun 13, 2018
35
Your original circuit will work if you use a Rail-Rail input type opamp, such as an LT1366.
I actually tried with LMC6482 and LT1884, but I can't seem to make those models work in LTSpice.

For the LMC6482 I took the PSpice model from TI website and imported it into LTSpice.

The LT1884 already came with LTSpice, but I couldn't even make it works as a simple amplifier :-(

Joined Mar 10, 2018
3,726
I dropped source to 3V to get inputs into CM range, and changed to LMC6482. Seemed to work -

Regards, Dana.

#### Sjöholm

Joined Jun 13, 2018
35
I dropped source to 3V to get inputs into CM range, and changed to LMC6482. Seemed to work -

View attachment 178315

Regards, Dana.
I'm sure it does work, it's just that the LMC6482 PSpice model does not seem to work in LTSpice. Maybe I should try your ADIsimPE software it's PSpice compatible.

#### eetech00

Joined Jun 8, 2013
1,747
Hi

Works for me..

#### eetech00

Joined Jun 8, 2013
1,747
Here's using the LMC6482.

#### Sjöholm

Joined Jun 13, 2018
35
Here's using the LMC6482.

View attachment 178335
I see, so the LMC6482 model is the one from TI? The only thing I did differently was to rename the file from .LIB to .sub and place it in the LTspiceXVII/lib/sub folder, and then created an .asy file which I placed in the LTspiceXVII/lib/sym folder. But I really that can't see that as the reason why it doesn't work for me here.

#### Sjöholm

Joined Jun 13, 2018
35

Joined Mar 10, 2018
3,726
spice came from.

Regards, Dana.

#### Sjöholm

Joined Jun 13, 2018
35
Here's using the LMC6482.

View attachment 178335
I tried again and this time it works, and I don't know why. Since last time I had to reinstall LTSpice because I had to update wine to 4.0 in order to make ADIsimPE work, and then I also added the serial resistance of the supplies as you did.

#### eetech00

Joined Jun 8, 2013
1,747
I see, so the LMC6482 model is the one from TI? The only thing I did differently was to rename the file from .LIB to .sub and place it in the LTspiceXVII/lib/sub folder, and then created an .asy file which I placed in the LTspiceXVII/lib/sym folder. But I really that can't see that as the reason why it doesn't work for me here.
I did nothing more than download the file from TI and use the opamp2 symbol.

Maybe your symbols pin mapping was incorrect?