Why a Texas Instruments TLV3702 Comparator?
Sensor R1, potentiometer R12, and the comparator are all connected to 5V. Therefore, the comparator needs to be able to measure voltages up to 5V. Sadly, older comparators could not make comparisons in the top 1.5V of their supply voltage (which would limit the inputs to 5V – 1.5V = 3.5V in that case). Newer comparators that overcome this limitation are said to have “rail to rail” inputs. That is, they can do comparisons on voltages from the low rail (0V) to the high rail (5V or whatever the comparator supply is).