npn/pnp sensors

Joined
13 Dec 2008
Messages
2,227
Reaction score
264
Location
Tyne and Wear
Country
United Kingdom
Hi A question for those used to dealing with plc's and the like
Repairing a machine for a friend of mine, simplist of designs
you press a pedal,which in turn resets the counter module which in turn disengages a cluch mechanism that drives a flywheel
there are a number of holes in the flywheel and an optical sensor that is mounted across it connects to the counter
when the preset count is reached the clutch re-engages and the drive stops till you press the pedal again thats it

this is the counter module
View media item 28335and this is the optical sensor conected to it
View media item 28336
the manufacturer of the module (that he wants to keep because of its simplicity) and sensor went out of business years ago so I've ordered a 3 wire npn optical sensor that I thought would work
thing is I think In my haste I've made an error
I went and stripped the sensor out of the machine this weekend in readiness and found that its actually a 2wire sensor of sorts not 3
if you look at the connection diagram above, the light emiter part of the sensor connects to term 5 +com and term 4 - and the sensor part connects to term 5 +com and term 6 -
now I know that the diagram clearly shows the sensor as a npn type (arrow pointing out and + com) but that is a 2 wire sensor
Ive connected the unit up without the sensor connected and tried shorting terms 4 and 6 which is the the negative and input which does nothing but shorting 5(+com) and 6 (input) and the counter counts which tells me I need a pnp type sensor or am I missing something?
got to say if it hadn't been for the drawing of the transitor on the base showing npn then I would have did the test above and ordered pnp but thats got me confused!
 
Sponsored Links
I'll try and help here... but without knowing how terminal 6 is biassed in the module I'm guessing rather.

From the diagram, it looks like n-p-n with emitter (with arrow) on T6 and collector on T5.

I expect that T5 has a +ve constant voltage to supply the LED, and that when the phototransistor receives light, the voltage on T6 experiences a rising edge since the phototransistor will emit electrons from emitter to base allowing current flow from collector to emitter.

Hence why S/C across T5 & T6 pulls T6 high, incrementing the counter.

If this is correct, then a p-n-p phototransistor will not work with emitter at T6 and collector at T5 since the junctions will be biassed incorrectly.

But since it's a 2-wire sensor with the base unconnected, a 3 terminal n-p-n phototransistor may still work if the base is unconnected.

Hope that's been at least some help...
:confused:
 
If you've bought a sensor with an npn phototransistor, then you can just connect it in the same manner as the npn phototransistor that you removed, just leave the base unconnected. (Collector to pin 5, emitter to pin 6, with LED still between 4 and 5)
 
Looking at the PLC diabram it appears there is no 0 volt available. A three wire sensor will require supply +v and 0v as well as the signal output.

That said the supply to the emitter on pin 4 ( shown as the diode ) MAY be a 0v line but that will be the case ONLY IF there is a current limiting resistor in the sensor head and not in the PLC.

If Pin 4 is 0v then a three wire sensor is likely to work.

The blue symbol on the sensor seems familiar but I cannot recall the manufacturer. There may be a replacement sensor. Is there a manufactures name ?
 
Sponsored Links
If you've bought a sensor with an npn phototransistor, then you can just connect it in the same manner as the npn phototransistor that you removed, just leave the base unconnected. (Collector to pin 5, emitter to pin 6, with LED still between 4 and 5)

If it is a bare transistor used as a two wire photo sensor then you should put a resistor in parallel with a small capacitor between base and emitter to de-sensitise the transistor to prevent it operating in response to electrical noise and radio signals. 100 pF ( pico Farad ) and 47 K ohms ould be a good starting point for the average bare based photo sensing transistor
 
If you get stuck try Pepperl Fuchs, they make wonderments along these lines.
 
thanks for the help lads
the problem I'm having is that the sensor I've ordered http://docs-europe.origin.electrocomponents.com/webdocs/0dee/0900766b80deea43.pdf

I think will need all three wires connected as it also supplys the light beam transmiter as well as the receiver (the origonal one has two seperate leads)

Bernard the blue label I think is off a company that he sent the sensor to that said that they could maybe repair it

both the sensor and the module were manufactured by HIRD-BROWN

just took some voltage readings

between 4 and 5= 15.1 Vdc
between 5 and 6= 12.2 vdc
5 is positive and shorting 5 and 6 incremants the counter

Matt
 
was the second cable of the sensor ( the lamp cable ) connected between terminals 4 and 5 ? If it was then can you reconnect it and then measure the voltage between 4 and 5 while connected.

If it remains at or close to 15 volts then terminal 4 is connected to 0 volts and can be used as the 0v for a three wire sensor. Brown wire (+v supply) to terminal 5. blue ( -v supply ) to terminal 4 and black ( signal ) to terminal 6

If the voltage btween terminals 4 and5 is reduced to less than 10 volts then terminal 4 is not connected directly to 0 volts but via a resistor to limit the current in the lamp. So it is not suitable as a perfect -v supply for the sensor.

However as the active input from the sensor is positive supply from terminal 5 ) connected to terminal 6 a three wire sensor using the not perfect 0 volts on terminal 4 as it's negative supply MIGHT work. Whether it does depends among other things on whether there is at least 12 volts supply between terminals 4 and 5 when the new sensor is connected. Test the supply with both states ( hole and no hole ) of the sensor.
 
was the second cable of the sensor ( the lamp cable ) connected between terminals 4 and 5 ? If it was then can you reconnect it and then measure the voltage between 4 and 5 while connected.

If it remains at or close to 15 volts then terminal 4 is connected to 0 volts and can be used as the 0v for a three wire sensor. Brown wire (+v supply) to terminal 5. blue ( -v supply ) to terminal 4 and black ( signal ) to terminal 6

If the voltage btween terminals 4 and5 is reduced to less than 10 volts then terminal 4 is not connected directly to 0 volts but via a resistor to limit the current in the lamp. So it is not suitable as a perfect -v supply for the sensor.

However as the active input from the sensor is positive supply from terminal 5 ) connected to terminal 6 a three wire sensor using the not perfect 0 volts on terminal 4 as it's negative supply MIGHT work. Whether it does depends among other things on whether there is at least 12 volts supply between terminals 4 and 5 when the new sensor is connected. Test the supply with both states ( hole and no hole ) of the sensor.

Totally agree with bernard:
+15V - T5
0V (you hope) - T4
NPN Output - T6

and then repeat your voltage measurements: T4 - T5, which hopefully will remain at c. 15V, then you should measure voltage change T4 - T6 when you obstruct the light path.
 
yes, the lamp cable is connected to 4 and 5
when the lamp is connected the voltage drops right down to 1.45v (which I think is the problem)
however at home and on the bench the sensor/module work as it does in the factory on the machine but it intermitantly packs up and refuses to count
and looking at the lamp part via my camcorder on night view setting I can see that the lamp is lit

with the lamp connected and the receiver unconnected to 6
4 and 5 = 1.45v dc 5 positive
5 and 6 = 10.9v dc 5 positive
4 and 6 = 9.5v dc 4 positive
with the reciever black connected to 6 testing between 4 and the red wire gives 9.5 vdc with nothing blocking the light source falling to 0.3 v with the light source blocked
with every thing connected and working
4 and 5 steady at 1.45 regardless off state of the sensor
5 and 6 = 2.9v when light source present 11.9 when blocked 5 positive
4 and 6 = 1.3v when light source present 10.5 when blocked 4 positive
colours of the leads are lamp brown(5) and blue (4 )
receiver red (5) black (6)
 
when the lamp is connected the voltage drops right down to 1.45v (which I think is the problem)

...1.45V being the voltage drop over the diode at its forward biassed operating current!

This confirms that there is a current-limiting resistor external to the sensor between T4 and 0V. So you won't get much joy with your new sensor as things stand.

Can you 'find' a 0V somewhere from your main module and connect it to you new sensor instead of T4?
 
when the lamp is connected the voltage drops right down to 1.45v (which I think is the problem)

No that is not the problem. The 1.45 volts across the lamp is the normal voltage across an LED of the sort used as a light source in opto sensors. That is working properly.

There is a resistor inside the PLC which limits the current through the lamp to a safe level.


Sensors age over the years and lose sensitivity or become slow to react to light. When slow they appear to work well at slow speed ( as on the bench ) but do not work reliably at normal operating speed.

One thing to check is the holes in disc in the machine are clean. If they are not clean drops of oil or water on the rim of the hole can spread light into the sensor even when the hole has passed the sensor.

Has there been any change of lighting or heating around the machine that might be putting spurious light or infra red energy into the sensor ?. Has another sensor been recently fitted nearby.
 
ok this is a photo of the power supply/relay section of the module
View media item 28345there is indeed a current limiting resitor connected between T4 and the negative rail
its the one top left of the photo and is 220 ohms

so If I bridge this out then persumably T4 would then be 0v and I could then use a 3 wire sensor
but would the sensor then need to be pnp? (sourcing the positive from t5 to t6) rather than two wire npn that was sinking t5 down to t6
bernard no the holes are clear, there is also a lid over the machine flywheel/sensor
one thing that did puzzle me is that the shielding braids of both sensor wires were also connected to term 5 rather than grounded
Thanks again for the advice lads

Matt
 
If the resistor only feeds 0v to terminal 4 then you can bridge it out and use three wire sensor.

Yes from your description it will be a PNP sensor you need.

The original circut of LED lamp and 220 resistor was putting about 60 milli-amps through the LED so provided the new sensor's operating ( supply ) current is less than 60 milli-amps it won't be overloading the power supply.
 
so If I bridge this out then persumably T4 would then be 0v and I could then use a 3 wire sensor

Yes.

but would the sensor then need to be pnp? (sourcing the positive from t5 to t6) rather than two wire npn that was sinking t5 down to t6

OK, It looks like the original sensor was a simple n-p-n phototransistor, but because base was unconnected (no external bias w.r.t. emitter), it could be used to pull-up the voltage at T6.

For the new sensor, n-p-n output generally used to pull down a node (T6) to 0V in conjunction with a pull-up resistor.

So p-n-p output could be used to pull up a node (T6) to 15V in conjunction with a pull-down resistor - I think this is what you need..

Since you have the p.s.u./relay module apart, can you confirm a pull-down resistor on T6?

EDIT: beat me to it bernardgreen. :)
 

DIYnot Local

Staff member

If you need to find a tradesperson to get your job done, please try our local search below, or if you are doing it yourself you can find suppliers local to you.

Select the supplier or trade you require, enter your location to begin your search.


Are you a trade or supplier? You can create your listing free at DIYnot Local

 
Sponsored Links
Back
Top