Hi, I'm using LM311 zero cross detector as shown in LM311 datasheet.
After breadboarding the circuit and testing it I got the following result. (Since I couldn't save the oscilloscope image I drew one to show you what the problematic waveform looks like. All the pulses are periodic even though I forgot to draw several pulses to the right of the image).
The less-wider pulses are right on the zero cross, but they appear to be only several micro-seconds wide. The larger pulses are several millisecond wide but start almost half a millisecond after zero cross and end half a millisecond before the next zero cross.
Now I would idealy like to detect the smaller width pulses as they are right on the zero cross. But considering their width I am not sure if the microcontroller's external interrupt (16F877 RB0/INT) is going to pick them up!
What can I do about this problem? This happened to me before, but then I was building projects where the accuracy of zero cross detection was not as important.
Can perhaps a shmitt-trigger detect this pulse correctly? Or do you guys know a zero cross circuit with much better precision?
Thank You
After breadboarding the circuit and testing it I got the following result. (Since I couldn't save the oscilloscope image I drew one to show you what the problematic waveform looks like. All the pulses are periodic even though I forgot to draw several pulses to the right of the image).
The less-wider pulses are right on the zero cross, but they appear to be only several micro-seconds wide. The larger pulses are several millisecond wide but start almost half a millisecond after zero cross and end half a millisecond before the next zero cross.
Now I would idealy like to detect the smaller width pulses as they are right on the zero cross. But considering their width I am not sure if the microcontroller's external interrupt (16F877 RB0/INT) is going to pick them up!
What can I do about this problem? This happened to me before, but then I was building projects where the accuracy of zero cross detection was not as important.
Can perhaps a shmitt-trigger detect this pulse correctly? Or do you guys know a zero cross circuit with much better precision?
Thank You