... Well this isn't good.
The MAX40026 comparator I'm using on the inputs specifies a common mode voltage range of 1.5 to Vcc.
And my frontend has a 2:1 attenuation.
Experimentally, if the input voltage is a 0-2V squarewave (0-1V after attenuation), it works fine with a threshold of 850 mV but with a 750 mV threshold it stops working (constant output even if input is still toggling above/below the input).
What are the odds of being able to find a suitable pin-and-supply-compatible comparator with a wider common mode range that fits the same footprint? If not I'm gonna have a lot of rework to do.