How to detect a capacitor installation
Use  a circuit like this the cap should be discharged on insertion which will pull down the input to the buffer creating a wake up signal.
If the resistor will interfere with your measurement you can compensate for its presence in the software.



simulate this circuit &ndash; Schematic created using CircuitLab