Motor Control Tools

ADC Current Sensing Scaling

Convert ADC sample voltage to phase current for shunt-based current sensing front ends.

V
bits
V/V
V
Shunt resistance unit
Expected current unit
A

Leave blank to skip the expected-code and range-utilization checks.

Expected current uses only 12.1% of the ADC's available range in that direction — most of the ADC's resolution is going unused. Consider increasing amplifier gain or shunt resistance to better fill the input range.

0 (max negative)code 2048 (zero-current)4095 (max positive)

marks the expected current's ADC code.

ADC LSB voltage0.000806V
Volts per amp0.02V/A
Amps per ADC count0.040283A/count
ADC counts per amp24.824counts/A
Zero-current ADC code2048counts
Expected ADC code2296counts
Max positive current82.5A
Max negative current-82.5A

Formula

Shunt-based current sensing scaling

LSB = Vref / 2^N V/A = Gain · Rshunt Code = round((Voffset + I · V/A) / LSB)

Vref
ADC reference voltage [V]
N
ADC resolution [bits]
Gain
Current-sense amplifier gain [V/V]
Rshunt
Shunt resistance [Ω]
Voffset
Zero-current (midpoint) voltage at the ADC input [V]
I
Phase/measured current [A]

LSB voltage uses Vref / 2^N — a common approximation; some references instead use Vref / (2^N − 1). The offset voltage is assumed measured at the ADC input pin (post-amplifier), and the ADC's usable input range is assumed to be exactly [0, Vref] with no headroom margin.

Why the offset and gain matter as much as the shunt

A shunt sets the volts-per-amp scale, but it's the offset voltage that decides where zero current sits inside the ADC's 0–Vref window, and the gain that decides how much of that window a given current range actually fills. Two front ends with an identical shunt can have wildly different usable current range and resolution depending on where the offset is centered and how aggressively the gain is set — which is why this calculator surfaces utilization and saturation warnings instead of only reporting the raw scaling numbers.

Worked example

12-bit ADC, Vref = 3.3 V, 1 mΩ shunt, 20 V/V amplifier gain, offset = 1.65 V (centered):

  • LSB = 3.3 / 4096 ≈ 0.8 mV
  • Volts per amp = 20 × 0.001 = 0.02 V/A
  • Max positive current = (3.3 − 1.65) / 0.02 = 82.5 A
  • Max negative current = −1.65 / 0.02 = −82.5 A (symmetric, since the offset is centered)