Sorry, this is long, but hopefully worth it to you.
600mV pk-pk is really generous, lots of signal. I've been playing around with a sim of the x200 gain, all in the quad OPAMP circuit I discussed a couple of posts back on the assumption the input signal would only be +/-5mV, and it was looking pretty good.
You don't want more than about 3V pk-pk after any amplification,(in general, assuming 5V supply), to leave enough headroom to avoid clipping all the way up to the comparator. If one is going to clip the signal, better to do so deliberately in a carefully considered fashion rather than by overdriving an amplifier that wasn't expected to clip.
For signal level comparison at the comparator:
* The LM393 comparator I mentioned and linked above is specified to work with as little as 5mV of overdrive (i.e. amount past the threshold) on a 100mV step signal, and still deliver a typ. 1.3us response time, so working with a +/-50mV signal is well within its capabilities.
* The ATmega328P on chip comparator has the following specs, (at Vcc=5V, Vin=Vcc/2 unless otherwise stated):
- VACIO Analog Comparator Input Offset Voltage typ. <10mV max. 40mV
- IACLK Analog Comparator Input Leakage Current
min. -50nA max. 50nA - tACID Analog Comparator Propagation Delay
at Vcc=2.7V typ. 750ns, at Vcc = 4.0V typ. 500 ns
so is able to comfortably handle a +/-300mV input signal. Assuming its a sinewave, and neglecting the propagation delay, the max. 40mV input offset would only give a phase error of 7.7 deg, and the expected 10mV or less, under 2 deg.
It does sound like your preamp lineup is working more by luck than good judgement. A gain of five would give you 3V pk-pk from your +/-300mV input signal, which would be trivial to achieve in a single OPAMP with AC coupled input, then straight into the MCU's on-chip comparator (or an external one). That should work reasonably well even if the input signal drops by an order of magnitude.
However I think we are still putting the cart ahead of the horse:
What does your input signal actually come from and what does it represent? (in case there's an obviously better way to skin the cat!)
How well characterised is your input signal? i.e. What's its:
- Min.and Max. frequency?
- Min. and Max. amplitude?
- Waveform?
Does it have high or low frequency noise that needs to be filtered out? (if so, what's the expected noise level?)
How are you measuring the frequency? e.g. counting rising edges within a time interval,
or timing one period (e.g. rising edge to rising edge), then computing the reciprocal toget the frequency.
Are you doing it purely in software (apart from maybe an edge triggered interrupt), or do you want to use a hardware counter (and possibly input capture events) to offload most of the work from the CPU?
Lastly, what potentially useful parts do you actually have on hand? e.g. single, dual or quad OPAMPs and/or real comparators suitable for 5V single supply operation. Resistor selection: E24 series, E12 series or worse. Capacitors are generally less critical except in timing or resonant circuits, and anything within an order of magnitude will often do.