cheali-charger
cheali-charger copied to clipboard
Huge battery resistance dropout in one second - software bug or physical phenomenon?
Charging alkaline AAA cell using 2S 1000mAh NiMH charging program (at 100mA current) in original Imax B6 i noticed charging current increase and then huge battery resistance drop.
Here is part of serial log showing the issue:
$1;1;4752.9;2000;97;127;19;18;0;0;19066;0;0;0;0;0;0;528;0;0;0;0;0;23900;0;0;0;10 $1;1;4753.7;2000;97;127;19;18;0;0;19066;0;0;0;0;0;0;528;0;0;0;0;0;23900;0;0;0;5 $1;1;4754.4;2000;97;127;19;18;0;0;19066;0;0;0;0;0;0;528;0;0;0;0;0;23900;0;0;0;1 $1;1;4755.2;2001;97;127;19;18;0;0;19066;0;0;1;0;0;0;528;0;0;0;0;0;23900;0;0;0;6 $1;1;4756.1;2070;141;127;29;18;0;0;19066;0;0;0;0;0;0;528;0;0;0;0;0;23920;0;3;446;63 $1;1;4756.9;2086;144;127;30;18;0;0;19066;0;0;1;0;0;0;528;0;0;0;0;0;23920;0;4;61248;58 $1;1;4757.7;2093;145;127;30;18;1;0;19066;0;0;1;0;0;0;528;0;0;0;0;0;23920;0;4;61248;49 $1;1;4758.6;2095;144;127;30;18;0;0;19066;0;0;0;0;0;0;528;0;0;0;0;0;23920;0;4;61248;56 $1;1;4759.3;2096;144;127;30;18;0;0;19066;0;0;1;0;0;0;528;0;0;0;0;0;23920;0;4;61248;62 $1;1;4760.2;2099;144;127;30;18;0;0;19065;0;0;1;0;0;0;528;0;0;0;0;0;23920;0;4;61248;57 $1;1;4760.9;2099;144;127;30;18;0;0;19065;0;0;1;0;0;0;528;0;0;0;0;0;12940;0;4;61248;54 $1;1;4761.8;2100;144;127;30;18;0;0;19065;0;0;1;0;0;0;528;0;0;0;0;0;12940;0;5;56514;60 $1;1;4762.5;2100;144;127;30;18;0;0;19066;0;0;1;0;0;0;528;0;0;0;0;0;12950;0;5;56514;48 $1;1;4763.4;2100;144;127;30;18;0;0;19066;0;0;1;0;0;0;528;0;0;0;0;0;12950;0;5;56514;48 $1;1;4764.2;2101;144;127;30;18;0;0;19066;0;0;1;0;0;0;528;0;0;0;0;0;12950;0;5;56514;48
Is it software bug or physical phenomenon?
Why charger did increased charging current from 97 to 144mA?
Attached full charger log and visualized chart for it.
alkaline_1.txt
could you get me your eeprom.bin from your charger (with the "program" you used)? And which exactly firmware file are you using?
First log was captured with https://github.com/S-trace/cheali-charger/tree/master
Then i upgraded to https://github.com/S-trace/cheali-charger/tree/develop (based on release v2.01) but issue is still there.
Here is new log and chart captured on https://github.com/S-trace/cheali-charger/tree/develop firmware and another battery:
alkaline_2.txt
Here is EEPROM (read from charger running on 2.01 firmware with my patches):
eeprom_issue_217.hex.txt
I used 8th program (NiMH 1000mAh/2),
hm...
Huge battery resistance dropout in one second - software bug
I would say there are (potentially) 2 bugs :/
-
"increased charging current from 97 to 144mA": NiMH charging "strategy" is in: https://github.com/stawel/cheali-charger/blob/master/src/core/strategy/DeltaChargeStrategy.cpp#L46-L86 we only set the charging current in line 55 (set tu maximum (desired) current when battery voltage gets above discharge minimum level) even if you've set Vdischarge to 2V (not sure yet,I have to check your eeprom), I'm not sure why the current is 144mA.
-
"then huge battery resistance drop": we normally only update battery resistance when there is a "huge" change in current flow, in your case there is a "huge" change in current but your battery resistance changes all the time (It should only change at the begging and during this 97mA->144mA change). We also have a "Rwire" - wires resistance - this one is updated constantly, but has only some real meaning when you connect your battery to the balance port. (maybe they are somehow swapped)
I will have to do some tests, maybe I will find what is going on, unfortunately it won't until weekend.
By the way, nice gnu plots! if you would like to add your gnu plot scripts to the project, It would be great :)
even if you've set Vdischarge to 2V (not sure yet,I have to check your eeprom),
Vd was set to 1V/cell by default (and as for 2S battery there is Vd == 2V) and i did not touched it. And there is Vco also set to 2V in program settings. But i did not expected that discharge settings may somehow affect charging process.
By the way, nice gnu plots!
Thank you! ^_^
if you would like to add your gnu plot scripts to the project, It would be great :)
Here is the gnuplot-qt script i used:
set key left top
set xlabel "Time, min";
set xrange [0:*];
set xtics 10;
set mxtics 10;
set ylabel "mV, mA, mAh, mWh";
set yrange [0:2500];
set ytics 100;
set y2label "mOhm";
set y2range [0:25000];
set y2tics 1000;
set grid xtics ytics mxtics linetype -1 dt 2, linetype 0 dt 3
set datafile separator ";";
plot 'alkaline_4' using ($3/60):4 with lines title "Voltage, mV", \
'alkaline_4' using ($3/60):5 with lines title "Current, mA", \
'alkaline_4' using ($3/60):6 with lines title "Capacity, mAh", \
'alkaline_4' using ($3/60):24 with lines title "Resistance, mOhm" axis x1y2, \
'alkaline_4' using ($3/60):($8*10) with lines title "Energy, mWh"
alkaline_4 is data log file name (normal), yrange and y2range needs to be adjusted to match battery and y2range should be must be divisible by yrange (and y2tics must be divisible by ytics) to get nice plot.
Here is another example script i used for 6Ah 1S Li435 battery:
set key left top
set xlabel "Time, min";
set xrange [0:*];
set xtics 10;
set mxtics 10;
set ylabel "mV, mA, mAh, mOhm";
set yrange [0:6000];
set ytics 250;
set y2label "mWh";
set y2range [0:24000];
set y2tics 500;
set grid xtics ytics mxtics linetype -1 dt 2, linetype 0 dt 3
set datafile separator ";";
plot 'battery6000_3' using ($3-90)/60:4 with lines title "Voltage, mV", \
'battery6000_3' using ($3-90)/60:5 with lines title "Current, mA", \
'battery6000_3' using ($3-90)/60:6 with lines title "Capacity, mAh", \
'battery6000_3' using ($3-90)/60:24 with lines title "Resistance, mOhm", \
'battery6000_3' using ($3-90)/60:($8*10) with lines title "Energy, mWh" axis x1y2, \
'battery6000_3' using ($3-90)/60:($26*10) with lines title "Percentage, %"
90 is the start time for plot in seconds (there may be more than one charging/discharging cycle in one log, so we may need to set start point for plot) set xrange [0:*]; is time range for plot (we may need to plot only limted part of log, so replace * to process time (in seconds) which we want to plot). Here is description for every field in log line: Loglevel;Program;Time,sec;Vbattery, mV;Icharging, mA;Capacity, mAh;Power, W/100;Energy, Wh;Textern;Tintern;Vinput, mV;C1;C2;C3;C4;C5;C6;R1;R2;R3;R4;R5;R6;Rbatt, mOhm;Rwires, mOhm;Estimated, %;ETA;CRC
Power in W/100 is a bit confusing, maybe it will be better to output pover value in mW, like other values?
Thanks for the scripts I willa add them to /utils/"something" :)
Power in W/100 is a bit confusing, maybe it will be better to output pover value in mW, like other values?
it's not only Power where we have a 1/100 factor, see: https://github.com/stawel/cheali-charger/blob/master/utils/cheali-logviewer/chealiparser.py#L14-L17
we use such a factor to be able to hold a reasonable value in a uint16_t type.
ok, I finely found time to look into your eeprom.
Regardless the 97mA->144mA jump - it looks like your current calibration is wrong. Please calibrate you charging current again. (I'm guessing during 50mA calibration you probably pressed "START" too soon, before charging current stabilized - or you accidentally fast pressed "START" twice).
When it comes to the battery resistance, there is a bug in the firmware, (resistance should not constantly change) - I'm still investigating.