Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how can i change an npn sensor to pnp

Status
Not open for further replies.

markthe spark

New Member
hi,
we have a npn sensor with 3 wires (24vdc)
but our machine is from japan and is pnp
can we change this sensor to pnp somehow or by using
relays?
 
markthe spark said:
hi,
we have a npn sensor with 3 wires (24vdc)
but our machine is from japan and is pnp
can we change this sensor to pnp somehow or by using
relays?

Sensors aren't NPN or PNP, those are transistors - your question doesn't make any sense!.

I'm presuming your sensor doesn't match your machine?, but we need to know more details about both to offer advice. For a start, what kind of sensor is it?, is it an analogue sensor? (with a variable voltage output), or a 'digital' sensor, with a simple ON or OFF output?.
 
hi,
this is a digital photo electric cell(allen bradley), 10 t0 30v dc, 3 wire
npn with the switch wire just on /off, when connected to our machine
the sensor just stays on all the time, as the manufacture's state there
machine is pnp, can we make this into a pnp or get it to switch on and off
or do we need to buy a pnp type, hope this helps
 
markthe spark said:
hi,
this is a digital photo electric cell(allen bradley), 10 t0 30v dc, 3 wire
npn with the switch wire just on /off, when connected to our machine
the sensor just stays on all the time, as the manufacture's state there
machine is pnp, can we make this into a pnp or get it to switch on and off
or do we need to buy a pnp type, hope this helps

What type number is the sensor, we can then look on the net for details!.
 
Nigel Goodwin wrote:
Sensors aren't NPN or PNP, those are transistors - your question doesn't make any sense!.
Umm, they are referred to as NPN and PNP as it happens, as I remember from my forays into PLC's and automated handling systems. It refers to the open collector(drain?) output configuration. I guess that these sensors are still sometimes used in non-computer systems.
 
markthe spark said:
hi ,
allen bradley p.e.c. type 42BA S2LNAE-A2

Looking at the specs this should work fine, it's a very simple thing to do.

The transistor isn't at all critical, any small signal PNP should be fine, depending on the load it's required to pass.
 

Attachments

  • npn_2_pnp.gif
    npn_2_pnp.gif
    1.9 KB · Views: 21,571
Why don't you simply pick sensor with NPN output?
Just call your local reps and tell them what you need.
(polarity, sensing distance, diffuse with background suppression etc.)
Take alook at the https://www.ab.com/catalogs/sensors/catalognumberpdf/ch1/1-99_1-102.pdf

You will notice that 42BA S2LNAE-A2 is NPN so you don't have to change anything. You can use PNP output to drive small relay (700HK slim line from Allen Bradley for example or their twin G2R-SND from Omron).
Use relay contact to turn on PLC input. Even better - use compact relay in form of terminal block or polarity converter block (they are not as popular and hence cost more than relay).

You can also add just simple resistor to PNP sensor (load for open collector - 2.2k 1/2watt is fine) and invert the bit in PLC.
You might be tempted to simply switch "light on/dark on" option on your sensor instead of editing program. Be sure this is safe for the process/machine.

NPN is very common for sensors and PLC comming from Japan and all their equipment I've worked on so far was always using NPN types.
In Europe and America PNP is much more popular but
it's not like you can't find the NPNs as well. I use them all the
time for all Honda and Toyota projects. You are more likely to have
better selection and more readily available sensors if you stick
with Japanese parts (Omron for example). Allen Bradley is
leading brand in America but if you face the long delivery time, try to convert the signal via relay or Nigel's circuit.

This is not preffered method since requirements in industrial enviroment are a bit different and it wouldn't last long when handled by most electricians I know but it would work.
If you go this route just make sure to pick 1/2watt resistors and try to
put it on DIN rail mountable bases (Phoenix Contact or Weidmuller).
Also add LED to show operation and one or two diodes to protect it from
reversed polarity. I would also add current limiting resistor in the collector circuit so the shorts on the output wouldn't kill it.

Have fun

You might want to check industrial automation forums. They normally handle this type of questions:
www.mrplc.com
www.plcs.net
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top