Our offices will be closed Saturday December 23rd through January 1st for the Holidays. Dismiss

Isolated 4-20mA current loop transmitter

Interfacing Isolated 4-20mA Current Loop Transmitter Arduino

In our last post we interfaced 4-20mA current loop receiver with the arduino, in this article we will learn how you can interface isolated 4-20mA current loop transmitter board with arduino. 4-20mA transmitter devices are used to provide 4-20mA signal which can be used to control pumps, valves, switches and transducers. For example lets say you want to want to control a sprinkler which works on 4-20mA current loop signal, in that case you will need a 4-20mA current loop transmitter board. To control such a sprinkler you will change the current output using arduino and this current output will control the sprinkler.

The 4-20mA current loop is also known as 2 wire protocol, in such setups there are two wires which control the device as well as provide the power using same two wires. The sensor or device values are changed by varying the current value.

Hardware

  1. Arduino
  2. Arduino I2C shield 
  3. 4-20mA current Loop Transmitter

This isolated 4-20mA current loop transmitter has a 12 bit DAC which provides high resolution 4-20mA output. On the one channel 4-20mA transmitter the DAC is MCP4725. In this post we will be using this one and the 4 channel will work in same way. This one channel isolated 4-20mA current loop transmitter board has 1kV power isolation and also has i2c communication isolation( 2500Vrms). The board works on i2c communication and it has 1 address bit. By chaining the address bit its possible to connect two 4-20mA current loop transmitter boards together.

It is real simple to interface these isolated 4-20mA current loop receiver boards with arduino, raspberry pi, usb or any other computer, You can follow the exact same steps and can make it work with any of the platforms. To connect the arduino with 4-20mA current loop transmitter board all you will need to do is insert the arduino module into the arduino i2c shield and use an i2c cable to connect these two boards together.

The isolated 4-20mA current loop transmitter board has a 2 connection screw terminal which provides 4-20mA output, over here you can connect the device or sensor you want control. You will also need a power supply to power up the device. Once you have all this setup, we can start working on the code.

The Arduino code can be found here

#include <Wire.h>
void setup()
{
  Serial.begin (9600);
  Wire.begin();
 
}
void loop()
{
/// at DAC vlaue 290 the current output will be around 4mA and 
///at DAC vlaue 1500 the current output will be around 20mA 
/// you can change these values to tune the 4-20mA output
 for (int i=290; i <= 1500; i++)
  {
  Wire.beginTransmission(0x60 );
  Wire.write(64); 
 // Wire.write(64); 
  Wire.write(i >> 4);        // 8 MSB
  Wire.write((i & 15) << 4); //4 LSB
  delay(100);
  Serial.print("4-20mA current trnasmitter output ");
  Serial.println(i*0.013);
  Serial.print("n");
  Wire.endTransmission();
  }
}

This is real simple example code, in this code we are changing the DAC values and the current loop output will change accordingly. You can tune these values according to your application requirements.

 

Isolated 4-20mA current Loop transmitter

ControlAnything.com and ControlEverything Site Migration Notes

©2017 National Control Devices, LLC

ncd.io

To learn something new, take the path that you took yesterday. ~John Burroughs

Log in with your credentials

or    

Forgot your details?

Create Account