|
Re: PNP versus NPN sensors
A more reliable way than relying on a voltage divider and two resistors pulling against each other is to use an opto-isolator with a NPN output to invert the signal. That is basically the same thing that Donut is saying, but just doing with a solid state device instead of a relay.
Also be away that a sensor with an NPN output may not pull the voltage down low enough for a logic low into the DIO port of a roboRIO. Last year we used some QM series reflective sensors from Automation Direct that only went down to around 1.7 volts. We had to run them through opto isolators to get a good logic low, which is generally 0.7 volts or below.
__________________
Brian K
Team 1225 Robotics Mentor
|