piclist 1998\10\07\062845a >
Thread: Sinking, sourcing, NPN, PNP sensors and switches
face BY : Quentin email (remove spam text)

Thanks to all that replied.
Using another pin to set high and read and then set low to read to
determine sink or source is a good idea, but I see some problems as you
don't know at that stage if the sensor is sensing or not, or if it is in

I try to stay away from any kind of switches as that is what confuse the
people that install it.

I've tinkered a bit with electronic workbench and came up with this:
As I want to use a 12C508 the pins already give me part of the solution. I
can use the Shmidt Trigger (sp) and do this:
             0 +5V
             < 10K
       2K    |     ||20nF
0------VVVV---0-----||----0 PIC Pin
             |     ||
             < 10K
             - 0V
This will then give a pulse every time there is a change in the state of
the sensor. I might also have to put in a diode from 0V to PIC Pin, to clip
neg. going pulses.
The only disadvantage of this is that with a source sensor the pulse occur
when it switches on and on a sink, the pulse occur when it switches off.
This might not be a problem in my application.


<361B410F.EF58C724@icon.co.za> 7bit

See also: www.piclist.com/techref/io/sensors.htm?key=sensor
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Sinking, sourcing, NPN, PNP sensors and switches

month overview.

new search...