I want to build a Counter using a Proximity Sensor. I want to give choice for user to use either PNP or NPN. I will give two ports for the same. I am using PIC16f887 microcontroller. How to detect that which sensor user inserted?
- I dont want to miss any sample just to detect.
- I dont want to put burden on user to select type of sensor from the menu.
Power supply for sensors is 12V DC.
It may be programmatically but automatically it should detect without user intervention. Or it may be electronically , may be using Gate circuit or something.
What is confusing me more is some of them come "open collector" type. When sensor detect the object, they pull down.