Do you want to protect against ESD or do you want to protect your inputs from higher than 5V at the input. If you want to protect against ESD, anything above the maximum allowed voltage on the contacts should be shorted to ground. There are TVS diodes for many different voltages, so you could choose one for maybe 15-20V or even 30V. That way the 12V will not be passing through it at all, and only high-voltage transients will be shorted to ground. If you want to limit your input to 5V regardless of the voltage coming in, you could use a medium value resistor like 100-1000 ohms in series, and then a 6.2V zener across the signal line (between the positive end and the ground). You could also place two such zeners back to back to protect against over-voltage of both polarities. <!-- Begin schematic: In order to preserve an editable schematic, please don't edit this section directly. Click the "edit" link below the image in the preview instead. --> ![schematic](https://i.sstatic.net/zTotf.png) <!-- End schematic -->