Trouble with Schimtt trigger settings for varying sinusoidal inputs
You got a lot right.

The basic problem is that the noise is larger than your hysteresis range.  The obvious fixes are to reduce the noise component and increase the hysteresis range.  In this case, doing both seems appropriate.

You say the highest frequency of interest is 20 Hz.  That means you can safely remove frequencies above that since you know they aren't part of the real signal.  Your trace shows significant high frequency noise, which a simple R-C filter should be able to attenuate nicely.

Since your input has about 5 k&Omega; impedance, a 1 k&Omega; resistor followed by a 4.7 &micro;F capacitor to ground should help a lot.  This filter would go to the left of C2.  1 k&Omega; and 4.7 &micro;F has a rolloff of 34 Hz, so won't get in the way of your real signal.  You should see a significant difference in the signal just from this alone.

The next step is to adjust the hysteresis.  You have 220 k&Omega; feedback against 2.35 k&Omega;, so 1.06%.  The output swing is 24 V, so that amounts to 254 mV hysteresis.  Since your minimum amplitude is 1 V, you can double that to 500 mV to get more noise immunity.  The easiest way to do that is to change R1 from 220 k&Omega; to half that or around 110 k&Omega;.

Again, you had the right idea and were actually pretty close.  The only changes are to add a low pass filter on the input and to double the hystersis.

Added

I was in a rush last night when I wrote the answer above.  Now I'm looking at your circuit more closely.  What you have, with the changes described above, should work fine.  However:

R7 and R6 make no sense.  They don't do much harm either, except a little unnecessary loading on the opamp that might not let it swing as far to the rails as it otherwise could.  Get rid of them.

R9 and R10 seem very high.  Are you sure that whatever follows this circuit is OK with the signal having 50 k&Omega; impedance?  I haven't looked up what this opamp can drive, but likely a lot less than 200 k&Omega;.



Added 2

I someone mentioned in a comment that U1 is actually a comparator with open collector output.  In that case you need a pullup, like R7, but a pulldown like R6 still makes no sense.  A opamp or comparator with push/pull outputs would be easier to use.  Then you don't have the assymetric output impedance between high/low of the open collector, making it easier to adjust the hysteresis feedback.

What you have can be made to work too, but you need to think about these issues on your own now.  I've spent enough time on this problem already.