MOS circuit for RC circuit power
Q1 and the 1K resistor are mainly there in case
\$Vdd &gt; V_{in_{HI}}\$.

The PMOS, Q2, requires:


\$Vgs \ge 0\$ to turn off
\$Vgs  &lt; 0 \$ to turn on


In other words, drive the gate LO to turn it on and drive it HI to turn it off.

But there are two problems if your try to drive Q2's gate directly with Vin while \$Vdd &gt; V_{in_{HI}}\$:


Vin cannot drive the gate gate high enough so \$Vgs = 0\$ so the PMOS turns off.
Q2 has limits to how much |Vgs| can be applied before it blows the gate. So when Vin drives the gate low, it might exceed the maximum Vgs because \$Vg = 0V\$ and \$Vs = Vdd\$, so \$Vgs = 0V - Vdd\$.


The first problem can be fixed by tying the gate of Q2 to a pull-resistor so that if left floating, the gate is tied to Vdd so Vgs = 0V and Q2 turns off, and then driving it with an open-drain output. This is where Q1 comes in. It converts the push-pull Vin output to an open-drain output.

The second problem is to not exceed the maximum |Vgs| when you pull Q2's gate to LO to turn it on. It is most convenient to pull it to GND, but if pulling it to GND would fry it, then you have to limit the voltage somehow. You can use zeners, but in this case they use a resistive divider. However, your 1K-100K divider resistors are sized inappropriately for this task. It would be practically pulling it to GND.

If Vdd = \$V_{in_{HI}}\$ you could drive Q2's gate directly.



Also, it would be easier to swap the positions of your capacitor and your load. That way you don't need a differential amplifier anymore and could just use a ground referenced amp to measure the capacitor voltage.