This is a question I managed to solve! But because it took me 2 weeks to find out the issue and write this whole question, I leave it here for anyone that might face the same issue at the future.
Short question: I use this hookup as part of a potentiostat sensor and I am trying to debug a weird behavior of the op amps (R11,R12 placement idea taken from here):
simulate this circuit – Schematic created using CircuitLab
I bias the input of the potentiostat (Poten.Vin) with a sq wave pulse that has a start/end voltage (from -0.8 to +0.8V in reference to my Virtual GND (2.5V), an amplitude voltage, step voltage and frequency. Example screenshot from PStrace software:
where I take samples/measures of the current at Potentiostat Vout for the Ireverse and Iforward currents.
this is the output at Potentiostat Vout:
Two seemingly parallel lines but when they get subtracted, they are not parallel. And I do not understand why the are not paallel, their subtraction shows a pattern of a wave-like behavior. I believe this is something that has to do with the op amp's priciple/functions that I am not aware of.
Long question:
I am making a potentiostat PCB and at the process I am comparing my results with a commercial potentiostat. I have managed to replicate the cyclic voltammetry and chronoamperometry techniques and the results are the same as the commercial potentiostat so I am on the right path.
I am stuck at a point, where I am making the squarewave voltametry technique. There is no real need to know how an potentiostat operates, as I managed to replace the sensor with resistors so that the schematic can be analyzed easier. I will first talk about how I saw the problem in the original schematic with the potentiostat sensor and then I will show how I replaced the sensor with resistors.
This is the electrode/sensor:
What I dont show in the schematic are the decoupling capacitors on 5V and 2.5 voltage rails . I have placed about 10 100uF decoupling capacitors and 5 22uF caps close to the op amps. The C35 is for foltering, without it my output is noisy. I figured out to place C35 by placing capacitos here and there, I am not sure how else I could better filter the potentiostat.
In sq wave voltametry I measure the Iforward and Ireverse currents. The final curve is the result of subtraction of the forward/reverse curves. So in my screenshot I show all of my three curves.
My maximum current is ~the same as the commercial's one, but the maximum point of my curve is pointy, or distorted, but never "curved" as the commercial's one (theoretically, it must be curvy).
data for comparison with commercial potentiostat:
when they overlap:
So I traced the issue in one point: I probed the CE (CE point shown in the schematic as well, its the output of OP-AMP (A)) of the electrode and I noticed that on the Reverse current the voltage does not "behave" as the forward voltage. See below image, the voltage at CE, as the curve rises faster, the voltage at CE, for the reverse current gets distorted:
So at ~2.5V I have a fast rising curve of current and its the voltage that the potentiostat (A)'s positive reference input is.
Apart from CE's "weird/problematic maybe" probing, I didnt see anything weird on the rest of the circuit.
I thought this was an issue with how fast my op amp is so I swapped the MAX4238 op amps with MAX4239. I then needed to change the C35 to a lower value and add a resistor in op-amp B since they would oscillate otherwise. But the circuit still had the same issue. And then I replaced the sensor with resistors based on this paper
My hardware, demonstration of measurement and the sample on the sensor:
Questions:
- How could I debug this behavior to see where its coming from? My knowledge to op-amps theory is limited. I am thinking of placing capacitors around the op amps to see if something changes, for example capacitors between the inputs of the op amps.
- Where do you think this issue comes from? Op amp A or B?