Technical Article

Sensor Installation for Control and Automation Systems

March 19, 2020 by David Peterson

Whether it’s a critical machine repair or the installation of a brand new piece of equipment, it’s important to have the knowledge and skill to properly connect sensors to a control system.

In most cases, an improperly connected device will cause either the system to respond incorrectly, or the sensor to break - both situations can be avoided with a some application knowledge.

In order to properly integrate a new sensor into a machine, there are a few things to consider. You must think about these details regardless of whether this is a new installation or the repair of an older machine.

It would be great to think that a datasheet and ordering information will always be readily available for every sensor in every machine. As we all know, proper documentation is about as rare as a meeting that gets done early.

As long as the correct sensor has been designed and ordered for a control system, the step of installing that sensor isn't too complex.

In this article, we’ll look at the three main challenges that face a technician installing a sensor - physically mounting the sensor into the machine, making the appropriate connections using the wiring diagram, and programming the correct instructions into the control device as required.

 

Physical Sensor Mounting Techniques

Two dominating strategies exist for attaching sensors to machines, which is why almost every sensor resembles other kinds, even if they work on entirely different operating principles.

Some units mount alongside an existing panel or surface, usually by putting screws through a set of pre-drilled holes through the side or front of a blocky, square-edged sensor. The benefit of this method is that it can be attached nearly anywhere - even attached into a wood or plastic block which can then, in turn, be mounted to the machine.

It’s not always clean and elegant, but not every application has the luxury of attaching to a clean, slick t-slot aluminum bar. However, in some other cases, we can rely on those nice, clean looking mounting brackets. 

This is especially common when many sensors are to be placed in a line down the side of the machine. The t-slot aluminum extrusion is a common mounting point because slight position adjustments are easy.

 

sensor with an 18mm threaded face

A typical sensor with an 18mm threaded face and nut for installation on a bracket. This image also illustrates the Mini Quick-Disconnect sensor and cable for easy replacement.

 

This type of sensor that mounts to brackets usually comes in a long barrel shape, or has a round externally threaded face protruding from the front. 

Three common sizes of brackets are used across the industry - small 12mm, medium 18mm, and some larger 30mm sizes. 

There is a small selection available smaller than this, but these three main sizes the normal. Metal and plastic brackets can be purchased from many suppliers that easily adapt the circular sensor to the mounting surface.

 

Sensor Wiring Diagrams

Most typical sensors will give easy access to a wiring diagram. Sometimes so readily that it is printed right on the side of the sensor. Other times, a quick search for a datasheet will find the desired diagram quickly.

For some older machines, the diagram might be more difficult, so hopefully, someone recorded some sort of documentation during the time of construction. It is important to keep that in mind that more documentation is always a safe bet.

For the common digital on/off type sensors, there will usually be as few as two, and as many as five wires used for various functions. 

 

the end of a wire harness for a 2-wire sensor

The end of a wire harness for a 2-wire sensor. Although this is an AC powered inductive proximity sensor, a DC sensor may often have the exact same brown and blue wires.

 

2-Wire Sensors

These sensors will be used for in-line sensors that either close or open a circuit when energized. The most common wire colors to be seen are Brn/Blu and Red/Blk depending on the origin of the sensor. 

Sometimes, these wires will stick out the end of the exposed wire harness, but other times, a mini- or pico-style Quick-Disconnect (QD) cable will be required. If this is the case, you can count on seeing the Brn/Blu structure. This will be the case for either AC or DC sensors, so be very careful to read the datasheet. I witnessed a DC sensor explode once after someone connected 120 vAC to the wires and applied power. 

Those AC sensors are neither ‘sourcing or sinking’ as current travels both directions, but for DC, a sinking sensor will have the load device on the brown positive wire, and a sourcing sensor will have the load device on the blue negative wire.

 

3-Wire DC Sensors

The previous convention still holds true. There may still be exposed wires at the end of the harness or a required QD cable adapter. The Brn wire most often connects to positive +vDC, and the Blu wire to negative -vDC. However, I have seen some cases of NPN sensors reversing this notation, so as always check before assuming! 

The load device is not connected to either + or - in these cases. The load will be on one of the remaining wires, Blk or Wht. The difference usually occurs in how the sensor is to be used. If the device has only 3 wires, it is a single polarity (such as PNP) and the black wire will be the load wire going to the PLC, or other I/O module.

 

4-Wire Sensors

These sensors follow one of several normal conventions, so it can be a bit trickier. Usually, this will consist of both the Blk and Wht wires serving a purpose. 

If it is a single polarity, the Blk and Wht will be a Normally Open and Normally Closed pair, in some order. 

However, occasionally the Wht wire is an additional function that allows range limits to be ‘Taught’ to the sensor, so it will be called ‘Teach’. If the sensor is a dual-polarity or complimentary sensor, the Blk wire may be the PNP output and the Wht providing the NPN output.

 

the connection end of a wire

The connection end of a Quick-Disconnect (QD) cable. This cable has been used in a past life with Brn+, Blu-, and the Wht used for the signal to the controller.

 

Normal 5-Wired

If the cable uses all 5 wires of the normal 5-wire QD cable, the Grn/Ylw striped wire is most often tied to an Earth grounded part of the circuit. This may often be employed to reduce EMI noise, although it is common for the sensor to include no such wire.

Some sensors, particularly for safety applications with redundant outputs, the number of wires may exceed the number shown in these strategies, and as always, consult the documentation before installing or replacing.

 

Sensor Integration with a PLC

Fortunately for the programmer, all of the prior complex wiring situations really don’t affect how the sensor influences operation. There are only a couple of simple details to keep in mind. Because of the digital nature of the sensors, they either close the circuit, or open the circuit. When a physical circuit is closed, current flows and the circuit is described as being ‘true’. An open circuit, with no current flowing, is called ‘false’.

The programmer uses this information about the real-world sensor, and determines which of two input instructions is appropriate. This takes place regardless of the brand or model of PLC and software.

The Normally Open, or XIC instruction will be ‘true’ whenever current is flowing in the real-world circuit. If you have installed a Normally Open sensor, this instruction will be ‘true’ when the sensor is energized. A Normally Closed sensor allows current to flow, and is, therefore ‘true’ when it is non-energized.

The Normally Closed, or XIO instruction is the exact opposite. This instruction will be ‘true’ any time current is not flowing in the real-world circuit. For that Normally Open sensor, this instruction will be ‘true’ when non-energized, since that’s when current is not flowing. For the Normally Closed sensor, it will be ‘true’ when energized.

 

A fairly standard representation of contact symbols used to represent Normally Open and Normally Closed, or more formally XIC and XIO inputs.

 

A programmer must be able to match the symbol with the appropriate real-world device.

Sensor installation requires careful attention to the proper hardware setup that will provide stability and security, yet flexibility for adjustment when required. The wiring scheme of most sensors, although similar in many cases, can adopt an array of variations, so it’s important to match your assumptions against printed schematics.

Finally, the PLC programmer must understand the differences between using Normally Open and Normally Closed sensors, even though the issue of PNP/NPN polarity does not affect programming, only wiring.