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 outputSensor 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.

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

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

How Metal Fabrication is Powering the EV Revolution

Image: Pexels The electric vehicle (EV) market is accelerating at an unprecedented pace, driven by…

1 week ago

Basic Features of Numerical Control

Numerical control is a form of digital control that is employed on machine tools such…

1 week ago

Benefits of Installing Solar Panels in Your Home

Photo: Pexels Benefits of Installing Solar Panels in Your Home: Save Money and Your Planet…

3 weeks ago

How to Size a Control Valve

Pneumatic control valve Control valve sizing refers to the procedure determining the correct size of…

3 weeks ago

Process Control System Design for a Distillation Unit

The aim of a typical control system is to force a given set of process…

3 weeks ago

Limit Switches vs. Proximity Sensors

An object can be used to activate a switch directly, producing an ON or OFF…

3 weeks ago