# Current sensing using OP07

I've been trying to build a shunt resistor based current sensor using OP07. I've particularly chosen this because of its ultra low offset value. Its configured to be in differential mode as shown in the circuit below.

simulate this circuit – Schematic created using CircuitLab

The output is to be scaled from milliVolt range to 5v where the full scale deflection is set to be 5A -> 5v.

The problem I'm facing is the output is not scaling with the change in current. It gives out random values which almost has no relation with the input. I've tried the circuit with low side sensing, high side sensing along with Non-inverting configuration.. All the circuits are tried separately and the output is not the expected one. Please help me understanding the issue. Again to test if opamp is damaged, I tried voltage follower and it was working as expected and I tried with common mode(both inverting and non-inverting shorted to ground), the output comes to be saturated. Is this behavior expected?

Thank you for the help!!

• What do you know about its common-mode input voltage range with a single 5V supply? You haven't linked to a datasheet but that might be useful.
– user16324
Commented May 17, 2018 at 12:37
• It's an OP07 amp fm Analog Devices Commented May 17, 2018 at 13:18
• There are 3 correct answers below that explain why you've gotten the results you have with this design. If you're inclined to re-think your approach, here's a resource you might take a look at Commented May 17, 2018 at 13:30

The OP-07 can only handle input voltages within about 2V of the rails, so for a single 6V supply (the minimum recommended) it can handle voltages from 2V to 4V approximately.

Further, the output can only reliably swing to within about 3V of each supply.

Any of the three above reasons is enough to cause your circuit not to work.

So if you gave your OP-07 supplies of +15/-5V it would sort-of work, however this is a really bad way to measure high-side current. The resistor matching will dominate the error. Typical Vos is 30uV, however a tiny 0.1% error in resistor matching will cause an error more than two orders of magnitude higher. Even if you put a fussy trimpot in there, it will drift away from temperature, aging or whatever.

Pick a better circuit for high side current measurement!

• .... yet again....... Commented May 17, 2018 at 12:53
• @Andyaka Yeah, someone should write a canonical answer to this set of issues that seems to trip up a lot of folks. Commented May 17, 2018 at 12:54
• I did one for the 741 and now I hand over the baton to you hehe Commented May 17, 2018 at 12:55
• I've only got square ones left for the forseeable. Commented May 17, 2018 at 12:57
• Read this article. The current source method (MOSFET or BJT + op-amp) will work well off a single supply, if you use a rail-to-rail I/O op-amp. You can get chopper ('zero drift') op-amps with even lower Vos than the ancient OP-07. OPA192 is good 'high voltage' type, but you do need to change the circuit to a different topology. Commented May 17, 2018 at 14:50

Op-07 features/problems: -

• Wide supply voltage range: ±3 V to ±18 V - that rules out +5 volt operation
• Input common mode range is typically 1 volt inside either rail but only guaranteed to be 2 volts inside the power rails.

Plus, if you look into the tolerances needed for the resistors to get anything like mA accuracy, you'd be surprised. This type of circuit is always shown in text books as the archetypal way of measuring current but, nobody uses it because of its impracticality.

• Thank you for the help @andy. I have a doubt lingering in my mind. The datasheet mentions that the input voltage range is ±13.5 (IVR rating). I'm quite confused by that rating. Is it the range specifying the voltage that is applied as differential between + and - terminal or individual referenced to ground? Commented May 17, 2018 at 13:23
• That range (for temperatures of 0 degC to +70 degC) applies to each pin relative to a power supply of +/- 15 volts. This means that over that temperature range the typical limit is from -13.5 volts to +13.5 volts and applies to either pin. It's got nothing to do with a differential voltage - it's an absolute limit imposed on the range that one or both pins has to work within in order for the device to function correctly and is a typical value. The safer value is +/-13 volts and of course this means keeping inside the power rails by 2 volts. Commented May 17, 2018 at 13:30

While Spehro has given an excellent general answer, I'll deal with specifics.

Look at your input voltages. What are they? (Hint: try more than 11 volts).

Now look at your supply voltage: 5 volts, right?

Now go to page 6 of the data sheet (you have looked at the data sheet, right?). Notice that the Absolute Maximum for input voltage is +/- 22 volts, but there's a note:"For supply voltages less than +/-22 V, the absolute maximum input voltage is equal to the supply voltage."

So, not only is your circuit operating in ways you did not expect, there is a very real chance that you have destroyed your op amp.

But Spehro and Andy are right, and you should not be taking this approach unless you are willing to spend a good deal of money on some very high-precision (well-matched) resistors.

• Thank you @WhatRoughBeast! I tried with 11V as well and +/-5 supplies using capactors, resistors and 12v battery. Commented May 17, 2018 at 13:35