One option is to use optocoupler, can I instead use voltage devider to lower 12V signal to 5V (for instance R1=10k and R2=7k) + diode to cut off the voltage peaks above 12V?
I know nothing about diodes, I start reading in wikipedia and if I am getting right I need zener in reverse biased with Vz of 5V. Maybe this one BZX55C4V7?
I know nothing about diodes, I start reading in wikipedia and if I am getting right I need zener in reverse biased with Vz of 5V. Maybe this one BZX55C4V7?