With just a few components, you can provide a translated signal from industrial and PLD sensors that connects safely to a microcontroller, with the added bonus of supplying 7.5 mA of regulated power.
Matching a sensor interface with a programmable logic converter or controller hardware that can accept only one type of input—npn or pnp—can be difficult. The last-stage modification circuit described ...