I am trying to build a current sensing circuit (two channels), with no requirement of precision (i.e., is current passing over some threshold whatnot). The (somewhat generic) circuit I am implementing is this:


The circuit works as expected with LM358 of TI. But I insisted to use a Rail-to-Rail opamp and got this LMV358 from Diodes Incorporated.

I used 470k %1 as R2's and 3k3 %1 as R1's in the circuit. The output is around x0.9 of the input. The gain is not around 140 as expected. My shunt resistor is 20mOhms, and current is around 50 mA. So my input voltage difference happens to be around 1 mV. My supply is around 5.1 volts.

However, it does not work.

I take the LMV358 out of the PCB, resoldered the LM358, and everything works fine again. Actually, when I attached the LMV358 first, only one channel (one of the dual opamps) was working. Once I detach it and attach to an independent breakout-board, it works fine.

Isn't this kinda weird?

  • 4
    \$\begingroup\$ what does "it does not work" mean..... ? \$\endgroup\$
    – Trevor_G
    Dec 11, 2017 at 16:42
  • 1
    \$\begingroup\$ It might be helpful if you could elaborate a tiny bit more on "does not work". \$\endgroup\$ Dec 11, 2017 at 16:43
  • 1
    \$\begingroup\$ it does not amplify at all. I used 470k %1 as R2's and 3k3 %1 as R1's in the circuit. the output is around x0.9 of the input. the gain is not around 140 as expected. My shunt resistor is 20mOhms, and current is around 50 mA. So my input voltage difference happens to be around 1 mV. \$\endgroup\$
    – engiz
    Dec 11, 2017 at 16:45
  • 2
    \$\begingroup\$ Your right down in the input offset voltage range... \$\endgroup\$
    – Trevor_G
    Dec 11, 2017 at 16:48
  • 1
    \$\begingroup\$ For such a crude current sensor, what made you decide on 20mΩ when 50~75mV full scale drop is de facto nominal. \$\endgroup\$ Dec 11, 2017 at 17:27

2 Answers 2


Your problem is that the offset voltage is in the wrong direction (50:50 chance) so your signal is swamped by the offset. If it was the other way you'd see a positive offset in the output voltage.

The LMV358 has a maximum offset voltage of 7mV, and it could be positive or negative. That's similar to the LM358 but you happened to get one that is negative so you won't get any output until the input exceeds the offset voltage.

I suggest you use a more precise op-amp that has a lower maximum Vos. Chopper ("Zero drift") types are often used in current sensing since (for obvious reasons) you want to keep the sense voltage as low as possible while still getting acceptable accuracy. Eg. This series of op-amps from ONSemi which is literally hundreds of times better. Note the maximum 5.5V supply voltage.

  • \$\begingroup\$ I agree but the real fault is the designer's attitude. ( dont care about specs) \$\endgroup\$ Dec 11, 2017 at 16:56
  • \$\begingroup\$ @TonyStewart.EEsince'75 Maybe you want to write a canonical question and self-generated answer that includes specifications and error budgets (I don't think there is one, but I didn't look). Then we can just link to it in the future when this comes up (and it will). \$\endgroup\$ Dec 11, 2017 at 17:00
  • \$\begingroup\$ There are general guidelines and design solutions already published which makes this site redundant if people can research and read for even answers here. \$\endgroup\$ Dec 11, 2017 at 17:15
  • \$\begingroup\$ @TonyStewart.EEsince'75 Catch 22. \$\endgroup\$ Dec 11, 2017 at 17:25
  • 1
    \$\begingroup\$ In my first job, many years ago, I was working as a maintenance engineer in an old phone exchange. The kind whose CPUs took a couple racks of cards and was made by a well-known company. My main job was to keep a supply of functioning cards for the technicians. On diagnosing one of the cards, I noticed that one of the 741s in it was being used as a comparator against a 5mV reference. About half the offset specification at the time (and with no offset compensation). The fix? I just switched two 741s around in the same card. This is a design that went through a whole team in a large company. \$\endgroup\$ Dec 25, 2018 at 23:56

Your fault is that your design specs are neglected. As a consequence, so is the margin to your operating conditions to specifications. Important things to consider are the margin to loss of CMRR where it stops working. The critical specs are input CM bias for a single supply;

  • Vcc=5V

  • Vio . . .1.7 typ 7 max. [+/- mV]

  • CMRR 0 min -0.2 typ [V]

  • All unused control inputs of the device must be held at VCC or GND to ensure proper device operation

The reason is that you are violating some parameter in the datasheet or the system design specs, such as;

  • Min V drop and input offset error, noise error

    • The input RMS noise levels can also degrade low current thresholds so this specification also comes into play


A design improvement adds some positive input Vcm margin to the inputs so that R2 is replaced with a circuit that moves from Gnd=0V to 1V

Pay attention to fine print on unused inputs and input offset voltage.

There are many different classes of OA's but it may not be obvious.

  • RRI ( input only)
  • RRO ( output only) e.g. LMV358
  • RRIO ( input and output)
  • CM input extends to or past Negative Supply (LM358 = -0.3V) which is why this part did not fail
  • \$\begingroup\$ Only lame reviewers give -1 without reasons. \$\endgroup\$ Dec 11, 2017 at 17:13
  • 1
    \$\begingroup\$ LM358 and LMV358 have about the same open loop output impedance (both pretty bad), but regardless it should barely matter unless the circuit designer chooses a closed loop gain which is too high. \$\endgroup\$
    – τεκ
    Dec 12, 2017 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.