is there a function triggered by certain input voltage change?

i knew it was possible!
the solution looks complex but possible to my situation.
thank you!