Today is...
Monday, November 24, 2014
Welcome to Control.com, the global online
community of automation professionals.
Advertisement
Featured Video...
Featured Video
Wiring and programming your servos and I/O just got a lot easier...
Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
NPN vs PNP
Trying to determine application for NPN vs. PNP. Also NO vs NC.

I need to generate a voltage signal to +5vdc on an input pin for a microcontroller. I have a functional circuit in place to handle a +24vdc input from a proximity sensor. Basically, this input pin on the microcontroller is held at 0vdc across a resistor and a zener diode is regulating the incoming voltage from the sensor. Since I need a positive voltage to be generated from the sensor, would that require a PNP or an NPN style sensor? Also, if I am using a proximity sensor and need the positive voltage signal to be generated while there is an object being detected, and the voltage signal to be near 0vdc when there is no object, would I require a NO or NC style?

Any help would be appreciated. Thanks.

By William Sturm on 6 May, 2009 - 5:10 pm

PNP NO

Bill Sturm
Abbeytronics LLC

By DroopyPants on 6 May, 2009 - 5:12 pm

If I am thinking correctly a PNP proximity switch will have the positive output that you require. Also a N.O. output would be needed for the output to be "high" when its sensing an object and "low" when nothing is present. Hope this helps.

By Curt Wuollet on 6 May, 2009 - 9:06 pm

N.O. PNP.

Regards
cww

Thanks to all, very helpful.

By Anonymous on 8 May, 2009 - 12:23 pm

Hi,

It's not really possible to determine if you need PNP/NPN based on the information you give so far. The reason is that it is not clear whether your microcontroller needs a current source or a current sink. Also, it sounds like a normally open sensor might work however it's a good idea to verify the microcontroller circuit against potential sensors' circuits. Terms like PNP/NPN and NO/NC do not sufficiently describe a device's input or output circuit.

If he is making it clear that he need a high input. i think its clear that his microcontroller is Sinking Input only. So PNP NO is perfect what he need.

couple questions:

1) I need a sensor that will connect to PLC that has a positive DC "com". Would i need a PNP sensor?

2) Encoder question: this is # on the unit: E40S6-1000-3-2-24. New p/n may be E40S6-1000-3-N-24. I know nothing about encoders. Does this one have a "zero point" that i could use put a roller in a certain position at the start of each cycle? I'm thinking it doesn't, so am planning to use a sensor to "clock" the roller. But maybe i can make use of encoder. Right now the encoder is used to tell machine the length of material going into machine to be rolled.

Machine uses ML1500 unit.

Thx for your time.
Marty

By Steve Myres on 10 August, 2013 - 12:01 am

"1) I need a sensor that will connect to PLC that has a positive DC "com". Would i need a PNP sensor?"

Actually, you need a new PLC.

An NPN sensor, however, is the type that will work with the PLC inputs you have.

Why do i need a new PLC?

>> "1) I need a sensor that will connect to PLC that has a positive DC "com". Would i need a PNP sensor?"

> Actually, you need a new PLC.

> An NPN sensor, however, is the type that will work with the PLC inputs you have.

By Steve Myres on 11 August, 2013 - 2:42 pm

> Why do i need a new PLC?

Actually, I should have said "You need new I/O modules". Why? Because using ground as your "ON" or "true" signal level is one of the stupidest and most dangerous ideas ever perpetrated on the industrial controls community.

Imagine for a moment if motor control were done that way. Let's say a forklift crashes into a conduit carrying the coil wires for a motor starter designed as ground-true, crushing the wires. The motor will have an unintended start which might only be able to be overridden with the local disconnect. It's not physically impossible for something similar to happen in a hot-true (or "ground-common") system, but there are more ways create a ground-fault than a phase-fault, and they're far less likely to be cleared by tripping an overcurrent device in the faulted leg. Doesn't sound like the kind of "design" we'd want to emulate in PLC I/O.

Now, I'm not saying there's anything inherently wrong with a negative-true system, but to do it correctly, you'd have to ground the DC positive, so that you'd still be using the UNgrounded leg as your true level, and people who run NPN systems still ground the negative side just like in PNP systems.

Ground-true is a stupid idea. Just say "NO!"

Steve, i can appreciate what you're saying, but you're talking a bit over my head. All i need to know is that type of sensor to get.
I've rigged-up 2 wires as a test to see if my "logic" will work. One wire goes to ground on the machine and one goes to the input on the module. When i touch the wires together it triggers the PLC like i want.

So, PNP or NPN?

Thx.

By Steve Myres on 12 August, 2013 - 7:19 pm

NPN, like i said in my first post, unless you have the desire and budget to correct the whole thing right now.

I think i understand why i need a NPN. Thx.

By William Sturm on 12 August, 2013 - 9:42 pm
1 out of 1 members thought this post was helpful...

NPN sensors are also known as current sinking.  The PLC input supplies voltage and the sensor grounds the voltage, then current flows...

PNP sensors are also known as current sourcing.  The sensor supplies voltage and the PLC input grounds the voltage, then current flows...

In both cases, current flow equals a logical true value.

Where it may get confusing is that a sourcing sensor connects to a sinking input and a sinking sensor connects to a sourcing input.

I hope this helps...

Bill Sturm

Thx Bill. That sinking/sourcing was confusing.