Home :: News archive

News Archive

Current Loop Signalling

Early on in the history of Ocean Controls we were focused on CNC gear and industrial control equipment. In the last couple of years we've seen huge growth in hobbyist electronics based around the Arduino Controllers and prototyping work.

We like to think we provide useful service to people across the range from raw beginners to grizzled, professional engineers. In the interest of making a few amatures a little less bewildered, I wanted to explain a common signalling technique in industry that we feature an a large range of our sensors: 4 to 20 mA current loop signalling.

Current loop signalling is a way to get an analog value from a sensor to your controller. It's a little more complicated than using an analog voltage input (like the ones on an Arduino) but confers a few advantages that make it more robust. It's robustness is why it's been so enduring in industry.

First, let's look at a typical analog voltage example with an Arduino. In this standard example, a potentiometer is wired as a voltage divider to an analog input.

The Arduino reads the input by measuring the voltage at the input pin. The voltage is represented internally as an integer between 0 and 1023, where 1023 indicates 5V is preset at the input.

The reality is a little more subtle than that, though. The ATMega328 at the heart of the Arduino is presenting a value from 0 to 1023 where 1023 is the ADC reference voltage. By default in Arduino, this reference selected is the supply voltage to the AVR. This is specified as 5V, but the regulator used on the Uno is only specified to be accurate to ±2%. If you fed a precise 2.5V into an Arduino input pin, you'd expect analogRead() to return 512. Instead, you could see a value from 502 to about 522.

In the case of our potentiometer, we are taking the 5V from the Arduino. This cancels out the problem of a low-precision reference. If the 5V regulator output is high, the ADC reference will be high but the output of the potentiometer will also be high and the effects cancel out. You only get this advantage with ratiometric sensors. If you're trying to measure a voltage off a temperature sensor like the LM35 you'd have to provide an accurate 5V supply or use an external ADC reference on the Arduino's AREF pin.

In a real-world example, we may have the Arduino in an enclosure with some terminal strip and a connector. Our sensor could be a long distance from the Arduino. The problem is that each connector and length of wire has a non-zero resistance. Cat-5e cable has a resistance of about 0.188Ω/m. With 100 metres of cable, a few loose connections or corroded sections of cable the total resistance starts to add up.

Any resistance on the 5V and GND wires causes a voltage drop so our potentiometer isn't getting the same 5V the Arduino is using as a reference. The more current your sensor needs, the more voltage drop there is across the wires. Some sensors draw varying current as they work, which would mean your output is potentially going to be fluctuating even as the physical property being measured is constant.

The resistance, reducing the accuracy of our measurement. CAT-5 resistance: 188 mΩ/m RJ-45 Jack: 100 MΩ Live Zero Loop Powered

To be continued.....

Stay tuned for more updates by subscribing to our News RSS and our New Products RSS using your favourite RSS reader.