PNP Digital Inputs on industrial PLC

Using PNP inputs with industrial controller Arduino
February 25, 2020 by
PNP Digital Inputs on industrial PLC
Andrei Postolache

Introduction

In this post, we are going to explain how PNP sensors work. PNP  concept is something that we can frequently find everywhere in the industrial environment, for example when we have to select a three-wire detector or photocell and especially when we design schematics and wiring.

All the inputs of the PLC controllers from Industrial Shields are based on PNP connection.

Technical details

The PNP sensors are based on injunctions transistors which are electronic devices switching and amplifying electrical currents.

A PNP transistor controls the main current flow altering the number of holes instead of the number of electrons in the base. The low cost, reliability and small size of transistors have made them one of the greatest inventions of the 20th century.

Basically, we need to know that the input that arrives in our Arduino based PLC is positive(+).

                   Input positive(+) - PNP Digital Inputs on industrial PLC

Main differences between PNP and NPN

Firstly, we should keep in mind that one of the main differences is in the design of the internal circuit and the type of transistor that the sensors have.

PNP and NPN - PNP Digital Inputs on industrial PLC             

As we can see in the sketches above, the main difference between both systems both is that PNP provides to the industrial Arduino based PLC a positive input meanwhile NPN provides a negative one.

Moreover, PNP is more common in Europe while NPN is used in Asia. Due to this fact, PNP sensors are easier to find in Europe because there is more stock.

Some devices using PNP connections


 


 



Inductive sensor             Capacitive sensor                   Photocell sensor   

Example of programming with Arduino IDE
PLC Arduino for industrial automation used: ARDBOX-ANALOG

 

On this simple example, we are printing on the Serial Monitor when a photocell digital sensor is detecting any movement.

void setup() {
  Serial.begin(9600);
}
void loop() {
  bool state = digitalRead(I0.0);
  //send message to port series in function of the readed value
  if (state == HIGH)
{
 Serial.println("Detection");
 //here will execute the actions
}
delay(1000);
}

​Search in our Blog

PNP Digital Inputs on industrial PLC
Andrei Postolache February 25, 2020

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC comparison >>>