In Reply to: Finding 0 voltage in analog signals posted by Corry on 01/22/02 at 5:22 PM:
Just a few thoughts on your problem:
I'm wondering how you are connecting to the alternator device, because this will have a big influence on the probability of noise pickup. If there is noise, this could cause false triggering of the 0V detector.
I guess that you have two wires coming out of the alternator device, and the sinusoidal signal voltage is developed across these two wires. If one of these wires connected to the vehicle chassis, so that the chassis is used as the 0V reference, you'd certainly be prone to noise generated by other electrical loads in the car.
A better scheme is to bring both wires into the '+' and '-' inputs of a comparator, thus sensing the 0V crossings directly without chassis-bourne interference. On the '+' wire or '-' wire (it doesn't really matter which), you'll need to connect a potential divider (two resistors) to bias the sinusoidal signal level to the middle of the comparator's input range.
What is the peak to peak amplitude of the signal from the generator? If this is likely to exceed the input range of the comparator (the actual range will depend on the supply voltage you're using) you will need have some form of voltage limiter between the generator and the comparator. See Russ Kincaid's reply to Adam Webster on this forum for one way to do this.
Hope this helps,