I am trying to sense an input at a pin. I was wondering what the max voltage is that I can safely send to a pin to sense. I would like to send 24VDC for an extended period of time, say 1 hour. Basically when I sense a change at a pin, do code. But the voltage I want to sense is 24VDC. If I need to step it down what is the best solution for that, just a resistor? And what do I need to step it down to, to safely sense it? I really am not interested in what the voltage is on the pin but that there was a change from 0. I guess I would need a “high voltage” relay but in reverse. I would not control the relay with a low voltage but sense a high voltage, engage relay and send low voltage.
Any help would be great.