Turn the spdt
Once the capacitor is charge turn the spdt . It will maintain constant voltage across capacitor without the source
.
It is producing a constant current(small in mA range ) across 1 ohm resistor or voltage(in mV range ) even after been didconnecting with the source . Which can be further amplified for use.