AN-002 application note

Designing a 4–20 mA receiver front-end for a 12-bit ADC

Burden resistor sizing, protection, filtering and scaling — a loop receiver that survives wiring mistakes in the field.

PUBLISHED ~1 minBY Raghul

Also available in: Русский · Deutsch

Before you start

Time ≈ 2 h bench workLevel intermediate

Hardware & parts

  • ! required4–20 mA loop calibrator or transmitter
  • ! required150 Ω 0.1 % 25 ppm/°C burden resistor
  • ! requiredSMBJ33CA TVS diode + 10 kΩ series resistor
  • optionalBench multimeter (5½ digit)

    For calibrating the scaling constants.

Software & packages

  • ! requiredArm GNU Toolchain ↗>= 13.2
    sudo apt install gcc-arm-none-eabi
  • optionalPython 3 + NumPy
    pip install numpy

The current loop is still the workhorse of process instrumentation. This note walks through a receiver that converts the loop current into a voltage an MCU’s ADC can read, and survives a technician wiring it backwards.

Requirements

Parameter Value
Input range 3.8 – 20.5 mA (NAMUR NE43)
ADC 12-bit, 0 – 3.3 V
Loop compliance ≤ 5 V drop at 20 mA
Fault survival 24 V reverse, 30 V direct

Sizing the burden resistor

The burden resistor sets both the full-scale voltage and the drop the transmitter has to supply:

$$ V_{FS} = I_{max} \cdot R_B \qquad\Rightarrow\qquad R_B = \frac{3.0,\text{V}}{20.5,\text{mA}} \approx 146,\Omega $$

Picking a standard 150 Ω, 0.1 %, 25 ppm/°C part gives 3.075 V at 20.5 mA, leaving headroom below the 3.3 V rail for the op-amp output swing.

Filtering

A first-order RC ahead of the ADC buffer sets the anti-alias corner. With $R = 10,\text{k}\Omega$ and $C = 100,\text{nF}$:

$$ f_c = \frac{1}{2\pi RC} \approx 159,\text{Hz} $$

That is well above any process signal and comfortably attenuates 50 Hz mains pickup when combined with oversampling in firmware.

Firmware scaling

/* Convert a raw 12-bit ADC count to loop current in microamps. */
static inline uint32_t adc_to_ua(uint16_t raw)
{
    /* Vref = 3300 mV, Rb = 150 ohm  →  I = raw * 3300 / 4095 / 150 */
    return ((uint32_t)raw * 3300u * 1000u) / (4095u * 150u);
}

Tip: flag anything below 3.6 mA or above 21 mA as a sensor fault rather than clamping it. Clamped values hide broken wires.

Rate article

Found a mistake? Let me know.

⌁ Comments & reactions

Comments are not configured yet.