Guys,
I am trying to use zcd to get the frequency of ac current , say 200v . I am using arduino uno. Could you all help me on how to design the circuit and the may to count zero crossings and get the frequency.
With 200V, you'll need to isolate the Arduino (and yourself) from the lethal voltages.
If you are talking about power-line frequencies, the easiest way to do that is with a step-down transformer. Then, you'll probably need to step-down the voltage a little more with a voltage divider, and you'll need a bias circuit because the Arduino can be damaged by the negative half of he AC waveform (or by voltages greater than +5V). The voltage divider and bias circuit are both made with resistors so these circuits can be combined.
It might also make sense to add some "protection diodes" if voltage can go higher than expected (because the secondary of the transformer is proportional).
If you have other frequencies (where a power transformer won't work) you can use optical isolation. [u]Here[/u] is a circuit Google found.
...and the may to count zero crossings and get the frequency.
The micros() function be used to find the number of microseconds between two "events". (Actually, you have to read micros() twice and subtract to find the difference between the two readings.)
Remember, since the Arduino's analog-to-digital converter can't read negative values, you'll have to subtract-out your bias out of the ADC reading before finding point where the voltage goes from negative-to-positive,and vice-versa.