I don't understand how a bleed resistor could solve that. Furthermore I want to get reasonable precise capacity values by integrating the current over time. For this any unmeasured current will increase my error quite a bit.
i
The OP AMP output is not governing the "jump".
There is no "jump" . That's the battery charging current reducing to "0".
Whether you understand it or not, as long as you refuse to add the bleed resistor your results will remain the same, regardless of anything else you do. As I already stated, the battery or batteries only constitute a "LOAD" in so much as they need charging. Once they are charged, they no longer present a load to the op amp and the op amp see's "
no load" and the output oscillates at the last 10 - 15 mV. Adding a bleed resistor ensures that the op amp sees a load and the output will be whatever the charged voltage is because the bleed resistor current with respect to battery current is negligible and it should be obvious that once the battery is charged the charging current approaches 0 mA. Attempting to measure the charging current during the last 0.4 % of the charging cycle is a futile endeavor and you are wasting your time. Your circuit is complete. Just add the bleeder resistors and you should be done. (you may need to experiment a little with the value)
Also , you can't charge batteries in series because when one is charged it will stop conducting current. (that should be obvious) Thus the remaining battery will not get any charging current. (which is no doubt linked to your "problem") ( the op amp output is "floating" because there is no load after one of the batteries is fully charged) Remove one battery and replace it with a load resistor. The current is the same through the resistor and the remaining battery.
The load resistor needs to drop 1.4 V @ 80% of charging current
R = 1.4 V/ I
chargingIt's the most basic law (Ohm's Law) of electronics.
Current is a function of Difference of Potential and resistance. If the sum of the two batteries is the same as the charger output no current will flow.
At some point the current and difference of potential are so small there is nothing to pull down the op amp output and starts to "float" . What you are calling a "jump" (as if it shouldn't occur) is the battery's natural way of telling you one or both batteries are charged and no current is flowing. If you simply accept that fact you can stop collecting data at that point and call it "charging cycle complete" indication. Otherwise, if you refuse to accept the obvious you can add the "bleeder " resistor, starting at the higher value and adjusting value lower until the "jump" disappears.
Also it cannot be the cell because the "jump" also occurs with other cell chemistries, following the same pattern. The start of the "jump" varies a bit (2.43V - 2.443V) but the upper value is always 2.46.
That should tell you something, like , basically, any rechargable battery will no longer present a load once it's charged and your op amp will float and oscillate because it sees no load. (how can it with no difference of potential ? How can the output be pulled low if there is no current ? The only way to pull the output down when the battery is fully charged is to apply a lower voltage and start discharging the battery by sinking current instead of sourcing it. There are no other "options" You are either sinking current (discharging the battery), or sourcing it (charging the battery). You could alternate between the two to keep the voltage at some setpoint but if you simply command the op amp to an output voltage that is exactly the same as the sum of the two batteries, there will be no difference of potential and therefore no current. It's as simple as that.
I can't believe how much you are making of a 15 mV fluctuation when the battery is charged. It's not showing up on your meter because it is averaging.
Try changing your code to take 10 to 20 readings and average them and print only the average."Jump" = (2.47V-2.45V) = 0.020 V
(@0.00488 V/ per analog count, this is 3 counts)
Based on the step size of the voltage steps, the "jump" appears to be 3 "steps" or analog counts (3*0.00488 = 0.01464 V) or just under 15 mV.
To call a 15 mV voltage change in a 0 to 2.47V range a "jump" is just ludicrous ( because it represents a 0.4 % voltage change)
Total Charged Battery Voltage = 2.47 V
"Jump"(%) = 100* (0.015 V/2.47V)
= 0.59 % I'm curious. How did you plot your readings ?
Did you use a Terminal Capture software and copy and paste into Excel ?
@MarkT: Decoupling sounds interesting. However I have no idea how to do this. Would you mind giving me an example or an online link for that? Also suggestions how to make the circuit more robust would be nice.
Google "decoupling caps"
It's just a fancy name for a cap that shunts high frequency noise go ground based on the capacitive reactance (Google "capacitive reactance " and do the math for "Let f = 100000, f = 10000, then f = 1000 and compare the three. What does that tell you about what the cap is doing ?. )