Current-sensing circuit: reading a few mV with an ADC
The small voltage across a shunt resistor is amplified and read by the ADC. Low side and high side, Kelvin connection, and offset handling.
The chain
Current → shunt resistor → tens of mV → amplifier (10 to 50×) → RC filter → ADC
Example: 10 A maximum, 5 mΩ shunt → 50 mV. A gain of 20 makes it 1 V. For both directions, add a 1.65 V offset to get 0.65 to 2.65 V, inside the 3.3 V ADC range.
Low side and high side
| Position | Advantage | Disadvantage |
|---|---|---|
| Low side (ground side) | Simple, an ordinary op-amp works | The load's ground is lifted; ground faults cannot be detected |
| High side (supply side) | Load ground is kept; short circuits are detected | Needs an amplifier for high common-mode voltage (INA240 and similar) |
In a motor inverter the shunts go under each half-bridge (three low-side shunts) or in the phase output lines (in-line).
RoadmapSee where this note sits in Electronic Circuits→What to observe on the PCB
- Kelvin connection: take the traces to the amplifier directly from the shunt pads, separately from the trace carrying the large current, so the voltage drop of trace resistance is not mixed in.
- Route the two amplifier input traces side by side so they pick up the same noise.
Software calibration
At power-up, with zero current, average the ADC value several times, store it as the offset and subtract it from later values.