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


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.

This concept could be a little confusing, especially at the beginning of one's career. But at lenght, when users think about these words, their mind already visualizes the concept corresponding to this kind of sensors.


Technical details

The PNP sensors are based in junctions transistors wich 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 has 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(+).

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.


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                                                       Photocell sensor                                                                     Capacitive 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() {
void loop() {
bool state = digitalRead(I0.0);
//send message to port series in function of the readed value
if (state == HIGH)
//here will execute the actions
PNP Digital Inputs on industrial PLC
Andrei Postolache
25 February, 2020
Share this post

Looking for your ideal PLC?

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

Do you want more information?

Just fill the form!

Tell me more!