I am doing a project in which i have to measure frequency of 3 phase. I am using arduino mega 2560. How many timers should use to do this? could anyone please guide me. I also have to find power factor. I am thinking of using a zero cross detector(ZCD). So 6 ZCD's for each phase voltage and current.
I am very much jumbled up with arduino timers now. Please help
You don't need to use timers directly. 50/60Hz is slow enough to sample pin inputs and keep track of time with millis(). But for a frequency reference, you need an RTC. The clock frequency on a Mega comes from a ceramic resonator, not a crystal.
But a zero crossing detector doesn't measure voltage or current.