??? 11/14/09 02:18 Read: times |
#170788 - Zero-crossing detection isn't suited... Responding to: ???'s previous message |
Richard said:
Normally one would resistor-divide the mains voltage and ac-couple it into a Schmidt-trigger, and enable its interrupt 16.6 ms (not precisely 1/60 second, or in your case, 1/50 second) ms after each count, then disable it immediately once it occurs. Yes. A scheme using a simple, passive "r-c-r-c" low pass filter, ac-coupled to the secondary winding of mains transformer and followed by a Schmitt-trigger with rather high threshold and big hysteresis will give good results. The idea of the low pass filtering is to suppress harmonics and noise due to switchings, etc., which could cause additional mistriggerings. The Schmitt-trigger with high threshold and big hysteresis shall guarantee, that it's one full-wave of mains that is triggering the Schmitt-trigger. The detection of zero-crossings, on the other hand, is not a proper method to detect the mains frequency. But you are right, these details aren't of so much importance for a student project. Kai Klaas |