High side MOSFET issue

to jtw11:
You can not lose the BJT, a Vgs of -7V is ok, but you can not make a arduino pin higher that 5V.
On most digital pins there are so called 'rail diodes' that will 'short' the In-/output pin to the 5V supply if it goes beyond say -0.6V , +5.6V.
The BJT makes an 'open collector' pin that can take say 40Volts.

Like MarkT notes, not all opamps are Rail2Rail, there are many common(lm311) comparators that have an 'open collector' output .