I have a rotating flywheel with an inductive pickup and a magnet passing in front of it a couple of times per rotation. The signal looks like this for low speed inputs of the rotor:
Apologies for the lack of scale. Y is 50mV per division, and X is 0.5s per division. At higher rotation speeds, the pulse amplitude rapidly increases up to and beyond 1V positive and negative swing.
My goal is to detect the pulses by turning them into a 3v3 TTL pulse so they can be used by a microcontroller GPIO.
I found what I thought was a suitable comparator circuit:
The comparator circuit uses the anti-parallel Schottky diodes to limit the swing of the input voltage, as the input pulse varies in proportion to the speed of the rotor.
I simulated this circuit in LTspice, to reasonably good results. I used a sine wave source as a stand-in for the pulse signal. The simulation shows the following results:
Unfortunately, the circuit wired up IRL, just gives me a constant output high for the shown input signal.
I know there may be cheaper/easier/better/more standard ways to do this, but I would be interested to know why my approach has failed.
Thanks!