You could also use a TLV7211 which is a single CMOS comparator that has rail-to-rail inputs and push-pull outputs that would run on a single 5v supply.

For a voltage reference from a 5v supply, you could use a 1.5k current limiter resistor in series with a couple of forward-biased 1N5817 Schottky rectifier diodes to give you around a 270mV reference for the - input, and put your signal on the + input. If you wanted some hysteresis, put a 1k resistor between your signal and the + input, and connect a 1meg resistor from the output to the input.