I have a current source consisting of a 100Hz sine plus a DC offset: \$I=I_{DC}+I_{AC}\cdot\sin(2\cdot\pi\cdot 100Hz\cdot t)\$ with \$ I_{DC}\approx100uA\$ and \$I_{AC}\approx 1uA\$.
I would like to extract the AC signal and rectify it to get a digital output (rectangle) signal with a frequency equal to the modulated current. The phase may be shifted, but the shift should be constant. The circuit should consume as little power as possible and work from a single supply rail of \$ V_{SUP}\geq 1.8\$.
My idea was to have a shunt resistor (R_SHT) between the current source and GND to convert the current to a voltage. This voltage is then high-pass filtered to remove the DC component. Finally, an OPAMP comparator rectifies the AC voltage. I used a low power rail-to-rail OPAMP with low offset voltage (TI LPV821). Here's the schematics:
simulate this circuit – Schematic created using CircuitLab
After soldering the circuit, I don't see the expected rectangular output voltage. Instead, the output is drifting slowly between the supply rails, occasionally exhibiting the 100Hz input signal.
Is the proposed circuit generally suitable to achieve my goal of converting the modulated current to a digital signal?
Are there any obvious problems with the circuit, that may lead to the observed drifting behavior?
Are there better alternatives to achieve my goal while consuming similarly little power (\$ \approx1uW \$)?
Thanks for your input.