4-20mA current loop revisited: a simpler calibration procedure

0

In today’s blog post I will revisit some aspects related to the 4-20mA current loop implemented with Arduino Uno boards, MikroElektronika Arduino Uno click shields and a pair of 4-20mA T and 4-20mA R click boards.

In my previous blog posts regarding the implementation of a 4-20mA bus with MikroElektronika click boards and Arduino Unos I have described a precise calibration procedure (code provided). However, it has come to my attention that the proposed calibration procedure is a bit hard to follow.

So, here there it is: a more straightforward, albeit less precise calibration procedure, that can be performed with just the ubiquitous tools you find in the average maker’s lab. As such, there are some changes and improvements:

  • One needs only one laptop to power one side of the 4-20mA bus and to perform serial debugging. The circuit on the other side of the 4bus needs to be powered on (battery or AC adapter);
  • he usual multimeter with 20mA and 200mA DC ranges will do;
  • One needs an extra potentiometer, connected as a voltage divider to pin A0 of the transmitter circuit.
  • Calibration is less precise but easier to perform.

Why Calibrate?

Some of my readers have used the contact form to ask me about the need to perform calibration.

The answer is simple: you don’t have just a current loop. You are building a 4-20mA current loop. There is a standard which sais that the minimum current through the loop is 4mA, and the maximum current that flows through the loop cannot exceed 20mA. Anything below 4mA can indicate a fault (open loop). Anything over 20mA also indicates a fault condition (short circuit).

In our particular case, the calibration procedure aims to find the DAC_4mA value that, when written into the DAC onboard the 4-20mA T click board, leads to a 4mA current flowing through the bus. We also will determine the DAC_20mA value that leads to a 20mA through the current loop,

A simplified calibration procedure

The test rig is simple. In the picture below the transmitter is powered from the laptop. The receiver is battery powered. A multimeter was put in series with the 4-20mA bus, and it was set to the 200mA DC range.

4-20mA current loop with MikroElektronika click boards

Just like in the first series of blog posts, the calibration of the 4-20mA bus is a two-step process. One has to calibrate the transmitter first, then the receiver.

4-20mA T calibration routine

I have simplified the calibration procedure by using a potentiometer connected to pin A0 of the transmitter board. My potentiometer is soldered on a proto board. I might just need it to debug other projects where analog input is needed. One can use wires to connect directly on the mikroBUS connector; it will work fine as well.

The voltage applied on the pin A0 will be read by the internal ADC of the Arduino Uno and will be used to drive the DAC. The value written into the DAC registers is also sent to the serial terminal.

4-20mA transmitter with Arduino Uno

To calibrate the bus, one has to load the code below into the transmitter side and start the serial monitor to watch the values written into the DAC. The receiver needs to be powered on, as it provides power to the 4-20mA bus.

Now, slowly turn the potentiometer knob while watching the current values on your multimeter. Try to find a position of the potentiometer knob that corresponds to a 4mA current through the bus – you may switch to the 20mA range for increased precision. Watch the serial monitor and write down the value it shows – it is the DAC_4mA calibration parameter.

You might not get exactly 4mA, as this calibration method is less precise. For maker/hobby/student projects it might be enough to choose the closest value to 4mA.

Now, switch back to the 200mA range, and play with the potentiometer knob until you get 20mA through the bus. Again, watch the output of the serial monitor. Write down the value – it is the DAC_20mA calibration parameter.

Calibrated transmitter code

Take the above values for DAC_4mA and DAC_20mA. Update the code below with those values and upload the code to the transmitter.

Now, with the potentiometer button turned at one end you should have 40mA through the bus. With the potentiometer button turned at the opposite end you should be able to measure 20mA through the bus.

Now as the transmitter is calibrated, we can further proceed to calibrate the receiver.

1 2
Share.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.