Hi, I monitor gas and water usage at my home using dry contact / reed switch / open drain inputs from the utility meters, long wires, and then ESP32.
Controller supply voltage is 24VDC, switching converter to 5V (or USB for programming), then LDO to 3.3V.
One of the new meters I am testing is electronic with an open drain and max 12V, so I cannot use the 24V in pull-down mode, I will use 5V instead.
I am redesigning my controller, and looking for design ideas on minimizing interference when running long wires, and converting from 5V to 3.3V LVTTL.
My old design ran for years with a simple pulldown directly to the ESP32 input, but, it took some fiddling to do proper debounce in code, looking to improve the design.
I am considering:
1) Opto with LVTTL Schmitt trigger output, e.g. H11L3.
2) RC low pass input to LVTTL Schmitt trigger, e.g. SN74LVC2G17.
Both devices have "some" ESD protection, and the inputs are passive, so I am not planning on adding any additional reverse polarity/ESD protection, or should I?
Any suggestions for known reliable designs to use for such pulse detection over long wires (not too dissimilar to an alarm system less the tamper detection)?
Attaching an example schematic with two options.