PNP to NPN how.

Billando

Member
Join Date
Jul 2002
Location
Brisbane Australia
Posts
10
Hi everyone, new to this forum but have read many posts. Really the info is staggering some times. The grey matter takes a while to take it in. But I think it eventually does go in. Any way I noticed in a reply to J.Thornton. Eric Nelson mentioned he always keeps a stock of 4.7k ohm resistors. I know it is possible to change the bias but don`t know how . Could you please explain. TIA
 
Here's the off-the-top-of-my-head response. I'm sure someone else can fill you in on the details.

The resistor is used as a "pull-up" or "pull-down" resistor to invert the logic of a transistor. You tie one end to the transistor and the other to a constant voltage of "Logic High" or "Logic Low." Which voltage you tie it to depends on whether you're using NPN or PNP. The reason for using this particular size of resistor (I assume) is to limit current. Eric must have figured out that 4.7K ohm is a large enough value to work with all the input cards he uses (or he owns stock in a company that makes only 4.7K ohm resistors).

I usually have to draw a sketch to make sure I've got it right. One thing to remember is that a transistor is "ON" when there is current flowing through it. If you forget that and focus on voltage, you'll probably be scratching your head for a while.

AK
 
Thanks Akreel I am only beginning, have second hand laptop, second hand misti p.l.c.,some software and a bunch of lights and sensors.Phills book on order and now I am gonna play.
 
If you must learn this, do it wright. Connect your NPN or PNP device with a power supply and nothing else but a 4,7K resistor. The resistor will prevent you from releasing the embeded smoke of the device :)

Look at how to connect it and trigger it so it does not blow up...

When this will be done, get your DVM and look at every connexions to find which one switches from high to low ... (above 11 Vdc to below 11 Vdc)

Thats where you would connect your PLC input.

Incidently the input of your PLC will be around 4,7K ... funny don't you think?

Then look at the device vs PLC connexion diagram from the manufacturer, you'll see it's probably not like you've done... you probably now know how to inverse the sinking/sourcing specifications.
 
Bill I am going to give you a simple way to begin understanding this. Do you have a DC power source of any KIND around...can be an old plug in adapter for something. You need a DC power source and 1 RESISTOR..preferably a high value...1K or above(depending on voltage of the source..OHMS LAW V(voltage)=I times R (current times resistance). You need a METER...preferably a DMM (digital multimeter).

Connect the power supply in series with the resistor then use the mulitmeter to measure the voltage across the resistor. IT should read approximately source votage. SWAP the leads and you should read the same BUT NOTE...one of the readings will show a - (minus sign) in front of the number. This will show you the polarity...so if you want current flow to be reversed to another device you just swap the leads just like you did with the DMM.

Biasing (one form of) is just a way to connect in parallel to a semiconductor device to obtain current flow (with polarity a certain way) thru another device to use for another purpose.
 
Thanks to Pierre and Rsdoran for filling in some of the gaps. I'm glad Billando asked this question because I never thought of this type of solution before. I usually throw a relay in the circuit, but now my field kit is going to have a few resistors in it!

By the way, when I sat down and sketched the circuits out I noticed something that hasn't been mentioned/clarified yet. When you use the method we're describing to connect your PLC to a transistor device, the PLC will read OPPOSITE of what the status of the sensor is. On = Off, Off = On. You'll have to reverse the logic in your program.

AK
 
You might want to try this ...

First let's assume that the sensor is 24VDC (a very common type) and that it has 3 wires (most of them do) and that one wire is brown, and another wire is blue (a very common situation). Start by hooking the brown wire to +24VDC and the blue wire to 0VDC. This powers up the sensor. Next use a "SMALL" wattage 24VDC incandescent lamp to test with. (A small relay with a 24VDC coil will also work but don't use an LED). Hook the sensor's third wire (usually black) to one side of the lamp. Now hook the other side of the lamp to +24VDC. Now actuate the sensor several times.

If the lamp works OK, then you've got yourself an NPN sensor. The sensor is switching on and off the negative side of the power to the lamp. An old-timer electrician would say, "The lamp ALREADY HAS positive (remember you just hard-wired one side of it to +24VDC). It's WAITING FOR negative." The sensor works correctly by switching the negative side of the power off and on.

If the lamp does NOT work OK as connected above, swing that last wire over so that one side of the lamp is hard-wired to the 0VDC line. Now actuate the sensor again. If the lamp works ok this time, then you've got a PNP type sensor. The sensor is switching on and off the positive side of the power to the lamp. An old-timer electrician would say, "The lamp ALREADY HAS negative (remember you just hard-wired one side of it to 0VDC). It's WAITING FOR positive. The sensor works correctly by switching the positive side of the power off and on.

If the lamp doesn't work correctly with either hookup, you've probably got a bad sensor.

To sum up so far: If the sensor switches (N)egative, it's an (N)PN type sensor. If the sensor switches (P)ositive, it's a (P)NP type sensor. In other words, the first letter of the sensor type will tell you which side of the power supply the sensor is designed to switch.

Further, since MOST of us mentally associate the POSITIVE side of the power supply as the "SOURCE" of the power, we can use that association to help remember that a (P)NP type sensor is a SOURCING type device. Conversely, since most of us mentally associate the NEGATIVE side of the power supply as the low or "SINKING" side of the power, we can use that association to help remember that an (N)PN type sensor is a SINKING type device.

Now, if you've got a SOURCING sensor, you must connect it to a SINKING input module. If you've got a SINKING sensor, you must connect it to a SOURCING input module. In the field, the input module's circuit takes the place of the lamp in our test setup. The main difference is that the input module is polarity sensitive; the lamp is not. (Incidentally, we're using a lamp rather than an LED in our original tests so that we don't have to worry about this polarity issue).

Finally, the resistors and digital meters that have been discussed in other postings are too sophisticated for a simpleton like myself. My main objection to the meter is that it is just too darn sensitive. Most of the sensors we're discussing have a tiny amount of "leakage current" which will be enough to show a full voltage reading on the meter EVEN WHEN THE SENSOR IS OFF. The off-state leakage current is too low to light my cheap little lamp, so I will not be fooled by the leakage current. Yes, if they're connected properly, the resistors can be used to "load" the system so that the meter reads correctly. But personally I find the lamp a lot easier to deal with. Besides being easier for me to use than the resistors and the meter, the lamp also provides me with a simple visual indication of the off/on status of the sensor. This helps me find not only the PNP/NPN type of the sensor but also its NO/NC switching action. Something that OFTEN confuses people working with a meter.

Best regards to all.
 
Ron Beaufort said:
Finally, the resistors and digital meters that have been discussed in other postings are too sophisticated for a simpleton like myself.

Ron,

We've probaly all seen how a DMM can be misleading when testing a circuit like this. It's easy to convince yourself that something's "goofed up" with your sensor or your PLC.

The discussion regarding resistors was started in another thread. The original post by Eric Nelson, to which Billando is referring, was about how to interface a Sinking/Sourcing input to a same-type sensor if you're ever stuck in that unfortunate situation. Here it is:


quote:
--------------------------------------------------------------------------------
Originally posted by Terry Woods
Sometimes you find yourself in the situation where, while you might usually use type-A, you find that you only have type-B on hand.

--------------------------------------------------------------------------------

Which is exactly why I make sure to keep a stock of 4.7Kohm resistors on hand at all times!

-Eric


As I said, I usually use a relay to solve this problem (I once made the mistake of using a solid state relay). So, thanks, Eric, for adding this to my bag of tricks!

AK
 

Similar Topics

Hi to All, How I can change NPN to PNP solid state switch? Exapmle1: D-M9N Solid state switch with D-M9P Exapmle2: or allen bradley p.e.c. type...
Replies
3
Views
1,420
Hello; I have noticed one thing more that some time OEM selected NPN PLC I/Os instead of PNP while with PNP the trouble shooting is easy. This...
Replies
10
Views
3,503
I moved my Shopbot and the only problem that I had was a broken proximity sensor. I found a replacement sensor...
Replies
5
Views
1,770
hello,any body can design pnp to npn converter to use plc ,you know plc's work with 4 to 20 mA and 0 to 48 DC volt or 0 to 120 AC voltage...
Replies
8
Views
1,648
Back
Top Bottom