I want to improve the accuracy of a current sensor. 49% of the error I have at the moment is from the tolerance of the shunt resistor and 26 percent of that it is from the op amp offset voltage.

How can I improve my accuracy and reduce such a high percent of error coming from these two sources? In my spice simulation I used two shunts in parallel but this didn't improve the accuracy. enter image description here

  • 1
    \$\begingroup\$ If you calibrated out the static errors, what you are left with are non-static errors so, how big are the "problematic" non-static errors and, what bandwidth for current sensing are you expecting to remain accurate over? It's a numbers game and you need to provide circuit details as well. \$\endgroup\$
    – Andy aka
    Mar 16 at 15:10
  • \$\begingroup\$ You may calibrate the OPA by adjusting amplification with variable resistor. \$\endgroup\$
    – user263983
    Mar 16 at 15:20
  • \$\begingroup\$ Does the op amp you are using have input offset pins, if not you can often add in a small summing voltage to reduce the offset? The data sheet may have recommended ways to adjust the offsets . There are also precision op amps available with greatly reduced input offset parameters. For the shunt resistor(s) couldn't you add a small potentiometer to zero in the correct value? Can you include a schematic of your setup so others can give further advice? \$\endgroup\$
    – Nedd
    Mar 16 at 15:27
  • \$\begingroup\$ Draw the circuit so we can discuss it. When you are using low-value resistors you must be very careful where you sense the voltage. Many commercial shunts have 4 connections, 2 for the current, and 2 for the voltage sense. \$\endgroup\$
    – Mattman944
    Mar 16 at 15:28
  • \$\begingroup\$ @Nedd I have added my current sensing circuit. waiting for your valuable advise \$\endgroup\$
    – Alison
    Mar 17 at 11:24

3 Answers 3


First of all, a production-level full-system calibration usually takes care of it. So, whenever I see such questions, I first think that you shouldn't care about any of it, since those are static errors. So this may be a case of an XY problem, where you think that you need high static accuracy without calibration, but you actually should think about calibration instead.

It's always a tradeoff. You get accuracy out of such circuits by:

  1. Paying money for components: use low tempco, low tolerance components, good enough to eliminate trimming.

  2. Paying money for your time: perform a system calibration of the sensor, and trim the gain/zero.

  3. Include a self-calibration source in the circuit, and have the MCU use it on start-up to self-test and calibrate the system.

You'll still need an end-of-production-line test for this system, so you might as well do it using calibration standards of the accuracy you need, and get calibration for the price of the test you're doing anyway.

If a self-calibration source is included in the design, then the built-in self-test can be used as a part of the final production test.

Paying more money for components doesn't usually absolve you from testing, at least for small production runs, so at least low tolerances aren't helpful from that point since you can calibrate "for free". Low tempco may be of advantage if the application warrants it.

Also, in this particular case, a self-calibration circuit could potentially cost more than a better shunt, so there's not much point to it. The op-amp offset can be calibrated out trivially by ensuring a no-current condition and taking a zero reference reading.

Most of this assumes that you're using an ADC and an MCU as the signal sink within the product. If the outputs are analog, then you can do trimming in several ways:

  1. Use an ADC-MCU-DAC and trim gain and offset in software.

  2. Use non-volatile digital potentiometers controlled from an external calibration fixture to adjust a purely analog signal chain.

  3. Use electromechanical potentiometers controlled by RC servos with spring-loaded self-centering "screwdriver" attachments, controlled by an external calibration fixture.

  4. Tweak the electromechanical potentiometers manually during calibration.

  5. Connect potentiometers in parallel to fixed resistors that set zero offset and gain during calibration, calibrate, disconnect potentiometers, then solder a selected parallel fixed resistor of the same value where the potentiometer was previously connected. For purely analog trimming, this has the highest reliability and lowest drift and noise.

Everything above deals with static errors.

Dynamic errors would be caused by the voltage coefficient of the shunt, and by the non-negligible tempco of the shunt - since all other tempcos can be fairly easily made negiligible in comparison.

In high quality solid metal shunts that aren't overstressed, the voltage coefficient- and resistance-vs-temperature curves are quite constant over time and usually similar or same between units. The calibration would use the shunt temperature and shunt voltage to apply a gain and offset correction. This can be done in purely analog domain using a diode-network function generator, or digitally using a suitable numerical model.

A hybrid approach is also possible, where an MCU measures the shunt temperature and voltage for the purposes of dynamic error correction only and changes digital potentiometer or DAC outputs to add compensating factors into an otherwise analog signal chain.


If your circuit switches a load, perhaps with PWM, you can get rid of the offset voltage by measuring current twice: when the load is off, and when it is on. This is quite convenient when the microcontroller's ADC is synchronized with the PWM counter.

Regarding the sense resistor, you can always use a more accurate resistor, but you also have to be careful about its temperature coefficient. If the resistor has a low value, then the resistance of solder connections begins to matter, and you might want to use a 4-terminal resistor instead.

However, keep in mind that the gain error applies to the whole chain: sense resistor, opamp gain-setting resistors (if it's an integrated current sense amp, gain error will be specified), potentially opamp settling time, and of course the accuracy of the ADC reference itself which sets the scale by which voltage is measured.

  • \$\begingroup\$ Yes i am controlling circuit with PWM but i dont understand how i can remove offset by measuring current twice at turn on and turn off. Could you please elaborate this point. Thanks \$\endgroup\$
    – Alison
    Mar 17 at 11:18
  • \$\begingroup\$ When the PWM is off, current is zero, so the ADC will measure only the offset of the current sense opamp. When the PWM is on, it will measure the current plus the offset of the opamp. Substracting the two gets rid of the offset. This only works if you can sample when current through the sense resistor is zero, of course. \$\endgroup\$
    – bobflux
    Mar 17 at 17:34

You can pretty much eliminate the offset error by using a chopper amplifier, which actually samples the input offset and nulls it out. The disadvantages are those of many sampled system -- aliasing if the chopper frequency isn't fast enough, clock noise spreading across your board...


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.