I built the following circuit to filter noisy pulses from a inductive tachometer pickup. The first opamp (U4D) acts as a peak detector. The second opamp (U4C) is a comparator which uses the output from the first as a reference voltage. The positive feedback on the comparator is for hysteresis.
I am getting a lot of noise on the output of the comparator. All of the technical articles I have read suggesting adding hysteresis (which I have already done) or using an actual comparator IC instead. Are there any other ways that I may be able to salvage this circuit?