Arduino 4-20mAmp Current Loop Measurement

For industrial process control instruments, analog 4–20mA current loops are commonly used for analog signaling, with 4mA representing the lowest end of the range and 20mA the highest. The key advantages of the current loop are that the accuracy of the signal is not affected by voltage drop in the interconnecting wiring, and that the loop can supply operating power to the device. Even if there is significant electrical resistance in the line, the current loop transmitter will maintain the proper current, up to its maximum voltage capability.

Many sensors are available with 4-20m Amp current loop output such as pressure sensor, level sensors, position sensors etc.

To measure 4 to 20mAmp current loop we are using 250 Ohm resistor, voltage drop across this resistor at 20mAmp is 5V. As zero reading of transducer is 4mAmp we get 1V offset. If voltage goes below 1V then it means that there is fault in sensor circuit that can be detected.

Here we are showing transducer reading in 0 to 100%. It can be calibrated to show the sensor value such as level, pressure etc.

Arduino Circuit Diagram of 4-20m Amp Current loop measurement

4-20mAmp Current loop measurement arduino circuit
4-20mAmp Current loop measurement arduino circuit

Arduino code for 4-20m Amp Current loop measurement

/*
    Reads voltage across 250 Ohm Resistor which is in series with 4-20mAmp Sensor
    www.circuits4you.com
*/
const int sensorPin=A0;

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  float sensorValue = analogRead(sensorPin);
  float Result;
  
  Result = ((sensorValue-204.0)*100.0)/(1024.0-204.0);  //204 is offset, 4mAmp is 0
  // print out the value you read:
  if(Result>0)
  {
    Serial.print("Sensor Output:");
    Serial.print(Result); 
    Serial.println(" %");
  }
  else
  {
    Serial.println("Sensor Error");	  //Show error if value is less than 4mAmp
  }
    delay(200);        // delay in between reads for stability    
}

Result of 4-20mAmp Current loop measurement

Upload the code in board and open serial monitor. If sensor is not connected it will show “Error”.

4-20mA Result
4-20mA Result

One thought on “Arduino 4-20mAmp Current Loop Measurement

Leave a Reply to Gunasekaran Cancel reply