I’m building a data logger using an Arduino and a few industrial sensors that output 4–20 mA current signals.
Since the Arduino reads voltage on its analog pins, I plan to use resistors to convert the 4–20 mA current into a measurable voltage (0–5V range). Before I proceed, I’d appreciate some guidance:
-
What resistor value is commonly used to convert 4–20 mA into a voltage safely readable by the Arduino ADC?
-
Can I connect multiple sensors directly to separate analog pins using individual resistors?
-
Do I need to worry about electrical isolation, common ground issues, or signal interference?
-
Are there any recommended protection or filtering techniques for accurate readings?
If anyone has a proven approach, example circuit, or tips for reading multiple 4–20 mA signals reliably with Arduino, I’d love to hear them.
Using a 4–20 mA sensor with an Arduino is straightforward once you understand the basic principle: Arduino analog pins measure voltage, but 4–20 mA sensors output current. To read that current with Arduino, we simply need to convert it into voltage using a resistor—commonly called a voltage drop resistor. The most widely used value is 250 Ω, because it maps the 4–20 mA current range to exactly 1–5 V, which fits perfectly within the Arduino's 0–5 V analog input range. This way, 4 mA gives a 1 V drop, and 20 mA gives a 5 V drop across the resistor.
The sensor typically has two wires: one connects to the +24 V power supply, and the other connects to one side of the 250 Ω resistor. The other side of that resistor goes to GND, which must be shared with the Arduino. To measure the voltage, the analog pin is connected to the node between the sensor and the resistor—that’s where the voltage drop occurs, which reflects the current being sent. So the Arduino’s ADC (analog-to-digital converter) reads a voltage between 1 and 5 volts, and you can map this to physical units like temperature, pressure, or flow, depending on the sensor.
If you're using multiple sensors, each sensor should have its own 250 Ω resistor, and each resistor's top side (the side facing the sensor) can be wired to a different analog pin. All resistors should share a common ground, but be cautious: if your sensors are loop-powered from different power supplies or located far apart, ground loop issues or interference can arise. In such cases, using opto-isolators or 4–20 mA receiver modules with built-in isolation is highly recommended to prevent damage and ensure accurate readings.
To improve accuracy and protect the analog input:
Add a 0.1 µF ceramic capacitor across the analog pin and GND to form a low-pass filter that reduces high-frequency noise.
For safety, especially in industrial environments, consider placing a TVS diode or a 5.1 V zener diode across the analog input to protect against voltage spikes.
Use precision 1% resistors for reliable conversion and better sensor resolution.
In software, use analogRead() to read the voltage, which returns values from 0 to 1023. You can then convert this raw ADC value into current using:
float voltage = analogRead(A0) * (5.0 / 1023.0); float current_mA = voltage / 250.0 * 1000; // Convert volts to milliamps
One of the major advantages of 4–20 mA loops is that they are highly noise-resistant, reliable over long cable distances, and self-monitoring—since anything below 4 mA can be treated as a fault or disconnected wire. They’re ideal for harsh industrial environments or situations where precision and robustness are critical.