Results 1 to 17 of 17
Thread: PNP or NPN ?
11-29-2010, 01:14 PM #1
PNP or NPN ?
I understand the differences of PNP or NPN outputs, and can live with with either. The PLC can be programmed to accept either type of sensors for it's inputs.
My question is, which is more commonly used/encountered?
I might as well go with the flow, there doesn't seem to be a real compelling reason for either, so best to go with the most common.
Jason, update us on your robot project, or whatever you are currently on.
11-29-2010, 01:47 PM #2
Here is some info from a instrumentation and controls website . It really depends on what you want to do and what type of equipment you have.
Posted by Ken Elphick on 27 March, 2002 - 10:59 am
The PNP sensor:- This is a sensor whose output pulls up to the positive supply rail when it senses a metal target. Thus any attached load to the sensor output must be connected between zero volts & the output of the sensor to operate.
This type of sensor is very vulnerable to short circuits to earth ( zero volts), a common fault if the wiring chafes/ becomes damaged. Often it will fry under this type of fault.
NPN sensor :- This is a sensor whose output pulls down to the negative ( 0 volts) supply rail when it senses a metal target. Thus any attached load to the sensor output must be connected between the Positive supply rail & the output of the sensor to operate. This type of sensor cannot survive a short up to the positive supply rail ( a very rare occurrence!). Shorts to the negative rail (zero volts) will not damage it at all & it can tolerate this indefinitely.
Other factors affecting choice :- If there is a PLC attached then :-
a/ If the input device of the PLC registers a logic high/true state when left open circuit then this type of input is best served by an NPN sensor. This will pull the PLC input low when a target is sensed.
b/ If the input device of the PLC registers a logic low/false state when left open circuit, then this type of input is best served by a PNP sensor. This will pull the PLC input high when a target is sensed.
Posted by Rick Daniel on 29 March, 2002 - 1:28 pm
Another point ...
NPN sensors are current sinking devices and PNP sensors are current sourcing devices. You can't connect a current sourcing sensor to another
current sourcing input (like TTL for example), it just won't work unless you provide a path to ground. Likewise a current sinking sensor must be connected to a current sourcing input. So you have to know something about the input circuitry of the device you're trying to read the things with.
Posted by Steve Myres, PE on 27 March, 2002 - 2:05 pm
When using grounded (NPN) signals, an unintentionally grounded signal wire will be interpreted as a logic true, and can cause unexpected and potentially dangerous results. It's like putting your light switch on the neutral
Posted by Craig Blondin on 27 March, 2002 - 3:44 pm
npn is faster
Posted by Hakan Ozevin on 27 March, 2002 - 4:57 pm
> npn is faster<
Are you sure about this? Is npn faster than pnp?
Posted by Curt Wuollet on 1 April, 2002 - 11:54 am
Without getting into semiconductor physics, pnp transistors have been more difficult to fabricate for speed. But the difference shouldn't be anything you’d notice in PLC timeframes unless the designer hosed up or extremely low cost devices were used. I've measured switching times on thousands of transistors. If they are noticeably slower it was because the base drive was not optimized.
Posted by Rocco F. Dominick on 29 March, 2002 - 11:28 am
Refer to Rockwell Automation Selecting Sinking (NPN) vs. Sourcing (PNP) - I/O Modules, Document No. 12812 for your information
11-29-2010, 02:11 PM #3
PNP is more common, for the reason stated above about unintentional grounding. A cable rubbing against something wears through can short to ground, causing erratic input signals.
In reality it's unlikely to be a major safety issue, but pick one way and stick to it...
12-06-2010, 05:25 PM #4
As I was installing a drive today, I made an observation about this topic.
From a maintenance perspective, NPN seems extremely counter-intuitive and makes equipment troubleshooting more difficult.
Normally when we think of something turning "on", we think of "voltage being present". If the headlight of your car isn't coming on, you're looking for +12VDC to ground at the bulb assembly. If a motor won't come on, you're looking for voltage phase-to-phase or phase-to-ground. If a mold heater isn't heating... well, you get the picture.
This also extends to physical sensors... let's say a float switch. When tank gets too low, turn on the pump. Doesn't matter whether the switch is NC or NO, the only thing that is going to start that pump is a "on" signal (full voltage) going to the pump from somewhere on the switch. Either through law, code, regulation, common sense, or whatever, the rule is is to switch "hot" and leave the other side("neutral","0V","negative") always on.
But if a PLC with NPN inputs has an issue with an input... you're looking for what? You stick your multimeter to the PLC input and a ground. What's this? No voltage? And the input is on? Is the PLC bad? Nope. The input is "on" and the voltage is "off". Get it? Yes, you can get around this by finding a positive wire somewhere and using it as a reference point instead of ground, but most people have alot of grounded cabinet and very few exposed positive terminals.
I think that this can frustrate many technicians especially as they have to trace problems from the "PLC side" to the "real world side" and have to constantly readjust their thinking. I suppose there are a few people out there who come from a strict "NPN" mindset who do not have to constantly make the readjustment, but I think they are a minority out of all industrial maintenance people.
12-07-2010, 11:18 AM #5
I think that it depends on the use of the transducer. If a fault happens in the wiring, does this signal a good condition, such as "interlocks complete" or a bad condition - "oil pressure low"? It is better to fry a transducer or have a machine shut down then to have a spindle motor start up with its covers off.
12-07-2010, 03:44 PM #6
Bear in mind that I'm only an amateur Machinist but a (retired) Professional Electronics designer of some 50 years experience.
The real way to think about it is which are the active and which are the inactive states for a particular system. I don't really think that for a properly designed system it matters much which way up the signals are. If it's designed properly you would hope that a (simple) cable fault would result in a safe condition, whatever that is.
In days of old, when logic design was in its infancy, there were systems where the logic polarity was inverted after each stage - I hope you don't suffer from that.
So, back to the inputs. The Post above is very sensible. If your inputs are active High - PNP - put your probes on 0v and the Input. If your input is active low - NPN - put your probes on Supply and the input.
12-07-2010, 07:47 PM #7
and just to make sure there is a contrarian view . . . I hate PNP sensors for one simple reason - they are far more suseptible to noise - especially when being used to latch a counter or an encoder register for registration (homing / printing press alignment, etc.) where a single noise pulse a few micro-seconds long is all it takes to latch up your counters with bad data with attendant results when an alarm is enunciated and the machine shuts down (or crashes or whatever it does if your software is not fault tolerant).
An NPN must pull a signal down to create a "TRUE" condition, this is much harder to do for a sensor than for noise to induce a voltage potential high enough to be measured as a "TRUE" condition.
So in the world that I live in where these sensors are used to latch in positions using a hardware latch that must be serviced and read afterward with software . . . NPN all the way baby!
12-12-2010, 06:20 PM #8
if the logic condition of "low" has a threshold very close in voltage to circuit common, then, *and only then* the circuit will be more sensitive to positive going noise than negative going.
So making a claim that one is "more sensitive" is really making the assumption that the threshold for "low" is close to ground, as is common for say, TTL.
It is perfectly possible to reverse that, so that the PNP becomes less sensitive. Just depends on the circuit.
If the PLC has a choice of thresholds, and you have a PNP source, then setting the threshold to the highest (most positive) one will tend to reduce the effect of noise.
if your thresholds are low, and unchangeable, then without some external circuitry, it is hard to reduce sensitivity, and you are indeed better off with NPN logic, assuming the sensor output voltages are considerably higher than the inputs require.
12-12-2010, 09:13 PM #9
Much more difficult to pull a 24VDC sourcing input low to get a true condition via electrical noise.
You can get ground bounce and noise measuring well above 24VDC simply by opening a motor starter contactor with a 24VDC coil that is not properly snubbed. Sinking inputs (triggered by voltage sources . . . PNP being one option) are far more susceptible to false true conditions.
This is especially an issue when using latch circuitry that has to accurately capture encoder positions in motion applications (for print registration on printing presses, synchronization of various axes that must remain coordinated, etc.)
Filtering these inputs is not an option - 1msec can make all the difference in the world when traveling at 20 m/sec.
12-13-2010, 05:48 AM #10
it IS dependent on the thresholds......
Ground bounce... well that depends if the bounce is at both ends or one, and to some extent which one...... it also depends on the logic threshold, which should be high for noisy environments. There is no use looking at a 2V threshold when you have volts of noise induced.
if you have a noisy environment, differential lines may work substantially better, possibly coupled with higher thresholds.
If the equipment is not capable of those, then it sucks to be you, you are going to have to deal with it via some means of adapting to a higher threshold, breaking any direct connections with optical or transformer coupling, etc, etc.
if NPN vs PNP is inherently different in sensitivity, then the equipment is poorly designed. That may well be the case.
12-26-2010, 03:45 PM #11
"if you have a noisy environment, differential lines may work substantially better, possibly coupled with higher thresholds. "
Yep. This will leave a lot of transient problems behind.
"... breaking any direct connections with optical or transformer coupling, etc, etc."
Optical gets cheaper all the time. Pulse transformers with customized response ranges are readily available and incorporate beneficial filtering of noise and trash inherently. Dynamic range can be an issue, and some signal lines may need to be "summed" to work well at very low and quite high pulse rates.
12-26-2010, 05:01 PM #12
12-26-2010, 06:13 PM #13
Lots of suggestions on how to address noise problems - but none take into consideration that you don't have the luxury to tell Emerson or Rockwell or Siemens how to design their index trigger inputs. Suggestions related to PLC inputs, etc. miss the point, these are hardware latches that directly trigger a DSP gate or equivalent.
They have to be fast - (fraction of a msec) and they have to be compatible with readily available latching devices (registration photo-eyes, prox switches, tool setters, etc.)
NPN is the standard for these kinds of inputs for the reasons stated above.
12-27-2010, 03:23 PM #14
12-27-2010, 06:36 PM #15
In my world, fractions of a msec is years and years of time...... 5 nanosec is getting fast.
If the logic threshold level is low, and it can be on equipment, and you can't modify the threshold (which can be possible with outside components that don't kill speed), then you might be stuck.
I just instinctively don't like low threshold plus noise, pull-down or not. The kind of noise TRL is referring to can laugh at your little sensor NPN pull-down, and set the input high anyway. Might not be any better than a resistor pull-down with a PNP out.
I can show you a PNP-only output that will hold your input down solidly if the logic level is at all reasonable. It's all in knowing what to do.
You use what you gotta. Understanding HOW it can fail to work is the first step towards fixing it.
And an awful lot of digital problems turn out to have analog roots.......
01-06-2011, 12:30 PM #16
Locomotive speed probes are usually npn.
01-07-2011, 08:27 AM #17
Whether you use PNP or NPN , they cannot be mixed them on some PLC's. Omron will be comfused by the mix.