Results 1 to 17 of 17

Thread: PNP or NPN ?

  1. #1
    3t3d is offline Titanium
    Join Date
    Nov 2004
    Location
    WI
    Posts
    3,995

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

    Thanks Again!


    PS,
    Jason, update us on your robot project, or whatever you are currently on.

  2. #2
    Jstanley6787 is offline Plastic
    Join Date
    Jan 2009
    Location
    Arizona,USA
    Posts
    12

    Default

    Hello Titanium
    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.

    Rick Daniel
    Intelligent Instrumentation

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

    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.

    Regards

    cww


    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

  3. #3
    Chris999 is offline Hot Rolled
    Join Date
    Feb 2005
    Location
    Vancouver B.C.
    Posts
    764

    Default

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

    Chris

  4. #4
    Muffler Bearing is offline Aluminum
    Join Date
    Jan 2010
    Location
    KY, USA
    Posts
    130

    Default

    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.

  5. #5
    chuckey is offline Stainless
    Join Date
    Jul 2005
    Location
    Wensleydale, UK
    Posts
    1,150

    Default

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

  6. #6
    AlanBeckett is offline Aluminum
    Join Date
    Oct 2010
    Location
    Burton-on-Trent, UK
    Posts
    113

    Default

    Fascinating!
    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.
    Alan

  7. #7
    motion guru's Avatar
    motion guru is offline Titanium
    Join Date
    Dec 2003
    Location
    Yacolt, WA
    Posts
    3,544

    Default

    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!

  8. #8
    JST's Avatar
    JST
    JST is online now Diamond
    Join Date
    Jun 2001
    Location
    St Louis
    Posts
    12,356

    Default

    Quote Originally Posted by motion guru View Post
    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!
    This is only true with some assumptions......

    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.

  9. #9
    motion guru's Avatar
    motion guru is offline Titanium
    Join Date
    Dec 2003
    Location
    Yacolt, WA
    Posts
    3,544

    Default

    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.

  10. #10
    JST's Avatar
    JST
    JST is online now Diamond
    Join Date
    Jun 2001
    Location
    St Louis
    Posts
    12,356

    Default

    Quote Originally Posted by motion guru View Post
    Much more difficult to pull a 24VDC sourcing input low to get a true condition via electrical noise.
    Whatever......

    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.

  11. #11
    L Haney is offline Plastic
    Join Date
    Jan 2009
    Location
    Rome, GA
    Posts
    32

    Default

    [QUOTE=JST;1473772]Whatever......


    "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. #12
    Join Date
    Nov 2005
    Location
    Maryland
    Posts
    7,072

    Exclamation ground noise

    Quote Originally Posted by JST View Post
    Ground bounce...
    Some years ago I was called in to troubleshoot a problem on a DEC PDP-11/70 computer system.

    Turned out to be noise on the ground system. High-energy spikes with 750 volt peaks.

    Isolating the computer ground system cured the problem.

    - Leigh

  13. #13
    motion guru's Avatar
    motion guru is offline Titanium
    Join Date
    Dec 2003
    Location
    Yacolt, WA
    Posts
    3,544

    Default

    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.

  14. #14
    doug6949 is offline Hot Rolled
    Join Date
    Feb 2007
    Location
    Georgia
    Posts
    728

    Default

    Quote Originally Posted by motion guru View Post
    NPN is the standard for these kinds of inputs for the reasons stated above.
    That probably explains why single ended encoders are nearly always NPN.

    Doug

  15. #15
    JST's Avatar
    JST
    JST is online now Diamond
    Join Date
    Jun 2001
    Location
    St Louis
    Posts
    12,356

    Default

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

  16. #16
    bdx
    bdx is offline Cast Iron
    Join Date
    Apr 2007
    Location
    N. Ireland
    Posts
    260

    Default

    Locomotive speed probes are usually npn.

  17. #17
    marcuspurdy is offline Plastic
    Join Date
    Jan 2011
    Location
    ohio usa
    Posts
    3

    Default

    Whether you use PNP or NPN , they cannot be mixed them on some PLC's. Omron will be comfused by the mix.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •