from the identifying need department...
Sensor technologies. topic
Posted by raidermanz on 6 May, 2009 - 2:32 pm
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.

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

Bill Sturm
Abbeytronics LLC

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

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


Posted by raidermanz on 7 May, 2009 - 2:40 pm
Thanks to all, very helpful.

Posted by Anonymous on 8 May, 2009 - 12:23 pm

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.

Posted by Bimalendu on 14 November, 2009 - 1:50 am
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.

Posted by Marty on 9 August, 2013 - 7:35 pm
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.

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

Posted by marty on 11 August, 2013 - 2:22 am
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.

Posted 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!"

Posted by Marty on 12 August, 2013 - 12:21 pm
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?


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

Posted by Marty on 12 August, 2013 - 7:41 pm
I think i understand why i need a NPN. Thx.

1 out of 1 members thought this post was helpful...
Posted by William Sturm on 12 August, 2013 - 9:42 pm
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

Posted by Marty on 14 August, 2013 - 5:21 am
Thx Bill. That sinking/sourcing was confusing.

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2014 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.

While having never invented a sin, I'm trying to perfect several.
Advertise here
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive