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:

Sensor with PNP output
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.

Sourcing sensor output connected to a sinking PLC input
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:

Don’t miss out on key updates, join our newsletter  List

Sinking sensor output connected to a sourcing PLC input
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.

Please follow us & share:

Author: John Mulindi

John Mulindi is an Industrial Instrumentation & Control Professional with a wide range of experience in electrical and electronics, process measurement, control systems and automation. He writes on technical as well as business related topics. In free time he spends time reading, taking adventure walks and watching football.

Leave a Reply