How to convert variable frequency small AC signal to square wave
Here's my $500 design using $1 in parts on a perf board.  All balanced with STP cable and decoupled with Vdd cap not shown. Single supply CMOS OA  high Gain &gt; 110 dB Rail to Rail. GBW=15kHz
The simulator differentiates a sweep signal of 60 mVpp from 1.7 to 166.7 Hz to output ~ 6Vpp max. (Lower for margin)
Then the desired response is a LPF with 50 dB gain to square up the 60 mV signal with balanced positive feedback ratio to suppress noise. I assume you use good EMI practice and use STP cable.
It requires a Vdd/2 DC bias on the signal source for single supply use.
I used 2.5 assuming 5V , but you can use 3.3V/2 all the way down to 1.6V/2.. It's not critical for the value, but it must be low impedance buffered.
Feel free to ask questions. It's a balanced negative and positive feedback amplifier with a 10M/10k Ratio to a common C differential LPF to the breakpoint.

If you have noise issues , two 1% caps to gnd (matched) 1 on each side of input after 10k.