Measuring 4–20 mA sensors with a DAQ
A 0.1% 250 Ω shunt turns a 4–20 mA loop into 1–5 V on any voltage-input DAQ, provided the input range still shows the 21 mA fault level.
Pressure transmitters, flow meters, level sensors and many industrial temperature transmitters report their reading as a current between 4 and 20 mA. Most bench DAQ devices measure voltage, so you put a precision resistor in the loop and measure the voltage across it. The 4–20 mA calculator handles the scaling and resistor math below.
How a current loop works
A 4–20 mA loop is a series circuit: a DC supply (24 V is common), the transmitter, the cable and one or more receivers. The transmitter regulates the loop current to represent its measurement. Because it is a series loop, the same current flows through every element regardless of cable resistance, as long as the supply has voltage to spare, so current loops tolerate long cable runs and electrically noisy plants.
The 4 mA bottom of the range is a live zero. A reading of 0% still carries 4 mA, which keeps a loop-powered transmitter running and lets the receiver tell a real zero from a broken wire.
2-wire, 3-wire and 4-wire transmitters
- 2-wire (loop-powered). The transmitter runs on the loop current itself, so its electronics have to get by on less than 4 mA. It has two terminals: supply in, current out.
- 3-wire. The transmitter has a supply terminal, a common and a signal output. The output current returns through the shared common, so the shunt goes between the signal output and common.
- 4-wire. The transmitter has its own power, often mains, and a separate pair of output terminals. Check the datasheet to see whether the output is active (it sources the current itself) or passive (it needs an external loop supply like a 2-wire device).
The simplest arrangement for a DAQ puts the shunt on the low side of the loop, between the transmitter’s return and the supply negative, with the supply negative tied to the DAQ’s ground. The measured voltage is then ground-referenced and sits between 1 and 5 V with a 250 Ω shunt. For a 2-wire transmitter:
+24 V ----(+) transmitter (-)----+------ AI0
|
250 ohm
|
24 V return ---------------------+------ GND
Choosing the shunt resistor
The shunt converts current to voltage, V = I * R. Two values cover most cases:
| Shunt | 4 mA | 12 mA | 20 mA | Power at 20 mA |
|---|---|---|---|---|
| 250 Ω | 1.00 V | 3.00 V | 5.00 V | 100 mW |
| 100 Ω | 0.40 V | 1.20 V | 2.00 V | 40 mW |
250 Ω gives the 1–5 V signal many controllers and indicators expect, and uses more of a ±5 V or ±10 V input range. 100 Ω takes less voltage out of the loop, which helps when the supply is marginal or other receivers share the loop, and pairs with a ±2.5 V range. Avoid a ±2 V range with 100 Ω, since a 21 mA fault current puts 2.1 V across the shunt.
The resistor’s tolerance becomes gain error directly, so use a 0.1% part with a low temperature coefficient (25 ppm/°C or better), rated for at least twice the power it dissipates. For 250 Ω, a 1/4 W resistor meets that rule at currents up to about 22 mA.
Loop compliance voltage
Each element in the loop takes some of the supply voltage, and the transmitter needs a minimum voltage across its own terminals to regulate, listed in its datasheet. Check the loop at the highest current it will carry, which with NAMUR fault signalling is 21 mA or more:
V_transmitter = V_supply - I_max * (R_shunt + R_cable + R_other)
For a 24 V supply, a 250 Ω shunt, 10 Ω of cable and a 22 mA maximum, the transmitter gets 24 - 0.022 * 260 = 18.28 V. If the transmitter needs at least 12 V, the loop can hold (24 - 12) / 0.022 = 545 ohm in total. A second 250 Ω receiver, such as a panel meter, still fits, and a third does not. A loop short on compliance reads correctly at low currents and then flattens out near the top of the range, which is easy to mistake for a sensor problem.
Scaling the reading
The transmitter maps its configured measurement range linearly onto 4–20 mA:
value = LRV + (I - 4 mA) / 16 mA * (URV - LRV)
where LRV and URV are the lower and upper range values. With a 250 Ω shunt you can work directly in volts:
value = LRV + (V - 1 V) / 4 V * (URV - LRV)
A 0–150 psi pressure transmitter reading 12.4 mA puts 3.100 V across 250 Ω. (12.4 - 4) / 16 = 0.525, so the pressure is 0.525 * 150 = 78.75 psi. The volts form gives the same answer: (3.1 - 1) / 4 * 150 = 78.75. The 4–20 mA calculator does this conversion for your own range and shunt value.
Do the scaling in your acquisition software, and keep the raw channel as well. In most tools that means a scaled or math channel. For this example, (AI0 / 0.250 - 4) / 16 * 150 turns volts into psi, since volts divided by 0.250 kΩ gives milliamps. DAQAtlas, which is in development, evaluates math channels like this on every sample, so live readouts and alarms can run in psi.
NAMUR NE 43 fault levels
NAMUR recommendation NE 43 standardizes how transmitters signal a failure on the analog output, and many transmitters can be configured to follow it. As summarized in Beckhoff’s documentation:
| Loop current | Meaning under NE 43 | Across 250 Ω |
|---|---|---|
| above 3.8 and below 20.5 mA | Measurement information (slightly beyond 4–20 mA is allowed for saturation) | 0.95 to 5.125 V |
| 3.6 mA or less | Failure information, downscale | 0.9 V or less |
| 21.0 mA or more | Failure information, upscale | 5.25 V or more |
The narrow bands between 3.6 and 3.8 mA and between 20.5 and 21.0 mA separate “slightly out of range” from “failed”.
Put alarm limits on the current as well as on the scaled value. Below 3.6 mA or above 21 mA should mark the channel as faulted, and a reading near 0 V points to an open loop or a dead supply.
The input range also has to show the fault levels. With a 250 Ω shunt, 21 mA is 5.25 V. On a ±5 V range that clips at 5 V, which scales to exactly 150 psi, a plausible full-scale reading for a transmitter that has failed. Use the next range up or a smaller shunt.
Single-ended or differential input
With the shunt on the low side and the supply negative tied to the DAQ’s ground, a single-ended input works well. Ground the loop at one point only. You need a differential input in two cases.
When the shunt sits on the high side or partway around the loop, both ends of the shunt sit near the supply voltage, and that common-mode voltage has to stay inside the input’s range. The USB-1208FS-Plus allows −10 V to +20 V on each input in differential mode, and the NI USB-6211 allows ±10.4 V of signal plus common mode. A shunt near +24 V is out of range for both, so move the shunt to the low side.
When the loop supply is grounded somewhere else, such as a PLC cabinet, tying its negative to your DAQ ground creates a ground loop. Measure differentially across the shunt and leave the grounds separate, provided the common-mode voltage stays in range. If it doesn’t, use an isolated input or a loop isolator. Single-ended vs differential inputs covers common-mode limits in more depth.
Resolution and accuracy on a USB-1208FS-Plus
Take the MCC USB-1208FS-Plus on its ±10 V differential range, chosen so that 21 mA fault currents stay visible. One 12-bit step is 4.88 mV, which is 0.0195 mA or 0.18 psi on the 0–150 psi example. MCC specifies accuracy on that range as 0.2% of reading plus 9.766 mV of offset. At 3.1 V that is about ±16 mV, or ±0.6 psi. A 0.1% shunt adds about ±0.12 psi. If the transmitter itself is rated at 0.25% of span, that adds ±0.375 psi, and the worst case for the whole chain is about 1.1 psi, under 1% of span, which is fine for process monitoring. Calibration-grade work needs a more accurate input and a better transmitter. ADC resolution vs accuracy explains how to build this budget for any device.
Common mistakes
- A 1% or 5% resistor. A 1% shunt at 12.4 mA shifts the 0–150 psi reading by 1.16 psi.
- Wiring the DAQ input in series with the loop. A voltage input has very high impedance, so in series it effectively opens the loop. The shunt carries the current and the input measures across it.
- Scaling from 0 mA instead of 4 mA. An empty tank then reads 20% full.
- Grounding the loop at both the controller and the DAQ. The ground difference adds to the shunt voltage and often brings mains hum with it.
- A range that clips fault currents. A failed transmitter reads as a believable full scale.
- Checking compliance at 20 mA only. Fault currents above 21 mA need extra headroom.