I’m a bit stuck on a preexisting circuit which I cannot get to work on a single Arduino interrupt.
Maybe someone could be so kind to give me a little guidance, I’m obviously missing something basic there.
I need to trigger (a change interrupt) whenever the signal is changing between:
[unconnected / +12V] and [GND].
“unconnected vs GND” is easy to realize in INPUT_PULLUP, however the third state, +12V, is problematic.
I’ve attached a picture to visualize the problem:
Normal operation is Switch to GND and Reed closed.
Whenever the switch is on +12V OR the Reed contact is open, I need to trigger the interrupt.
A few attempts with voltage dividers and transistors weren’t convincing, that’s why I’ve decided to ask if anyone has an idea how to make the circuit work with least parts.