In an industrial-like environment, it is necessary to apply strong filtering to the inputs. With the following circuit, we have:
- Strong pull-down, 645 Ω
- 14 mA of wetting current for the contact
- 33 kΩ isolation between the input pin and the external world
- RF bypass capacitor and debounce with a time constant > 3 ms.
- 9 V for the contacts to minimize interference with the 5 V logic section.
NOTE: in this case, configure the pin as INPUT, not INPUT_PULLUP
