I developed this sensor interface board during my ongoing effort to create a really great open source PLC.
It's an 8 channel interface board that allows you to use industrial sensors with your Arduino or other 5V microcontroller. You can use both NPN (sinking) and PNP (sourcing) sensors from 5 to 30VDC.
You can configure each channel to interface with either one of the 2 sensor types. That means you can use any combination of 8 NPN or PNP sensors on any channel you'd like and then reconfigure it on the fly if you need to.
You can use multiple sensors of different voltages at the same time (as long as they have a common ground), such as a 5V, a 12V, and a 24V sensor.
The board electrically isolates your microcontroller from your sensors up to 1kVDC, and has 8 red LEDs to indicate the status of each channel (on / off).
Its design is completely open source and you can find all the project files on GitHub.
You toke a different approach for the input protection. What I'm used to see in plcs PNP/NPN inputs for PLC is a voltage divider, where the lower resistor is in parallel to the optocouple led them, the phototransistor is voltage compared and the signal goes to the mcu. This is a very simple, reliable and cheap method to protect the inputs.
What I would do for a large voltage range (but not NPN/PNP compatibility, since I do not care about NPN input, since in america/europe continents we almost only use PNP anyway) would make a constant current source for each input, them feed the optocoupler.
What you did (voltage divider them compare them optocoupler) was the first time I've ever seen and I curious why you took this approach.
Hey, just made the GitHub page public. It has all the KiCad design files and a full schematic in the doc folder. Check it out and if you have any more questions just let me know.
Hi,
thanks by sharing your schematics.
You toke a different approach for the input protection. What I'm used to see in plcs PNP/NPN inputs for PLC is a voltage divider, where the lower resistor is in parallel to the optocouple led them, the phototransistor is voltage compared and the signal goes to the mcu. This is a very simple, reliable and cheap method to protect the inputs.
What I would do for a large voltage range (but not NPN/PNP compatibility, since I do not care about NPN input, since in america/europe continents we almost only use PNP anyway) would make a constant current source for each input, them feed the optocoupler.
What you did (voltage divider them compare them optocoupler) was the first time I've ever seen and I curious why you took this approach.
Greetings, Renan