hi, how do you read/detect an input voltage spike?
I'm building a sensor to check if my dog gets in/out to the house using the backdoor. So I have an IR sensor with 3 wires (DC12v, GND, OUT) that I bought online. I notice that OUT pin has a 12v by default and it will become 0 when someone or something is standing in the sensor. I build a voltage divider (3v) so that I can put it as input on my GPIO. I know how to detect the high (3v) or low (0v) but I can't detect a voltage down spike when my dog runs into my sensor. the sensor will just read in between 12v to 11v.
What is the best approach on this and how should i wire the output pin? thanks for the advice.