how to use rpm sensor where frequency and amplitude of output varies [SOLVED]

Thanks for the explanation dc42.

About your circuit, I didn't understood the diodes protection very well.
You connected two diodes "inverted" to each other between the comparator inputs?
Isn't it just like wiring the inputs together? How does that work?