Reading A Frequency

Indeed, the time-between-zero-crossings algorithm will generally give erratic results for complex signals. Indeed, the OP reports getting erratic results. But, that doesn't mean his hardware works. We certainly haven't seen anything that verifies it - something like a listing of analog samples from acquired from a known input signal.

Here's why I think it doesn't work:

  • The impedance of the analog offset circuit is so low that the op amp can't develop much voltage into it.
  • There appears to be only one connection between the microphone, or other signal source, and the circuit. I don't see how that can act as a signal source; rather, I'd expect it to act as an antenna for power frequency interference. I'd expect to see, say, a signal input and a ground connection.
  • The OP reports that he has connected the ground wire of the signal source to the op amp's input.

I think that the project, as shown in the last fritzing diagram posted by the OP, won't accurately acquire analog data from the signal source. That's not to say that the project would work if analog acquisition worked - it's been thoroughly discussed here that it won't. If the acquisition portion of the project worked perfectly, it's not unlikely that the results would be indistinguishable from what the OP reports.