Mechatronics, Industrial Control & Instrumentation

How to Connect Discrete Sensors to PLC Inputs

Discrete Sensor Outputs  

Basically sensor outputs can be categorized into two types: discrete also referred to discrete or logic and proportional also called analog. Discrete sensors supply a single logical output (1 or 0) e.g. a flow switch used to detect the fluid flow through a pipe whereas proportional/analog sensors provide an analog electronic signal i.e. a voltage, current or resistance whose magnitude represents some measurement or control quantity or a digital word containing a discrete value, an example of a proportional sensor is a flow sensor used to measure the volumetric flow rate of a liquid in a pipe. The output from this sensor is fed to analog inputs of the PLC.

Examples of discrete sensors include:

There are two types of discrete sensor outputs: NPN or sinking outputs and the PNP or sourcing output. The NPN or sinking output has an output circuit that works in the same way as a TTL open collector output. It can be considered as an NPN bipolar transistor with a grounded emitter and an uncommitted collector as illustrated in the figure below:

Sensor with NPN output
Figure 1.0 Sensor with NPN output

In real application, this output circuit could be composed of an actual NPN transistor, a FET, an opto-isolator or a relay or switch contact. In either way, the operation presents either an open circuit or a grounded line for its two output logical signals.

The PNP or sourcing output has an output logic levels that switch between the sensor’s power supply voltage and an open circuit as demonstrated in the figure below:

Figure 1.1 Sensor with PNP output

The PNP output transistor has the emitter connected to VCC and the collector uncommitted. When the output is connected to a grounded load, the transistor will cause the load voltage to be either zero (when the transistor is OFF) or approximately VCC (when the transistor is ON).

How to Connect Discrete Sensors to PLC Inputs

Because discrete PLC inputs can be either sourcing or sinking, knowing how to select the sensor output type that will properly interface with the PLC input and how to wire the PLC input so as to interface to the sensor perfectly is of the essence. Typically, sensors with sourcing (PNP) outputs are connected to sinking PLC inputs whereas sensors with sinking (NPN) outputs are connected to the sourcing PLC inputs. If you were to connect sourcing sensor outputs to sourcing PLC inputs, or sinking sensor outputs to sinking PLC inputs, it will result in unpredictable illogical operation, and the system may not work at all.

Figure 1.2: Sourcing sensor output connected to a sinking PLC input

In a similar way, we can also connect a sinking (NPN) sensor output to the same PLC input but the PLC must be rewired as a sourcing input. This is achieved by disconnecting the common terminal of the PLC input from the negative side of VCC and instead connecting it to the positive side of VCC as shown in the figure below:

Figure 1.3: Sinking sensor output connected to a sourcing PLC input

This connection structure converts all the PLC inputs to sourcing, i.e. so as to switch the PLC input ON, current must be drawn out of the input terminal. In operation, when the NPN transistor in the sensor is OFF, no current flows between the sensor and the PLC. But, when the NPN transistor switches ON, current will flow from the positive side of the VCC supply, into the common terminal of the PLC, up through the op-isolator, out of the PLC input terminal INP0 and through the NPN transistor to the ground. This switches the PLC input ON. Alternatively, you may also operate the PLC inputs and the sensor from separate power supplies; this will work as long as the negative terminals of both power supplies are connected together.

John Mulindi

John Mulindi is an Industrial Instrumentation and Control Professional with a wide range of experience in electrical and electronics, process measurement, control systems and automation. In free time he spends time reading, taking adventure walks and watching football.

Recent Posts

Standard Process Signals for Industrial Instrumentation

Industrial measurement and control processes employ standard process signals that are used throughout all the…

5 days ago

Top 5 Benefits of Combining CCTV Cameras with Biometric Systems

The integration of advanced technologies in security systems has become imperative for ensuring safety and…

6 days ago

Sources of Power Quality Problems

Power quality may be affected by a number of issues. Our discussion in this article…

1 week ago

Common Terms Used When Describing Power Quality Problems

Power quality has become an important issue to electricity consumers at all levels of consumption.…

1 week ago

What to Expect from PCB Assembly Services in China

The importance of printed circuit board (PCB) technology has escalated throughout the years with the…

2 weeks ago

Magneto-Optic Current Sensors for High Voltage, High Power Transmission Lines

One of the key challenges in measuring the electrical current in high voltage, high power…

2 weeks ago