This FAQ explains NPN and PNP transistors and what it means for sensors and IO module inputs.
NPN stands for Negative, Positive, Negative. Also known as sinking. On an IO Module, an NPN input, when undriven is pulled down to be in a low state, GND ( or reference voltage level e.g. V-).
PNP stands for Positive, Negative, Positive. Also known as sourcing. On an IO Module, a PNP input, when undriven is pulled up to a high state e.g. +5V.
NPN or PNP typicaly relates to digital signals. Sensors are an example of devices that can be either NPN or PNP. To connect to a sensor you will need to be able to match the type of signal the device uses.
In a NPN transistor, current flows from the emitter to the collector. The transmitter is powered on when sufficient current is supplied to the base of the transistor. The higher the current the more an NPN transistor will be powered on.
A PNP transistor is the opposite, current flows from the collector to the emitter. The transmitter is powered on when there is no current at the base of the transistor.
Our ED range can be set to accept either NPN or PNP signals on each input. To set these inputs there are a series of jumpers on the board. These are also shown in the ED manual.
How to open the case and how to locate the jumpers
- Yellow case: Open the ED case using a small flat head screw driver pushed into the sides of the product which connect the yellow lid to the lower case. Slide the PCB out and find the jumpers with PNP and NPN next to it.
- Grey case: Open the ED case using a small flat head screw driver pushed into the sides of the case which connects the lid to the case base and find the jumper with PNP and NPN next to it.
Whether to use NPN or PNP depends on which direction you want the current to flow.
A NPN sensor sinks current to drive the ED input to 0V.
A PNP sensor sources current to drive the ED input to a positive voltage.
An example of an NPN and PNP sensor is shown below:
A NPN Sensor
NPN Proximity Sensor Output is normally HIGH when nothing is near it
NPN Proximity Sensor Output goes LOW when metal object is near it
A PNP Sensor
PNP Proximity Sensor Output is normally LOW when nothing is near it
PNP Proximity Sensor Output goes HIGH when metal object is near it