Problems with a passive network setup used with a microcontroller
You have the capacitor in the wrong place. Try this:







simulate this circuit &ndash; Schematic created using CircuitLab

The key is to make sure that the R-C time constant is a couple of orders of magnitude greater than your sample period in order to get accurate results. As soon as possible after the pulse output changes state, sample both analog inputs and perform your calculation. The values shown give you a time constant of about 0.32 s, and it should be possible to sample the inputs within a few tens of &micro;s.



The above circuit is not simulatable in CircuitLab. Here's one that is:







simulate this circuit

With these component values (mainly the resistors) the voltage across R_chemistry is about 1.5 Vpp (&plusmn;0.781 V).