for op-amp wizards: subtractor circuit

Mar 25, 2006 14 Replies

I'm looking at the schematic, Figure 3 at

formatting link



I want to use this for high-side current sensing. I start running into problems when either op-amp outputs have to fall to near 0. I am using an op-amp that supposedly works down to 0, but it's not getting close enough. I'm working with a single polarity supply, and a 0.1 ohm sense resistor. I am using 10K for R1-R4, and 2.5K for Rg....such that the output is 10 times the input difference (1 volt per amp).



Now if I could shift the output up 1 volt, such that zero current is 1 volt, 1 amp is 2 volts, etc, that might solve my problem. But I'm trying to avoid negative voltages. I realize if I tie the grounded end of R4 to a voltage it will do exactly what I want, but the output of one op-amp has to drop below 0 for low current measurements. Any ideas?



You need an opamp that has an input common mode range that includes the positive rail (if the current sense resistor in in that rail) and an output range that goes down to ground. Are you sure your problem isn't the input common mode range? What opamp and supply voltage are you dealing with?

Of course, since current shunt voltage measurements do not usually require a high input impedance subtractor, you might do better with the single opamp version shown in figure 2.

It's the LM324, at least for now. I've used the 324 in a previous power supply design, and it works great. I may go to a better op-amp later but that's beside the point.....

As for the positive rail thing, I'm not too worried about that now. The op-amp will be powered with much more voltage than the sense resistor will see.

Here's the thing. The 324 output gets very close to ground, especially with a pull down resistor on the output. But not close enough. I have a 47ohm pull down and it drops down to 24mV. I'm going for precision here. In a previous, completely different current sense design, I dealt with this problem by bringing up the output voltage floor to

2.5V. No op-amp output had to drop below 2.5V. Then I measured from the op-amp output to the 2.5V reference. Don't laugh; despite using a lowly 324 and dealing with millivolt levels, that current meter is *very* accurate.

I may tinker with that other circuit you pointed out since it's simpler and possibly easier to analyze and tweak for what I want.

Have a look at the National Semiconductor LM10 - it includes a 200mV reference output, which might replace your 2.5V reference in a useful way.

The op amp itself is old, but interesting - Bob Widlar was years ahead of everybody else. Farnell still carries the LM10CN and the (slightly cheaper) LM10CLN.

formatting link

Bill Sloman, Nijmegen

feedback o---------------------. | | |\\ | -|-\\ | out | >--->|---o-o--------o -|+/ | |/ .-. | | | | '-' | | === GND (created by AACircuit v1.28.6 beta 04/19/05

formatting link

Granted, there will still be some leakage from the diode, but what do you want for free?

Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/

You're nearly there. Replace the GND at R4 in Figure 3 with your reference voltage. This will shift the output upwards by the same voltage. It also reduces the existing CM range headroom by the same amount.

I was thinking of something like this, but that pull down resistor should ideally be zero to achieve zero output voltage....something that isn't going to work. Hmmm, but if I used larger value resistors in the rest of the circuit this might work.

BTW, the circuit you suggested for the switching and linear power supply (the diff amp with 2 resistors, BJT and diode) works

*beautifully*. The op amp circuits jumped all over the place. Simple and stable. I love it.

No question about it, recently finished downloading all of his published papers, letters, and briefs. But I think the modern process improvements and high fidelity physics simulations would have deprived him of the work he liked best.

[...]

How about this for a different attack:

You can make Vcc/2 as your "signal ground". This will mean that the op-amps will all be at the center of their swing for zero volts. R-R opamps tend to have extra bias current when they are running near the rail. Putting the "zero" at the center of the swing avoids this issue.

-- kensmith@rahul.net forging knowledge

snipped-for-privacy@yahoo.com scrobe on the papyrus:

Have you considered the AMP04? Have a look at:

formatting link

John B

snipped-for-privacy@yahoo.com scrobe on the papyrus:

You should also look at this app note:

formatting link

John B

I can't believe instrumentation amps were never mentioned in school. I've heard of them, but I always thought they were a grade of op-amp. This looks really slick. I ordered an AMP04.

is that all nicely lumped together somehwer? care to provide a link?

Cheers Terry

The LM324 and 47 ohm are being asked to sink the current through that final 10K feedback resistor, whose top end is at the voltage on the shunt. That 24mV suggests that the supply being measured is around the 6V mark.

With a low impedance source carrying Amps you can afford to pull the odd 1mA off it, so you don't need to struggle with diff amp. 0R1 Vs(6V?) ------+/\\/\\/+----------------->Load+ | | [100R] +-------------------------+ | | +------[1k]----+---+---------+ | | | | | | | 100p=== /_\\D _ | | +--| | | / -|--+ | ptype||--[100R]--+---+-----+----->Vout+ 1V/A-->+--------|+_/ | | | [1k] [1k] | | 0v------------+----------------+----->Vout- | +---------------------->Load-

The top opamp simply develops a current of 1mA/A into the 1k down on 0V. Generating a constant current is the piece of elastic that takes away the CMV. The lower opamp is just a buffer which no longer has the offset due to having to sink current. The ptype MOSFET could be a pnp darlington.

Tony Williams.

This is intriguing and I'm going to try it.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required