- The input waveform is a 6 Hz square wave that is 3.25 volts peak to peak
- The output waveform is a 6 Hz square wave that is 5 volts peak to peak
I'm assuming this means your square waves have as low voltage 0 V (i.e. VSS potential), and 3.25 an 5V as high level, respectively. "Square wave with a Vpp" is a bit ambiguous, because it doesn't say anything about the average voltage. Your opamp's lowest possible output voltage is Vss+Voffset, and in a good approaximation that's VSS=0V.
Is the primary reason to build a comparator using a voltage divider on the (-) input to set a threshold voltage (2.5 volts, in this case), preventing stray signals from triggering the output? (My intuition and very foggy memory says "Yes"). If so, is there any other reason to do so?
The motivation is to use a selectable voltage (defined by the voltage divider) as comparison threshold. This doesn't fulfill the role of hysteresis or similar, so not quite sure where "stray signals" come into this.
If you want a level shifter with Schmitt trigger, it's probably wisest to just buy one; in fact, you can buy speciality level shifters like the especially promising SN74LVC1T45 that can pretty much be adapted to arbitrary voltages, or you can just get a 74xx logic family IC that accepts your voltage range of interest and outputs a suitable voltage range on its output (with your voltages, 74HCTxx is probably the go-to family). Pick an IC that has Schmitt trigger inputs if you're in for the extra noise immunity.
Your first circuit is highly problematic: your threshold voltage
is the negative input voltage. Not many opamps support that – typically your input voltages need stay at least a couple mV away from your supply voltages. Depends on your Opamp! What you'd need is a
Rail-to-Rail input opamp; since
input is usually the harder part, the abbreviation
RRIO is what you'd look for.