Sei sulla pagina 1di 14

eHANDBOOK

How to
decide between
PNP & NPN
inputs
www.controldesign.com

How to decide between


PNP and NPN inputs
OEMs on different continents tend to lean toward their own preferences for
sourcing and sinking

By Mike Bacidore, editor in chief

A Control Design reader writes: My question arises due to machines we received at our
manufacturing plant in Arizona from an OEM in Asia. All of the PLC 24 Vdc digital input
modules were NPN (sourcing 24 V dc) and our plant’s standard is PNP inputs (sinking 24
Vdc inputs). These signal levels (sourcing input module with sinking sensor vs. sinking input
with sourcing sensor) seem like they will double the number of input modules and sensor
spare parts we stock. We need to make some decisions on NPN vs. PNP transistors.

I’ve been asked to clearly document the electrical standards related to NPN vs. PNP and
other I/O signal levels, in a machine standard. The question is what signal level sensors and
I/O modules should I standardize on—NPN or PNP—in our U.S. plant, and why do the signal
levels seem to be different (negative vs. positive type) on the equipment from Asia? Also,
do I have the terminology correct, such as a sourcing sensor connects to a sinking input is a
PNP configuration?

In the standards, I also wanted to document when to use a pull-up resistor. Is that a way to
convert an NPN to a PNP signal level, or am I confusing that with an open collector input?
Or is a better solution to install an opto-isolator or just replace the I/O module and sensors?
Finally, are there other signal voltage levels I should document such as 5 Vdc and 120 Vac
that would have NPN vs. PNP or other signal level issues?

eHANDBOOK: PNP and NPN 2


www.controldesign.com

ANSWERS into your equipment instead of a logic 1,


right? We made a custom panel meter for
WIRED TO ACCOMMODATE a customer with similar logic problem us-
To our knowledge there is no standard that ing the CD 4050 buffer with pull-ups and
dictates when NPN (sinking) or PNP (sourc- blocking diodes to convert the 24 V logic
ing) type sensors or digital inputs are used and level to standard TTL (5V).
in a control system. It is really dependent
on each OEM’s internal standard or type of A pull-up resistor only won’t convert + to –
control system used. logic. A pull-up is used for PNP and a pull-
down used with NPN to develop a voltage
Our practice at JST is to use PNP (sourc- across it for logic 1(no current = logic 0,
ing) type sensors and digital input cards. In current flowing = logic 1). An opto-isolator
our experience PNP type sensors are more for each output might be expensive since
available. When we encounter a sensor or all PLCs that I know use 24 Vdc. You might
component that is only available as an NPN consider a 24 V logic IC inverter or plain NPN
type, we will provide an NPN type of input transistors to invert the logic. This would re-
card instead of putting an intermediate type quire a custom printed circuit board, unless
of optical amplifier to convert the signal. you can get it from other PLC makers.
Most of the PLC cards we use can be wired ­— Otto Fest, president, Otek, www.otekcorp.com

to accommodate both PNP or NPN and do


not require hardware changes. 2 CHEERS FOR PNP
­— Ryan Zrno, engineering manager, JST Manufacturing, Weiler Labeling Systems has standardized
www.jstmfg.com, Boise, Idaho on PNP inputs wherever possible for two
reasons.
PULL-UP, PULL-DOWN
If you cannot change the NPN to PNP— • In an NPN circuit, if a wire breaks and con-
NPN sources current into a load to produce tacts ground, the PLC input is true. This can
a logic 1 (inverts the logic), and PNP sinks potentially result in undesirable machine
the current to produce a logic 0 (doesn’t behavior (for example, start push button
invert the logic)—and I would assume the input turning on). When a wire in a PNP cir-
collectors of all output transistors are com- cuit shorts to ground, the PLC input is false.
mon to +24 V supply and you have open
emitters, and if you cannot change via pro- • Troubleshooting an electrical problem is
gramming configuration the logic output less confusing with PNP wiring because
of all xtrs or the input logic of your device, when a meter reads 24 Vdc it is clear that
the end result is that you need a logic 0 an input should be true.

eHANDBOOK: PNP and NPN 3


www.controldesign.com

I do not know why some countries tend MITIGATE THE IMPACT


to prefer NPN. I am not aware of any NPN Like most competing standards, the techni-
benefit and there are at least two good cal, cultural and historical details behind the
reasons to use PNP. NPN vs. PNP debate are complicated, bor-
ing and arcane. Suffice it to say that in the
“Sourcing sensor to sinking input” is typical United States and Europe, PNP sensor and
industry terminology. input modules are the standard, while the
NPN varieties still enjoy some preference in
Pull-up and pull-down resistors are used Asia. Your concern about the cost of holding
to prevent a floating input from inad- additional spares is valid, but there are two
vertently changing an input state. I have points that might help to mitigate the impact
never observed the need to install a resis- that it will have on your organization.
tor on a modern PLC. I am not aware of
any technique to convert NPN/PNP with a 1. Many input modules (especially the IP20
resistor. Solid-state or mechanical relays versions that are most commonly installed
are a clean and typical method to convert in cabinets) can be wired either NPN or
between the polarities. PNP. Unfortunately, all of the inputs on
that module need to be either NPN or
NPN/PNP applies to all typical dc sensor PNP. You can’t mix and match them.
voltages, but the vast majority of digital
industrial sensors operate at 24Vdc. 2. Just as you’re concerned about carrying
­— Dana Breese, engineering manager, Weiler Labeling additional inventory, so are the sensor
Systems, www.weilerls.com, Moorestown, New Jersey manufactures. New sensors are com-
ing into the market that can be wired or
GO PNP configured as either NPN or PNP. Putting
As a full-line sensor manufacturer, we would these sensors on your shelf will allow you
suggest continuing to stock only PNP sen- to keep one spare for both types of con-
sors. When interfacing PNP sensors to NPN trol circuits.
controllers, we suggest stocking in-line
PNP-to-NPN signal converters for use in The use of pull-up resistors in the industrial
these applications. This will eliminate the automation space is pretty rare. Most PLCs
need to purchase NPN sensors, simplifying and other industrially hardened I/O equip-
inventory management. ment have this feature included onboard.
­— Shawn Day, marketing manager for object detection Pull-up resistors are general only required in
sensors, Balluff, www.balluff.com the rare occasion where we see a company
using a device like an Arduino or Raspberry

eHANDBOOK: PNP and NPN 4


www.controldesign.com

PI for industrial control. The input pins on PNP SENSORS FOR THE U.S. PLANT
these devices can be configured for a vari- For the U.S. market, standardizing on PNP
ety of purposes, so, when used as an input, sensors would be the better option as they
the pull-up resistor provides a positive ref- are more popular and easier to find than
erence so that the pin doesn’t float. their NPN counterparts. PNP sensors are
­— Sean O’Grady, product manager—valve terminals & also easier to understand and troubleshoot
electronics, Festo, www.festo.com by technicians, since the sensor will give a
high-level voltage signal when the output
KNOW THE INPUT CIRCUITRY is active. However, it almost always comes
PNP sensors are current-sourcing devices, down to personal preference and which
and NPN sensors are current-sinking devic- sensors are easier for you to source.
es. A current-sourcing sensor must be con-
nected to a current-sinking input. Likewise, Historically, Asia standardized early on NPN
a current-sinking sensor must be connected sensors, while in Europe the more popular
to a current-sourcing input, so you must choice was always PNP for the sensors.
know the input circuitry of the device you
are connecting with the sensor. Many PLC Generally speaking, the sourcing sensor
input modules allow NPN or PNP sensors and sinking input terminology is correct.
to be connected. This is sometimes deter- However, some manufacturers will label
mined by what other type of devices are an input for the corresponding output
being connected to the PLC module. device, rather than the actual function of
the input itself. In the above example you
Normally open sensors do not pass power would use a PNP sensor to connect to a
to the PLC until an object is detected. Nor- PNP input, even though it is technically a
mally closed sensors always pass power to sinking (NPN) input.
the PLC until an object is detected.
Two-wire sensors allow either NPN or PNP An external pull-up resistor could be used
output. The user doesn’t have to select. to convert an NPN sensor to work with
Three-wire sensors are the most common. a sinking input. However, care must be
When ordering, the user must choose an taken, as this will invert the logic of the
NPN or PNP output. Four-wire sensors allow sensor. When the output of the NPN sensor
either NO or NC output; the user doesn’t is off, the sinking input will be pulled high.
have to select. But the user must choose Alternatively, a pull-down resistor can be
between NPN or PNP output when ordering used to convert from PNP to NPN.
­— Chip McDaniel, educational specialist, AutomationDi-

rect, www.automationdirect.com An opto-isolator will add cost and com-

eHANDBOOK: PNP and NPN 5


www.controldesign.com

plexity to the system, which makes it an connection is to +24 Vdc, the input card will
unlikely solution. be supplying (sourcing) current to the sen-
sor. If the common connection is to ground,
For dc sensors, in addition to NPN or PNP, the input card will be sinking current from
you might also come across two-wire sen- the sensor.
sors, which could be wired into a PNP or
NPN input in either configuration. However, For PLC ac input cards, there is no sinking
you should always consider the off-state or sourcing type. AC input cards provide
operational current of the sensor in those two connections for each input, as opposed
cases, as it can sometimes cause problems to one common connection and one input
depending on the voltage-level requirements connection as found on the dc input cards.
of the input. TTL-level sensors are also avail-
able, but these are far less common and In the event that one ends up with a sourcing
rarely used with off-the-shelf PLCs. input module and a souring output sensor or
­— Thomas Kolleck, sensor technology engineer, Turck, a sinking input module and a sinking output
www.turck.com sensor, it is possible to connect them. There
are modules and isolators available that have
SOURCING AND SINKING AND SO selectable inputs and outputs, meaning one
MUCH MORE module could be used to convert the sourc-
Let’s start with discussing the two types of ing-sourcing or sinking-sinking designs or
sensor output configuration: sourcing out- used to isolate the sensor output (sourcing
put and sinking output. A sourcing output or sinking) from the PLC input (again, either
sensor provides a voltage on the output sinking or sourcing). Another option would
pin and thus is able to source current to be to use a resistor. The resistor would acts
the input when the output is active. Sink- as the current sink for the sourcing-sourcing
ing output sensors provide a connection to application and as the current source for a
ground and thus are able to sink current to sinking-sinking application. Although more
the input when the output is active. cost-effective, the resistor method does im-
pose one drawback. It inverts the signal into
Sourcing and sinking outputs lead to sink- the PLC requiring program considerations
ing and sourcing inputs. A sourcing output during initial design or modification during
requires connection to a sinking input, and installation or operation.
a sinking output requires a connection to a
sourcing input. What makes an input sourc- The electronics term “open-collector” refers
ing or sinking is the common connection to to an output where the circuit contains an
all of the inputs on the card. If the common NPN transistor with its collector connected

eHANDBOOK: PNP and NPN 6


www.controldesign.com

directly to the output pin. With no internal trical standards that need to be checked
reference provided to the supply voltage, in each instance are the voltage, current
the output can only indicate the low state. and thus power. Generally these speci-
It cannot indicate the high state without an fications are more important for output
external connection to the supply voltage. devices. Power ratings are generally less
The connection can be made by either a of a concern for sensors.
resistor (commonly referred to as a pull-up
resistor when used in this method) or LED So, while it is possible for either transistor
or relay, providing the output can sink the type to be wired as either sinking or sourc-
current required to activate the device. ing, the following broad rule of thumb can
be used: Sourcing outputs will be PNP, and
There seems to be no “most common” type sinking outputs will be NPN. This assump-
of output or input. Sinking and sourcing are tion can usually be made if the machine or
used equally as often. The most common device has a common power supply.
type of sink is based on the PNP transistor
and the source based on an NPN transistor. What signal level sensors and I/O modules
However, there are sourcing NPN and sink- should I standardize on—NPN or PNP?
ing PNP available.
If you are going to be working with machines
The advantage of using a sinking input card from both Asia and the United States, you
is a wire break or short to ground will not will need to either stock both parts or stock
activate the input. When using a sourcing only one type but then resign yourself to
input card, there should be a fuse between complicate the wiring and software.
the input terminal and the sensor as the
voltage source will be present at the input That is to say, if you chose NPN as in the
terminal and a wire break that causes a machine from Asia as your standard, you
short to ground may damage the input card will need to convert the signal level for
or power supply. United States machines and either invert
­— Anthony Whitesell, senior project engineer, Superior the logic in the software or leave the soft-
Controls, www.superiorcontrols.com, Seabrook, New ware as is but invert the logic as you work
Hampshire on the system.

DOCUMENT ELECTRICAL In other words, it is a numbers game, and


STANDARDS you have to choose. Either double your
Both transistor types can be wired as ei- stock or take more time adding wiring to do
ther sinking or sourcing, so the only elec- the conversion; but convert you must.

eHANDBOOK: PNP and NPN 7


www.controldesign.com

Why are the signal levels on the machines match that input type. In other words, un-
from Asia different than machines made in less you have a special I/O module on the
Europe or the United States? PLC—and you will know if you do—you can-
not mix field sensor types.
Generally there is no agreement on why
equipment out of Asia is predominantly When do I use a pull-up resistor? To convert
wired as NPN, but one well-accepted a sinking field device with sinking I/O re-
theory is that back in the 1960s and ’70s quires the use of a pull-up resistor. To con-
NPN transistors were both higher power vert a sourcing field device to a sourcing I/O
and cheaper to make, so that’s what Asian requires the use of a pull-down resistor.
manufacturers used in their machines.
From then on, it was a case of ensuring In both cases you will need to carefully cal-
backward compatibility. Machines made 20 culate the value of the resistor to do the job
years ago, 10 years ago, or one year ago all it needs to. In the first case (sinking device
had NPN transistors in them, so that’s what and sinking I/O) you must find out if the load
machines made today have. is connected to the same voltage source as
the output module. If it is, the resistor must
It is said that Europe and the United States be low enough to pull the line up when the
tended to use PNP circuits because they are sinking output is turned off, but not so low of
easier to fault-find. A short circuit in a PNP a resistance as to damage the output when
circuit can be found by tracing current or it is switched on. Also note that this pull-up
by lifting wires. Since NPN circuits conduct resistor will invert the logic. A zero on the
the same current to ground under fault con- output will be a one on the input. You must
ditions as normal operating conditions, they either correct it in software or mentally make
are naturally harder to troubleshoot. the swap when working on the device.

Does a sourcing sensor connect to a sinking In the second case (sourcing device and
input? sourcing I/O), if the input and output are
driven from the same voltage source, then
Yes. It really is a case of opposites attract- the resistor must be sized so that the volt-
ing. If the field device is sourcing, then the age is pulled down when the output is on,
I/O input must be sinking. If the field device but not so low as to draw excessive current
is sinking, then the I/O input must be sourc- through the output.
ing. If your PLC has a single common for all
channels (either all positive or all ground), If the machine has separate rails, then the
then all the field devices must be wired to resistor must be large enough to load the

eHANDBOOK: PNP and NPN 8


www.controldesign.com

output and stop the line from floating when output stage is open for connections to the
it is turned off. next device, usually the load.

In all cases care must be taken to calculate Since the term “open collector” does not
the value of the resistor to ensure that the tell us the type of transistor (NPN or PNP),
power limits of both the output and the we need to refer to the wiring diagram to
resistor itself are appropriately rated. determine if the load should be wired be-
tween the open collector and the positive
Is a sourcing sensor connecting to a sinking rail, or the open collector and ground.
input a PNP configuration?
Is it better to install an opto-isolator or just
Since a PNP transistor can be wired as ei- replace the I/O module and sensors?
ther sinking or sourcing, there are no hard-
and-fast rules as to what should be named • An opto-isolator is a natural choice for
what. A major cause of confusion stems connecting like sensors to like inputs
from the tendency of electrical shops to (source sensors to source inputs or sink
view dc voltage in conventional terms, that sensors to sink inputs). If you have the
is to say, voltage flows from the positive space, this may well be the most elegant
terminal to the negative terminal. However, way to interface the two standards.
in electronics they tend to refer to actual
electron flow, which is from the negative to • Replacing the I/O is no doubt the cleanest,
positive terminals. most logical way, but it goes back to your
first concern, having to stock both types.
This difference may be based on culture, re-
gion or experience (age of the engineer), but • Replacing the sensors I suspect will be a
it can also vary from shop to shop or from far more expensive and labor-intensive
panel builder to draftsperson. You can try to approach than using the opto-isolator,
set and enforce a standard way to describe using the pull-up resistor or swapping the
the flow of electricity in your workplace. We I/O module.
wish you the best in that endeavor.
Are there other voltage levels that need the
What is an open collector input? NPN vs. PNP decision to be made, such as 5
Vdc and 120 Vac?
The collector is always on the output of a
transistor and never the input. This term Sinking and sourcing apply only to direct-
stems from the fact that the collector of the current (dc) circuits. The terms sinking and

eHANDBOOK: PNP and NPN 9


www.controldesign.com

sourcing are in reference to current flow however, I would double-check the wiring
between a positive terminal and a nega- diagram supplied with the part to be sure.
tive (or ground) terminal. Since there is no
reference like this in alternating-current (ac) The terms “sinking” and “sourcing” refer to
circuits, we do not have to take sinking and current flow with respect to the terminal
sourcing into consideration when dealing pin on the I/O card. A device is called sink-
with any ac control systems. ing if current flows into the terminal and is
called sourcing if current flows out of the
So, in short, yes, all dc circuits need sinking, terminal. The entire configuration will follow
sourcing and NPN vs. PNP consideration. the convention set by the output because
­— Ben Orchard, senior applications engineer, Opto 22, the output is the device that controls the
www.opto22.com flow of current through the circuit. Really,
the only device that is capable of sinking or
CONFIGURATION sourcing current in any circuit is the power
COMMUNICATIONS supply, and it always does both.
The question of sinking vs. sourcing and
NPN vs. PNP causes confusion throughout Let’s explore the different configurations
the controls industry. Often two engineers possible and how the various components
working on different parts of a system will can be arranged. There are three compo-
not communicate the chosen configuration. nents that need to be connected together,
These errors will inevitably be discovered; in the correct order, to make the circuit
the question is when and at what cost? To work. These are the power supply, the out-
answer your questions, let’s start by defin- put and the input.
ing the terms being used.
Since we are discussing dc circuits, the
The terms NPN and PNP are commonly used power supply will have positive and negative
as synonyms for sinking and sourcing re- connections, typically 24 Vdc and a 0 Vdc.
spectively. This is a reasonable assumption,
but strictly speaking they refer to different The output could be several different types
concepts. For our purposes, we will follow of devices: a switch, a relay contact or a
convention and assume NPN = sinking and sinking or sourcing transistor output. A
PNP = sourcing. In the question, you men- transistor output will be a sinking (NPN)
tioned your vendor called the inputs “NPN output that can only be used after the load
(sourcing 24 Vdc). I take this to mean that (the load being the input in this case) or it
the inputs source current and are intended will be a sourcing (PNP) output that can
to be connected to a sinking (NPN) output; only be used before the load.

eHANDBOOK: PNP and NPN 10


www.controldesign.com

All of the outputs on the I/O card will have at once. If you try to reverse the polarity of
negative terminals tied together inside of the power supply, the diode will not let cur-
the card and connected to a common pin. rent flow backward through the input, re-
This can only be connected to 0 V in the gardless of the state of the output. One way
case of a sinking (NPN) outputs or only to to solve this problem is to use two diodes
24 V in the case of a sourcing (PNP) out- for each input. These are placed in parallel
puts. Relays and switches are more flexible; facing opposite directions.
they can be wired to source or sink current.
With this configuration, if the power supply
The final piece of the puzzle is the input. is reversed, one of the diodes will continue
For this discussion, model the input as an to function. Indeed, many manufacturers
LED and current limiting resistor. supply bidirectional inputs that can func-
tion in either direction. Note that the power
This is a simplification of an optically isolated supply will be connected to all of the inputs
input. To turn the input on, you allow current sharing a common terminal. As a conse-
to flow through the diode so that it emits quence, the entire module can be used in
light. That light activates a photo transistor, sinking or sourcing configuration but can-
which in turn sets the input bit to true. With not have a mix on the same common.
this type of input circuit there really isn’t a
good reason why it can’t be connected di- To answer the question of which configura-
rectly to 24 Vdc on the power supply when tion to standardize on, I would suggest that
using a sinking (NPN) output or directly to you preserve the maximum amount of flex-
0 V on the power supply after the output ibility possible. There are good design rea-
when using a sourcing (PNP) output. As long sons to prefer a sourcing output with sinking
as sufficient current is flowing through the input in one situation and a sinking output
diode, it will turn the input on. and sourcing input in another situation. For
inputs specify bi-directional inputs. For out-
The problem is there are several inputs on puts, whenever possible, use relay contacts or
one I/O module and they all have one side sensors with a normally closed and normally
tied to a common terminal pin. A sourcing open contacts. That said, there are reasons
input will have the 24 Vdc connection made to use transistor outputs that may trump the
internally. And a sinking input will have the need for flexibility. Chief among these are
0 V connection made internally. speed, cost and space requirements.

If you put the switch (output) on the com- Finally, what can be done if you need to
mon pin you would switch all of the inputs connect a sinking output to a sinking only

eHANDBOOK: PNP and NPN 11


www.controldesign.com

input or a sourcing output to sourcing only the input off. Inputs typically have very high
input? It is possible to use a resistor to con- impedance so this is not a problem.
vert a sinking output into a sourcing output,
or a sourcing output into a sinking one. In A resistor connected between an input pin
the case of a sinking output, simply use the and the power supply is called a pull-up resis-
resistor as the load instead of the input. tor. A resistor connected between the input
pin and 0 V is called a pull-down resistor. The
When the output is off, current only flows classic use of pull-up and pull-down resistors
through the input, turning it on. When the is to force the input in a known state when
output is on, current flows through the tran- the input is not connected to anything.
sistor, pulling the voltage of the low side of
the external resistor down to nearly 0 V and On a circuit diagram this is indicated by a
turning the input off. The transistor turns off small arrow on the emitter pointing in to
the input by stealing all the available current. the base.

To turn a sourcing output into a sinking In an NPN transistor, a small current flowing
output, again the resistor replaces the input from the base to the emitter causes a larger
as the load. This time the resistor is placed current to flow from the collector to the
between the output pin and zero volts on emitter.
the power supply.
On a circuit diagram this is indicated by a
When the output is off, current can only small arrow on the emitter pointing away
flow through the input, turning it on. When from the base (or not pointing in to the base).
the output is on, a larger amount of current
flows through the transistor to the external Note that, in a PNP transistor, current flows
resistor, bringing the high side of the resis- from the emitter to the collector, while, for
tor to nearly the power supply voltage, and an NPN transistor, current flows from the
turning the input off. collector to the emitter.

In both cases, the resistor value must be So, how does the choice of an NPN or PNP
selected so that, when the output is off, transistor relate to the issue of sinking vs.
enough current flows through the external sourcing? The connection has to do with
resistor to turn the input on, but, when the which type of transistor is used to create an
output is on, the output can sink or source output circuit and where it is placed rela-
enough current through the resistor to tive to the load being controlled. In a PNP
lower or raise the voltage enough to turn (BJT) transistor, to get current to flow from

eHANDBOOK: PNP and NPN 12


www.controldesign.com

the emitter to the collector, a small control TALK THE SAME LANGUAGE
current must flow from the emitter into the Let’s first clarify the terminology.
base. Thus the base must be held at a lower • PNP output of a sensor provides sourcing
voltage than the emitter. If the load is con- output. It gets connected to a PLC input
nected between the power supply and the module which has sinking (NPN) input.
emitter the voltage at the emitter will be
pulled down as the transistor begins to con- • NPN output of a sensor provides a sinking
duct, making it harder to maintain a lower output. It gets connected to a PLC input
voltage at the base. module which has sourcing (PNP) input.

Thus, for a PNP transistor, the load is usu- The vast majority of the usage in North
ally connected to the negative side of the America is 24 Vdc operation, PNP sourcing
transistor, which is the collector in the case output sensors connected to NPN, sinking
of a PNP transistor. In a digital output the input modules. Asia is the opposite, with
load is connected to the output pin on the the bulk of applications being NPN, sinking
I/O module, so current flows out of the pin output sensors interfaced with PNP, sourc-
and into the load; hence, this type of output ing input modules. This does cause the kind
is said to source current. of issue you have described when equip-
ment is sourced and supplied globally. Since
In an NPN transistor, current must flow from North America uses predominantly PNP
the base into the emitter to activate the sourcing output sensors with sinking input
transistor. This requires that the base is held modules, that arrangement would be more
at a higher voltage than the emitter. If the suited to your U.S. plant.
load were connected between the emitter
and 0 V, this would become harder to do as Several sensors now offer “Auto PNP/NPN”
the transistor began to conduct current and output. The output on these sensors get
the voltage drop across the load begins to configured automatically based on the input
rise. So, when using an NPN transistor, the module to which they are connected. An-
load is placed before the transistor, be- other output style—the push-pull output—
tween the power supply and the collector. also detects the load connection and oper-
In an output module the load is connected ates either as PNP or NPN output. However,
to the output pin so current flows from the the output status LED indication doesn’t fol-
load into the terminal and this type of out- low the actual output status when operat-
put is called a sinking output. ing as NPN output. In this mode, the output
­— Michael Sheldon, applications engineer, Maple Sys- LED is off when output itself is on. Thus, to
tems, www.maplesystems.com correctly interpret the output status LED

eHANDBOOK: PNP and NPN 13


www.controldesign.com

indication, one needs to know whether the at 5 Vdc. However, module specifications
sensor output is operating as PNP or NPN. should be reviewed for on and off state
voltage requirements. For example, the
NPN-to-PNP conversion, or vice versa, is sensor-output on state voltage should not
not possible. A pull-up resistor is not rel- exceed 0.8 Vdc. And 120 Vac sensors may
evant in this discussion, as such a resistor is have solid-state nMOSFET or pMOSFET
internal to the input module. outputs, and both will work with an ac input
module, provided wiring is correct per sen-
To answer your final question, the use of sor and module instructions.
5 Vdc is quite uncommon, and the supply ­— Jagjit Thiara, marketing manager for sensing and con-

voltage for most sensors ranges from 10 nectivity, Rockwell Automation,

to 30 Vdc. An NPN sinking output may be www.rockwellautomation.com

used to drive a TTL input module, powered

NPN/PNP vs. sinking/sourcing

The terms NPN and PNP refer to how a transistor is constructed, according to Michael Sheldon,

applications engineer at Maple Systems (www.maplesystems.com). A transistor is a three-layer

sandwich of two different types of material; the two outside layers are the same, and the middle

layer is different. The magic of the transistor is the layer in the middle can be used to control the

flow of current between the outside layers. The two types of material that can be used to build a

transistor are n-type and p-type. Thus, there are two possible types of transistor: NPN and PNP.

The practical difference between these two transistor types is in how current flows through the

circuit. In a bipolar junction transistor (BJT), the control leg—the middle of the sandwich—is called

the base. The other two connection points are called the collector and the emitter. In a PNP tran-

sistor, a small current flowing from the emitter into the base causes a larger current to flow from

the emitter to the collector.

eHANDBOOK: PNP and NPN 14

Potrebbero piacerti anche