Getting confused with differential amp - need o/p of difference only.

Thread Starter

IcedFruits

Joined Jan 15, 2014
97
Hi, I have 2 voltage sources(lets say 1V & 1.1V) and i need o/p as the voltage difference only, with a known gain.

i.e. If the gain is 10x, then the o/p should be 10x(1.1-1) = 1V

I was checking the common non-inverting differential amplifier circuit, it is giving out 2V ( 1V difference + 1V inverting input), in the following :



Which seems okay as per this calculation :
( Vinv is voltage at - pin of opamp, which is same as + pin anyways )

Vinv = (Vo-V2) * { R1/(R1+R10) }
or, (Vo-V2) = Vinv * { (R1+R10)/R1 }
or, Vo = Vinv * { (R1+R10)/R1 } + V2

i.e. The V2 component is always there added to the output.

Now, I do not want to have V2, I want
Vo = Gain x (V1-V2)

so that i can directly measure the Vo in multi meter, without keeping track of V1 or V2 (both of which changes, but V1 with always be > V2 ).

So, how can I do that ?
 
Last edited:

Thread Starter

IcedFruits

Joined Jan 15, 2014
97
How does that present a problem?
the o/p will be -ve, as per the equation:

Vo = - (R2/R1) * (V1 - V2)

unless i supply + & - voltages to opamp, it's o/p will only be hugging the ground i guess.

Why not just directly measure the difference with the meter? :confused:
need to amplify it, 10 times or something. then will use a display to show the reading permanently. please give me some ideas !! :oops:
 

MrChips

Joined Oct 2, 2009
30,824
the o/p will be -ve, as per the equation:

Vo = - (R2/R1) * (V1 - V2)

unless i supply + & - voltages to opamp, it's o/p will only be hugging the ground i guess.



need to amplify it, 10 times or something. then will use a display to show the reading permanently. please give me some ideas !! :oops:
According to my math:

V1 = 1.0V
V2 = 1.1V
R2/R1 = 10

Vo = - (R2/R1) * (V1 - V2)

Vo = -10*(1V -1.1V)
= -10*(-0.1V)
= 1V
 

OBW0549

Joined Mar 2, 2015
3,566
Vo = - (R2/R1) * (V1 - V2)

unless i supply + & - voltages to opamp, it's o/p will only be hugging the ground i guess.
That does not mean the output need go below ground; you do not need a negative supply.

Note that

Vo = - (R2/R1) * (V1 - V2)​

is the same as

Vo = (R2/R1) * (V2 - V1)​

In other words, just swap the inputs.
 

MrAl

Joined Jun 17, 2014
11,496
^ Thanks, but I can not have -ve supply on opamp (supply 0-5V). All voltages are in reference to GND / 0.
Hi,

Just make sure the input that goes to the resistor on the non inverting terminal is always most positive than the voltage input that goes to the resistor on the inverting terminal. That will always produce a positive output as long as you meet the input specs of the op amp. Some op amps can not sense all the way to ground and can not sense all the way to the positive supply rail either, so you have to watch out for that. For some op amps that means they may not even be able to work with just a single 5v power supply.
 

Thread Starter

IcedFruits

Joined Jan 15, 2014
97
LTspice simulation below:
How accurately do you need to measure the difference?
Hi,

Just make sure the input that goes to the resistor on the non inverting terminal is always most positive than the voltage input that goes to the resistor on the inverting terminal. That will always produce a positive output as long as you meet the input specs of the op amp. Some op amps can not sense all the way to ground and can not sense all the way to the positive supply rail either, so you have to watch out for that. For some op amps that means they may not even be able to work with just a single 5v power supply.
yah, got it now, but thanks for all the replies, with such elaborations. you people are so kind. :)

i also know lm358 doesn't reach all the way to ground, & there is normally an offset of ~2mv at its i/p pins, but not exactly concerned about them right now. just going to prepare an approximate solution now. may be will try to replace it with a more accurate opamp in future, i have a pair of OP07, hopefully that will do the job ? but that thing will require a dual power supply, which is another problem.

if you have any other ideas, then please suggest.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,470
i have a pair of OP07, hopefully that will do the job ? but that thing will require a dual power supply, which is another problem.
Yes, they will do the job but do require a dual supply to operate at ground.
If you have only a single supply, you could use an accurate rail-rail type op amp.such as one the these.
 

Thread Starter

IcedFruits

Joined Jan 15, 2014
97
finding such accurate opamps may be difficult and expensive, i think i queried for some part like that once, it was 15 times price of that a LM358. i primarily thought about using an ICL7660 to get dual power supply for OP07, but not yet tested if it will actually work or not.
 

MrAl

Joined Jun 17, 2014
11,496
finding such accurate opamps may be difficult and expensive, i think i queried for some part like that once, it was 15 times price of that a LM358. i primarily thought about using an ICL7660 to get dual power supply for OP07, but not yet tested if it will actually work or not.

Hi,

For very low current projects like this one you can often use tricks to get a dual supply such as using another op amp to generate Ground (0v). If you provide a voltage divider that divides the power source by 2, you get two equal voltages, and the output is 1/2 of the main power supply voltage so if you run it into the op amp using the op amp as source follower, you get an output that is 1/2 of the main supply voltage which if used as ground (0v) that means the positive rail is +Vcc/2 and the negative rail is -Vcc/2. The current for anything running off of this splitter may have to be limited to around 20ma, but that is often enough for these low current circuits.
You also have to be a little careful because at start up the output may not be 0v yet so the full supply voltage may appear across the circuit connected to the +Vcc/2 for the first few milliseconds or so while the op amp has time to ramp up to 1/2 of Vcc.
 

Thread Starter

IcedFruits

Joined Jan 15, 2014
97
hi, thanks for the tip, that sounds like very handy for custom projects ! :)

but here, ground means the ground of the board i am checking the voltage of.
 

MrAl

Joined Jun 17, 2014
11,496
Hi,

Oh so it sounds like you need an actual negative voltage then if you cant change ground itself.
You can get that in several ways if you cant input a separate voltage, such as with an inverting boost converter.
 

Thread Starter

IcedFruits

Joined Jan 15, 2014
97
thanks, i have some mc34063 too, probably they will also do.

may be will just build one 5v inverter from that chip, if icl7660 fails to deliver. but calculating those LRC values though. :)
 
Top