What's new

Full changelogEngine 1.26.4

Current-Sense Resistor & Amplifier

Analog & Interfacing

Which shunt and gain read this current range, how hot is the shunt, and how wrong is the low end?

Inputs

Board profile

Fills Ambient temperature from your board profile.

A
Below the maximum current.
A
500 mA
V
50 mV
Ω
Shunt datasheet.
W
V/V
Datasheet maximum, input-referred.
V
50 µV
V
The share of the ADC full scale kept free at Imax.
%
%
Shunt and temperature
From the derating curve at your ambient, and your own policy.
%
At 25 °C.
%
Shunt datasheet.
ppm/°C
Shunt datasheet, as mounted on your board.
°C/W
°C
Amplifier and ADC
Datasheet maximum.
%
Datasheet output swing to ground; 0 is ideal.
V

Results

Shunt resistance R
10mΩ
Pass

Checked: P ≤ 0.8 × Prated × d (design margin): 250 mW is 0.5 × the 500 mW you allow, 1 W × 50 %

Show working
  1. Shunt resistanceR = V_drop / I_max = 50 mV / 5 A = 10 mΩ
  2. Shunt dissipationP = I_max² × R = (5 A)² × 10 mΩ = 250 mW, 0.5 × the 500 mW you allow
  3. Shunt temperature riseΔT = P × R_θ = 250 mW × 40 °C/W = 10 °C
  4. Offset at I_minV_os / (I_min × R) = 50 µV / (500 mA × 10 mΩ) = 1 %
  5. Error at I_minε = √((V_os / (I_min × R))² + t_R² + ε_G² + (α × |T_A + ΔT − 25 °C|)²) = √(1² + 1² + 1² + 0.001²) % = 1.732 %
Error at Imin ε(Imin)

offset 1 %, tolerance 1 %, gain error 1 %, TCR 0.001 %

1.732%
Error at Imax ε(Imax)

offset 0.1 %, tolerance 1 %, gain error 1 %, TCR 0.1 %

1.421%
Output at Imax Vout,max
2.5V
All results (9)
Shunt dissipation P
250mW
Shunt temperature rise ΔT

the shunt at 35 °C at Imax

10°C
Current per LSB ILSB
1.611mA
Codes at Imin
Lowest current within budget Iok

already met at Imin; below Imin is not checked

500mA
Headroom left at Imax
24.24%
Output at Imin Vout,min
250mV
Error at Imin, linear sum
3.001%
Error at Imax, linear sum
2.2%
ε(I), RSS

Accuracy

Precision
Exact arithmetic on Ohm's law, I²R and the TCR definition, with your datasheet maxima.

The four error terms add as a root sum of squares, a statistical estimate; their straight sum, the worst case, is a detail value. The amplifier offset sets most of the error at the low end of the range.

Most of the uncertainty comes from Amplifier offset. Tighten that first.

Verified against

2 independent cases. See the working.

This is a design aid. The engineer remains responsible for the design and for checking the standard itself.

Parameter sweep

Vary one input over a range and see the answer and verdict at each step, as a table and a curve.Pro

Worst-case corners

Put a tolerance on each input and get the worst-case band around the answer.Pro

Circuit

The principle

A current-sense resistor, the shunt, turns the current into a small voltage, I·R, and an amplifier of gain G scales it for the ADC. The shunt must be small enough to stay cool and drop little, and large enough that the amplifier's offset stays small beside I·R at the lowest current you read. This page sizes R or G, checks the shunt's heat and the output headroom, and gives the error at both ends of the range.

Shunt
R=VdropImaxR = \frac{V_{drop}}{I_{max}}
Ohm's law at the largest current. On the low side the drop also lifts the load's ground by as much.
Heat
P=Imax2RΔT=P RθP = I_{max}^{2} R \qquad \Delta T = P\, R_{\theta}
Rθ is the shunt's thermal resistance as mounted, from its datasheet. P is judged against Prated·d, the rating times the share your derating allows at TA.
Headroom
Vout=G I RG ImaxR≤VFS (1−h)V_{out} = G\, I\, R \qquad G\, I_{max} R \leq V_{FS}\,(1 - h)
The G mode solves this for the largest gain. The headroom left at Imax is (VFS − G·Imax·R)/VFS.
Resolution
ILSB=VFS2N G RI_{LSB} = \frac{V_{FS}}{2^{N}\, G\, R}
The current one ADC code stands for. The codes at Imin are Imin/ILSB.
Error at current I
ε(I)=(VosIR)2+tR2+εG2+(α ∣TA+ΔT(I)−T0∣)2\varepsilon(I) = \sqrt{\left(\frac{V_{os}}{I R}\right)^{2} + t_R^{2} + \varepsilon_G^{2} + \left(\alpha\, \left|T_A + \Delta T(I) - T_0\right|\right)^{2}}
The four terms add as a root sum of squares. T0 = 25 °C, where the shunt tolerance is given, and ΔT(I) = I²·R·Rθ. The lowest current within budget is where ε(I) meets it, found by bisection.
  • IIthe current being read, from Imin to Imax
  • Imin, ImaxI_{min},\,I_{max}smallest current to read, and the maximum current
  • VdropV_{drop}drop across the shunt at Imax
  • R, GR,\,Gshunt resistance and amplifier gain
  • P, ΔTP,\,\Delta Tshunt dissipation and its temperature rise
  • RθR_{\theta}shunt thermal resistance, as mounted
  • Prated, dP_{rated},\,dshunt power rating, and the share of it you allow
  • VoutV_{out}amplifier output, G·I·R
  • VFS, NV_{FS},\,NADC full scale and resolution
  • hhheadroom: the share of VFS kept free at Imax
  • Vos, εGV_{os},\,\varepsilon_Gamplifier offset, input-referred, and gain error
  • tR, αt_R,\,\alphashunt tolerance and its temperature coefficient (TCR)
  • TA, T0T_A,\,T_0ambient temperature, and 25 °C, where the tolerance is given
More detail

Choosing R

A larger R gives more signal over the amplifier's offset, so the low end reads better. It also burns more power and drops more of the supply. Choose the drop first, then check the heat and the error at Imin here.

Where the error comes from

At the low end the offset sets the error: Vos is fixed, while I·R falls with I. At the top the shunt tolerance, the gain error and the TCR set it. The TCR term counts from 25 °C, where the tolerance is given, to the shunt's own temperature, TA + ΔT. The page adds the four terms as a root sum of squares, a statistical estimate, and shows their straight sum, the worst case, beside them.

Layout

Take the sense lines from the shunt's own pads (a Kelvin connection). The copper that carries the current has resistance of its own, and it changes with temperature far more than a shunt does. On the low side the shunt lifts the load's ground; on the high side the amplifier must accept the bus voltage at its inputs.

The page does not compute the amplifier's drift, so enter Vos and the gain error at their datasheet maxima over your temperature range, and Rθ as the shunt is mounted.

Not modelled: CMRR, the amplifier's bandwidth and the ADC's own errors. A reading at or below the amplifier's output floor is marked Unverified.

References: the shunt resistor's datasheet, for Rθ, the power derating curve, the TCR and the tolerance; the amplifier's datasheet, for Vos, the gain error and the output swing to ground. Related: Junction Temperature, Op-Amp Noise & DC Error, NTC Thermistor to ADC.

Engine version ⁨1.26.4⁩