I'm working on a circuit that needs to interface with the tachometer output of an car engine ECU. The signal is a 0-12V square wave, which I'm thinking I need to step down to put into a digital input pin to count from the Arduino. My initial thought was to run the signal through AC coupling to an analog comparator, and set the supplies on the comparator to 0 and 5V. While this simulates fine in LTSpice, on reading the spec sheets for comparators it appears that having input voltage much above the source voltage isn't a normal mode of operation.
Does anyone have experience interfacing large-ish signals to logic-level circuits?
I liked the comparator solution because it worked largely agnostic to the waveform or offset, but I'm open to anything that will work with my 0-12V square wave.