Calibration without battery pack?

1,760 views
Skip to first unread message

Stephan Klein

unread,
Nov 28, 2013, 2:52:10 AM11/28/13
to cheali-...@googlegroups.com
Hello,

is ist possible to calibrate the charger without a battery pack?
For the original firmware i used a high precise power source, six 100ohm resistors in series connected to the balance port and a Fluke multimeter .
Voltage calibration should be possible with this resistor and power source as "battery pack". "I discharge" should also be possible, but how to calibrate "I charge"? 



Nagy Jozsef

unread,
Nov 28, 2013, 6:32:41 AM11/28/13
to cheali-...@googlegroups.com
on my opinion yes(voltage calibration).
Current? Simple 3.5 digit multi-meter.





I do so.
any current meter
BM6 battery monitor (very accurate 0,005V)
and selfmade 6 cell balancer "y" cable (2 female, 1 male JXT conn.)
any 6 cells battery.





Jozsef

Stephan Klein

unread,
Nov 28, 2013, 7:50:18 AM11/28/13
to cheali-...@googlegroups.com
The main Problem is, that i have no 6 Cell battery pack, 
Is it necessary to connect a 6s LiPo `to calibration current? Or is it possible to use a Pb-Battery. If i'm right, i only need load on the charger connector? (I charge calibration)
On the other hand when calibrating discharging current (I discarge), will a Power Source connected to the charger connector sufficient?


Nagy Jozsef

unread,
Nov 28, 2013, 2:15:14 PM11/28/13
to cheali-...@googlegroups.com
for charge and discharge calibration not need 6s lipo.
12V Pb good. or 3s lipo.
no connect any PS for charger side connector.

Paweł Si

unread,
Nov 28, 2013, 7:39:47 PM11/28/13
to cheali-...@googlegroups.com
I personally use only a 3-cell battery to calibrate my charger,

You can use what ever you like to calibrate "I charge", even some power resistors,
but berrying in mind that the output voltage should be smaller then ~25V
(when the output current is ~1A)


even if you don't calibrate the charger it will still work,
but the displayed values will have a bigger error.



On the other hand when calibrating discharging current (I discarge), will a Power Source connected to the charger connector sufficient?

It should work but the power source 
should be galvanically isolated from the charger.

Paweł


 

Hans Schmitd

unread,
Dec 10, 2013, 2:39:05 PM12/10/13
to cheali-...@googlegroups.com
I am a little confused. When I try to calibrate with less than 6 cells, the charger claims a small residual voltage on all the remaining terminals (usually a fraction of a volt each).
Is this affecting the results? Have I missed something?

Connecting up just now I have the following (the first figure is shown on the charger display; the second is measured with a multimeter):

Vin   17.704V  16.779V
Vb1   4.040V   4.032V
Vb2   4.014V   4.011V
Vb3   4.038V   4.035V
Vb4   0.088V  
Vb5   0.062V
Vb6   0.043V
V1-6   12.092V   12.084V
Vout   12.075V

What is Vin? I assume it is the voltage across the power supply at the power jack. I have measured from the black battery socket to the positive terminal on the power jack, as
the negative terminal is not readily available - as far as I can tell it is the same thing.
What is V1-6? I assume it is the voltage across the -ve to +ve terminals of all the batteries connected, however many they may be. This is obviously also the voltage across the
red and black battery terminals on the charger (provided these are connected, which I understand they have to be anyway).
Then what is Vout???

Most of the time - with rare exceptions - I have always had V1-6 and Vout  giving the same value, but the above results show different values.

Note that I calibrated the charger a few days ago with a rather accurate multimeter (both expert and normal voltages, but currents not yet calibrated), yet the readings above are
already in discrepancy with the measured values - especially Vin which is almost a whole volt different!

The charger is visually almost identical to the posted photos of the "original" B6, although it is most definitely a clone. I first uploaded the "clone" version firmware but that did not really
work properly. Then I uploaded the "original" version firmware and that works (largely - as yet still with some problems).

Before calibration I replaced the "upgrade" resistors for more accurate operation - the 499k and 249k only 1% as that is the best I could get so far, but the other ones with the 0.1%.
(I have ordered the 0.1% 499k and 249k, but it is not yet completely clear whether they will be available or not).

I'll post full details of my hardware shortly in a new thread. I have a full copy of the original firmware (sorry, haven't yet tried comparing it with other versions on the net).

Best regards
Hans




On Friday, November 29, 2013 12:39:47 AM UTC, cheali-charger wrote:
I personally use only a 3-cell battery to calibrate my charger,

Paweł

Paweł Si

unread,
Dec 11, 2013, 6:38:33 AM12/11/13
to cheali-...@googlegroups.com



2013/12/10 Hans Schmitd <hanssch...@gmail.com>

I am a little confused. When I try to calibrate with less than 6 cells, the charger claims a small residual voltage on all the remaining terminals (usually a fraction of a volt each).
Is this affecting the results? Have I missed something?

Connecting up just now I have the following (the first figure is shown on the charger display; the second is measured with a multimeter):

Vin   17.704V  16.779V
Vb1   4.040V   4.032V
Vb2   4.014V   4.011V
Vb3   4.038V   4.035V
Vb4   0.088V  
Vb5   0.062V
Vb6   0.043V
V1-6   12.092V   12.084V
Vout   12.075V

What is Vin? I assume it is the voltage across the power supply at the power jack. I have measured from the black battery socket to the positive terminal on the power jack, as
the negative terminal is not readily available - as far as I can tell it is the same thing.

Yes, "Vin" is the power supply voltage - the accuracy is not very important, it's used only for turning off the charge process
when the voltage drops too low.
 
What is V1-6? I assume it is the voltage across the -ve to +ve terminals of all the batteries connected, however many they may be. This is obviously also the voltage across the
red and black battery terminals on the charger (provided these are connected, which I understand they have to be anyway).
Then what is Vout???


Yes, "Vb1"-"Vb6" are the voltages on each cell.
"V1-6" is the sum of "Vb1"-"Vb6" (any voltage below 1V is ignored)
in Your case: "V1-6" = 4.040V + 4.014V + 4.038V = 12.092V

"Vout" is the voltage reading on the battery leads,
it is set (calibrated) based on "V1-6".

 
Most of the time - with rare exceptions - I have always had V1-6 and Vout  giving the same value, but the above results show different values.


It's because The "Vout" measurement resolution is ~ 30mV, and "V1-6" is ~5mV (or ~10mV, depends on how you count).
When charging LiPos with the balance port connected the "V1-6" value is used, otherwise (balance port disconnected) "Vout" is used.

 
Note that I calibrated the charger a few days ago with a rather accurate multimeter (both expert and normal voltages, but currents not yet calibrated), yet the readings above are
already in discrepancy with the measured values - especially Vin which is almost a whole volt different!

"Vin" is not very important.
 
The charger is visually almost identical to the posted photos of the "original" B6, although it is most definitely a clone. I first uploaded the "clone" version firmware but that did not really
work properly. Then I uploaded the "original" version firmware and that works (largely - as yet still with some problems).

Before calibration I replaced the "upgrade" resistors for more accurate operation - the 499k and 249k only 1% as that is the best I could get so far, but the other ones with the 0.1%.
(I have ordered the 0.1% 499k and 249k, but it is not yet completely clear whether they will be available or not).

The resistors tolerance is not important when using cheali-charger (except perhaps the resistors Temperature coefficient).
Only the accurate calibration is what's important.
 
I'll post full details of my hardware shortly in a new thread. I have a full copy of the original firmware (sorry, haven't yet tried comparing it with other versions on the net).

Best regards
Hans


Best Regards,
Paweł


Hans Schmitd

unread,
Dec 17, 2013, 1:42:32 PM12/17/13
to cheali-...@googlegroups.com

Hello Pawel,

I am still having problems with the calibration. The voltage calibration seems to have worked OK, but with current I am getting wildly inconsistent results. Could it be that it is failing to save the results in EEPROM??? I attach the contents of EEPROM after calibrating voltage and charge current. With 50mA charge current I was getting a "Value" of about 511. With 1000mA about 10538. However after pressing save, if I try and enter the calibration again (to check it) it has gone back to 0. Also the mA value shown on the Cheali LCD is not right, especially on 1000mA.

In your instructions, what is meant by "Press Save for a few seconds"? If you press Save it instantly exits the calibration setting mode, and it does not seem to be interpreting a long press as different from a short press.

Also a word about your user interface - on the whole you have done a really commendable job - well done! However the inc/dec interface needs some adjustments. If you hold down the inc or dec it first changes singly, then slowly, then a little bit faster (so far spot on ...) however when you continue to press, after a short while the rate of change increases astronomically!!! Eg when setting charge current, if the value on the multimeter is about 200mA, and you continue pressing, when it gets to the fast change the amps will get to about 1.5A within a fraction of a second. Or when changing the voltage, if the current value is 17.7V and you want 16.7V, it first changes slowly, then when the rate increases it is at 15.7 within about 1/10th to 1/5th of a second - then you have exactly the same distance to go back in the opposite direction. My conclusion is that the fastest change rate is (a) massively too fast, and (b) reached too early. Please spend double the time on the intermediate change rate, and reduce the highest change rate by a factor of at least 5.

Can you please explain what are the values "Value"? Are these values stored as such in EEPROM, or are they used to modify another variable? Once set, if you enter the current calibration menu again should it start with the previously set value of "Value"? Mine is starting every time with 0, and nonsense values for bot LCD mA and multimeter mA.

Discharge calibration is 100% disfunctional for me. This might be a hardware issue, as I could not get discharge to work with the B6 firmware. When I enter the discharge calibration on 50mA I am getting a negative value for discharge on the multimeter of around -220mA. This is with Value=0, and LCD mA (if I remember correctly, not guaranteed) 2mA. If I increase Value to about 500, the measured mA went to about -230mA. Obviously it is hard to make sense of what is going on when I am not so clear about what it should be - and even more so when I have doubts about the integrety of the hardware.
postcalibrationeeprom.hex

Hans Schmitd

unread,
Dec 17, 2013, 3:22:26 PM12/17/13
to cheali-...@googlegroups.com
I've made another attempt at the current calibration, the results are attached. The EEPROM contents has changed, so it is being written to, but it still gives a zero starting point when entering the calibration.

This calibration is quite dangerous! I charged one cell to 4.5 volts, and discharged another to 1.95 volts. When I tried to re-charge the latter, the charger went click click click while the voltage steadily dropped to 1.92 volts!

A crystal clear description of what to do when calibrating charge/discharge current (including a description of what the information shown on the LCD mean), plus the changes I suggested above to the inc/dec buttons would be highly valuable to prevent such excessive charges/discharges which can occur very quickly if things are not clear.
postcaleeprom2.hex

Hans Schmitd

unread,
Dec 17, 2013, 3:27:02 PM12/17/13
to cheali-...@googlegroups.com
Am I correct in believing that if the charge and discharge currents are not correctly calibrated, the device will wrongly report how much juice has been put into the cell or drawn out from it?

Paweł Si

unread,
Dec 18, 2013, 2:08:06 PM12/18/13
to cheali-...@googlegroups.com



2013/12/17 Hans Schmitd <hanssch...@gmail.com>


Hello Pawel,

I am still having problems with the calibration. The voltage calibration seems to have worked OK, but with current I am getting wildly inconsistent results. Could it be that it is failing to save the results in EEPROM??? I attach the contents of EEPROM after calibrating voltage and charge current. With 50mA charge current I was getting a "Value" of about 511. With 1000mA about 10538. However after pressing save, if I try and enter the calibration again (to check it) it has gone back to 0. Also the mA value shown on the Cheali LCD is not right, especially on 1000mA.

In your instructions, what is meant by "Press Save for a few seconds"? If you press Save it instantly exits the calibration setting mode, and it does not seem to be interpreting a long press as different from a short press.

Yes, sorry for that, I forgot to change the README.md after a new release.
 

Also a word about your user interface - on the whole you have done a really commendable job - well done! However the inc/dec interface needs some adjustments. If you hold down the inc or dec it first changes singly, then slowly, then a little bit faster (so far spot on ...) however when you continue to press, after a short while the rate of change increases astronomically!!! Eg when setting charge current, if the value on the multimeter is about 200mA, and you continue pressing, when it gets to the fast change the amps will get to about 1.5A within a fraction of a second. Or when changing the voltage, if the current value is 17.7V and you want 16.7V, it first changes slowly, then when the rate increases it is at 15.7 within about 1/10th to 1/5th of a second - then you have exactly the same distance to go back in the opposite direction. My conclusion is that the fastest change rate is (a) massively too fast, and (b) reached too early. Please spend double the time on the intermediate change rate, and reduce the highest change rate by a factor of at least 5.

you're probably right, unfortunately currently I do not have time to take care of this.
 

Can you please explain what are the values "Value"? Are these values stored as such in EEPROM, or are they used to modify another variable? Once set, if you enter the current calibration menu again should it start with the previously set value of "Value"? Mine is starting every time with 0, and nonsense values for bot LCD mA and multimeter mA.


The "Value" (extremely unfortunate name) is a value set on the "output current source" in abstract units,
During calibration Your goal is to teach the charger how to convert this value to mAmps.
After the two step calibration (50mA and 1000mA) you should be able to see the correct output current in mAmps on "Iout". 



Discharge calibration is 100% disfunctional for me. This might be a hardware issue, as I could not get discharge to work with the B6 firmware. When I enter the discharge calibration on 50mA I am getting a negative value for discharge on the multimeter of around -220mA. This is with Value=0, and LCD mA (if I remember correctly, not guaranteed) 2mA. If I increase Value to about 500, the measured mA went to about -230mA. Obviously it is hard to make sense of what is going on when I am not so clear about what it should be - and even more so when I have doubts about the integrety of the hardware.

Reset the charger to its default settings ("options"->"reset default") and try to calibrate it again.
If this does not help, we will try something else.
 


Paweł Si

unread,
Dec 18, 2013, 2:26:22 PM12/18/13
to cheali-...@googlegroups.com



2013/12/17 Hans Schmitd <hanssch...@gmail.com>

I've made another attempt at the current calibration, the results are attached. The EEPROM contents has changed, so it is being written to, but it still gives a zero starting point when entering the calibration.

I have to admit that I am not able to examine the eeprom files,
maybe this will change in the future, Jozsef is currently working on a eeprom editor.
 
This calibration is quite dangerous! I charged one cell to 4.5 volts, and discharged another to 1.95 volts. When I tried to re-charge the latter, the charger went click click click while the voltage steadily dropped to 1.92 volts!

A crystal clear description of what to do when calibrating charge/discharge current (including a description of what the information shown on the LCD mean), plus the changes I suggested above to the inc/dec buttons would be highly valuable to prevent such excessive charges/discharges which can occur very quickly if things are not clear.

just reset the charger to default settings and calibration it again.


Paweł Si

unread,
Dec 18, 2013, 2:27:09 PM12/18/13
to cheali-...@googlegroups.com



2013/12/17 Hans Schmitd <hanssch...@gmail.com>

Am I correct in believing that if the charge and discharge currents are not correctly calibrated, the device will wrongly report how much juice has been put into the cell or drawn out from it?

Yes

Hans Schmitd

unread,
Dec 18, 2013, 7:28:57 PM12/18/13
to cheali-...@googlegroups.com
On Wednesday, December 18, 2013 7:08:06 PM UTC, cheali-charger wrote:
Reset the charger to its default settings ("options"->"reset default") and try to calibrate it again.
If this does not help, we will try something else.

I have reset and recalibrated, this time it ran smoothly. I suspect I may have misinterpreted the instructions for Expert Calibration, which are highly ambiguous.

I have reworded the Expert Calibration instructions as follows - please check if it is correct (note: maybe you might consider renaming your Vb0pin, Vb1pin and
Vb2pin to Vb1pin, Vb2pin and Vb3pin - this makes the terminology easier and saves confusion, and is easier for no-programmers! However my text below is for
the software as it is now):

"
If you want to improve the accuracy of the balancing on the first two cells you can try to calibrate the voltage on the first three pins of the balance port.
BE AWARE THAT ON SOME CHARGERS THIS CAN BE DANGEROUS!!!

First check if you can safely proceed by using the following test:

* disconnect everything from the charger
* measure the resistance between the BLACK battery terminal and Pin 1 on the balance port (this is the furthest pin from the battery terminals and is
  common to all the balance port connectors - it is also the most negative terminal of the battery).
* if the resistance is very low (less than 1k Ohm) STOP THIS PROCEDURE!!!

If the measured resistance is much more than 1k Ohm you can proceed as follows:

* Connect the power supply to the ImaxB6 and go to "options" -> "calibrate" -> "expert DANGER!"
* Connect a 1.5V battery and a resistor (1k Ohm to 10kOhm) in the following manner:
  BLACK battery terminal of ImaxB6 to one end of the resistor, the other end of the resistor to the negative pole of the battery, and the positive pole
  of the battery to Pin 1 (as above) on the balance port.
* With a multimeter measure the voltage between the BLACK battery terminal of ImaxB6 and Pin 1 on the balance port.
  Adjust "Vb0pin" to this value using the inc/dec buttons.
* Disconnect the 1.5V battery
* Connect a 2-cell (or more) LiPo or LiIon battery to the charger (connecting both the main battery terminals and the balance port connections)
* Measure the voltage between the BLACK battery terminal and Pin 2 on the balance port, and set the appropriate values on "Vb1pin"
* Measure the voltage between the BLACK battery terminal and Pin 3 on the balance port, and set the appropriate values on "Vb2pin"
* The Expert Calibration is now completed - now proceed with the normal calibration.
"

I was always puzzled about your labels LiPo and Lilo (the latter has a lower case "el" in the middle) - I thought you meant LiIon (here an upper
case i). However after my calibration I tried charging 3 LiIon cells, and the charge said charge completed at cell voltages 3.98, 4.05 and 4.05.
Maybe you meant something else by Lilo?
In any case as far as charging is concerned LiPo and LiIon should be the same thing as far as I understand, the only difference being that LiIon
have a hard case and usually tend to be round, while LiPo have no hard case and are often flat; internally the the LiIon have a liquid electrolyte
while LiPo have a gel electrolyte, but the cell chemistry and charging parameters are as far as I understand the same. So what is Lilo then?

Hans Schmitd

unread,
Dec 18, 2013, 7:53:45 PM12/18/13
to cheali-...@googlegroups.com
Immediately below the Expert Calibration on the ReadMe is a reference to Atmega fuses. This text is also not clear.

As the text reads, many people are likely to understand: "lfuse should be 0xde and hfuse should be 0xd7" - and if
they have different values maybe they will immediately change them to 0xde and 0xd7 - which they should not do unless
these fuse values apply to them.

The original fuses on my device were lfuse 0x3F and hfuse 0xC9, and I have not changes these. I checked the Atmega fuse calculator and as far as I understand
these two sets of fuse values must correspond to completely different hardware - i.e. different charger hardware versions. (Nevertheless some of the differences
didn't seem to make so much sense to me!!)

I have the Atmega32L8MU version of the CPU.

Am I correct in believing that the fuse values you give only apply to particular hardware? What is strange is that the fuse values I have and the values you quote are close to inverted!!

Paweł Si

unread,
Dec 19, 2013, 7:01:29 AM12/19/13
to cheali-...@googlegroups.com



2013/12/19 Hans Schmitd <hanssch...@gmail.com>

On Wednesday, December 18, 2013 7:08:06 PM UTC, cheali-charger wrote:
Reset the charger to its default settings ("options"->"reset default") and try to calibrate it again.
If this does not help, we will try something else.

I have reset and recalibrated, this time it ran smoothly. I suspect I may have misinterpreted the instructions for Expert Calibration, which are highly ambiguous.

I have reworded the Expert Calibration instructions as follows - please check if it is correct (note: maybe you might consider renaming your Vb0pin, Vb1pin and
Vb2pin to Vb1pin, Vb2pin and Vb3pin - this makes the terminology easier and saves confusion, and is easier for no-programmers! However my text below is for  
the software as it is now):

The Vb0pin - Vb2pin naming convention is based on a common balance port connector:
so I won't change it.

 
"
If you want to improve the accuracy of the balancing on the first two cells you can try to calibrate the voltage on the first three pins of the balance port.
BE AWARE THAT ON SOME CHARGERS THIS CAN BE DANGEROUS!!!

First check if you can safely proceed by using the following test:

* disconnect everything from the charger
* measure the resistance between the BLACK battery terminal and Pin 1 on the balance port (this is the furthest pin from the battery terminals and is
  common to all the balance port connectors - it is also the most negative terminal of the battery).
* if the resistance is very low (less than 1k Ohm) STOP THIS PROCEDURE!!!

If the measured resistance is much more than 1k Ohm you can proceed as follows:

* Connect the power supply to the ImaxB6 and go to "options" -> "calibrate" -> "expert DANGER!"
* Connect a 1.5V battery and a resistor (1k Ohm to 10kOhm) in the following manner:
  BLACK battery terminal of ImaxB6 to one end of the resistor, the other end of the resistor to the negative pole of the battery, and the positive pole
  of the battery to Pin 1 (as above) on the balance port.
* With a multimeter measure the voltage between the BLACK battery terminal of ImaxB6 and Pin 1 on the balance port.
  Adjust "Vb0pin" to this value using the inc/dec buttons.
* Disconnect the 1.5V battery
* Connect a 2-cell (or more) LiPo or LiIon battery to the charger (connecting both the main battery terminals and the balance port connections)
* Measure the voltage between the BLACK battery terminal and Pin 2 on the balance port, and set the appropriate values on "Vb1pin"
* Measure the voltage between the BLACK battery terminal and Pin 3 on the balance port, and set the appropriate values on "Vb2pin"
* The Expert Calibration is now completed - now proceed with the normal calibration.
"

that's why I like open source projects
if you do not like something just change it ;)

Thank you very much, I've replaced  the appropriate README.md part with your instructions,
(with some minor changes)

 

I was always puzzled about your labels LiPo and Lilo (the latter has a lower case "el" in the middle) - I thought you meant LiIon (here an upper
case i). However after my calibration I tried charging 3 LiIon cells, and the charge said charge completed at cell voltages 3.98, 4.05 and 4.05.
Maybe you meant something else by Lilo?
In any case as far as charging is concerned LiPo and LiIon should be the same thing as far as I understand, the only difference being that LiIon
have a hard case and usually tend to be round, while LiPo have no hard case and are often flat; internally the the LiIon have a liquid electrolyte
while LiPo have a gel electrolyte, but the cell chemistry and charging parameters are as far as I understand the same. So what is Lilo then?

strange, it should charge the cells to 4.1V.

Lilo - it's the same battery type as in your orginal firmware:
Lilo Voltage level: 3.6V/cell
 Max. charge voltage: 4.1V/cell
 Allowable fast charge current: 1C or less
 Min. discharge voltage cut off level: 2.5V/cell or higher
 
Best Regards,
Paweł

Paweł Si

unread,
Dec 19, 2013, 8:38:44 AM12/19/13
to cheali-...@googlegroups.com, Nikola Tesla



2013/12/19 Hans Schmitd <hanssch...@gmail.com>

Immediately below the Expert Calibration on the ReadMe is a reference to Atmega fuses. This text is also not clear.

As the text reads, many people are likely to understand: "lfuse should be 0xde and hfuse should be 0xd7" - and if
they have different values maybe they will immediately change them to 0xde and 0xd7 - which they should not do unless
these fuse values apply to them.
The original fuses on my device were lfuse 0x3F and hfuse 0xC9, and I have not changes these. I checked the Atmega fuse calculator and as far as I understand
these two sets of fuse values must correspond to completely different hardware - i.e. different charger hardware versions. (Nevertheless some of the differences
didn't seem to make so much sense to me!!)

I have the Atmega32L8MU version of the CPU.

As far as I know, the fuses meaning is the same on all atmega32 CPU's,
But I've noticed that the values in the README are probably wrong, Atmega32(L).pdf:

"For resonators, the maximum frequency is 8MHz with CKOPT unprogrammed and 16 MHz with
CKOPT programmed"

it follows that CKOPT should be programed (0).

This may explain why Nikolas charger broke.
Nikola did you manage to recover your charger?

I'm temporarily removing the fuse entry from README.
 
Am I correct in believing that the fuse values you give only apply to particular hardware? What is strange is that the fuse values I have and the values you quote are close to inverted!!

Yes and no:
Yes -  the whole firmware is for a particular hardware.
No  -  if the "standard" fuses don't work on a particular charger then the firmware should work incorrect.

--
You received this message because you are subscribed to the Google Groups "cheali-charger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cheali-charge...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hans Schmitd

unread,
Dec 19, 2013, 3:55:42 PM12/19/13
to cheali-...@googlegroups.com, Nikola Tesla
WARNING - I really don't know! Any opinions expressed are only opinions, and are in all probability wrong!
If I say "I believe ..." that means I do not know!

Your quotation is presumably from page 26 of the datasheet, assuming you are using the same edition that I have which covers Atmega32 and Atmega32L.
However on page 1 it says that for the Atmega32 the speed is available up to 16MHz and voltage must be 4.5V to 5.5V, whereas with the Atmega32L speed
is limited to a maximum of 8MHz, and voltage can be 2.7V to 5.5V. There is a table on page 12 of the summary datasheet, but I could not find it in the full
datasheet. I have the 32L so it should have a maximum of 8MHz - on the other hand it has the 16MHz crystal. However the operating frequency could be
half that of the crystal I think, depending on how it is set up.

How much memory are you using for boot?

Paweł Si

unread,
Dec 19, 2013, 6:08:57 PM12/19/13
to cheali-...@googlegroups.com
2013/12/19 Hans Schmitd <hanssch...@gmail.com>

WARNING - I really don't know! Any opinions expressed are only opinions, and are in all probability wrong!
If I say "I believe ..." that means I do not know!


actually you forced me to read the fuse documentation part,
now I'm pretty sure my fuse values are wrong.
(I got them from one of my chargers - I never fully checked them).


Your quotation is presumably from page 26 of the datasheet, assuming you are using the same edition that I have which covers Atmega32 and Atmega32L.
However on page 1 it says that for the Atmega32 the speed is available up to 16MHz and voltage must be 4.5V to 5.5V, whereas with the Atmega32L speed
is limited to a maximum of 8MHz, and voltage can be 2.7V to 5.5V. There is a table on page 12 of the summary datasheet, but I could not find it in the full
datasheet. I have the 32L so it should have a maximum of 8MHz - on the other hand it has the 16MHz crystal. However the operating frequency could be
half that of the crystal I think, depending on how it is set up.

hm.. I did not notice the 8Mhz in the documentation before,
it's really weird, You definitely have a 16MHz crystal,
so the CPU is running with 16MHz.

 
How much memory are you using for boot?
?
you are referring to BOOTSZ*?
The firmware dosn't have a bootloader.


Nagy Jozsef

unread,
Dec 20, 2013, 5:12:44 AM12/20/13
to cheali-...@googlegroups.com
my fusebits:
this is good?
Sut cksel is last item. (ext crystal resonator, high freq 16ck +64 msec)
brownout is 4V.

Hans Schmitd

unread,
Dec 20, 2013, 6:47:03 AM12/20/13
to cheali-...@googlegroups.com
Pawel, I have just looked at your new ReadMe. I would suggest changing the name of the first pin from Pin "-" to Pin 0, it is clearer.
But leave the "Pin 1 (next to Pin 0)" as it helps to avoid mistaking Pin 1.

I've checked the manual you posted; it is almost the same as the paper manual I got with my charger (which I did not trust), so that is interesting.

The handbook does contain references to LiLo, and also something which could either be a capital i or a lower case L, but on the Imax LCD a lower case L is
clearly visible as an L, which I argue does not make sense. LiIon (or LiIo) with capital i is an accepted symbol for lithium ion, and a capital i is not the same as a lower case L.

As for voltage and chemistry - see here:
http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries
also
http://www.powerstream.com/li.htm
and elsewhere

Normal Lithium-Ion or LiIon cells are identical chemistry to LiPo and want exactly the same charge cycle as LiPo - the only difference is in the packaging.
There is another cell type in the Lithium family which does use an endpoint of 4.1 V but I can't remember the exact name and couldn't find it on a quick search. We'll have to find it later.
Once we find the relevant information I suggest putting it in the ReadMe.

The chip manufacturers like TI, Microchip etc are good sources of high quality information about battery chemistry and charging regimes.
This one has very good information on charging regimes:
AN1012 - attached
and this one is also quite good:
http://www.ti.com/lit/an/snva557/snva557.pdf

Some of the useful documents on manufacturers websites are Application Notes, some are articles, and some are datasheets for particular chips that have good information in them.

In the above documents there is also some useful information on pre-charging with a very low current  lithium cells that are deeply discharged.
AN1012-ProgrammableLithiumAndNickelBatteryCharger.pdf

Hans Schmitd

unread,
Dec 20, 2013, 11:14:40 AM12/20/13
to cheali-...@googlegroups.com


On Thursday, December 19, 2013 11:08:57 PM UTC, cheali-charger wrote:

hm.. I did not notice the 8Mhz in the documentation before,
it's really weird, You definitely have a 16MHz crystal,
so the CPU is running with 16MHz.

Maybe that's one reason why it never worked properly.
How many ImaxB6's have the Atmega32L?
Maybe I should replace the crystal with an 8MHz one.
 

Paweł Si

unread,
Dec 21, 2013, 6:36:51 PM12/21/13
to cheali-...@googlegroups.com



2013/12/20 Hans Schmitd <hanssch...@gmail.com>

Pawel, I have just looked at your new ReadMe. I would suggest changing the name of the first pin from Pin "-" to Pin 0, it is clearer.
But leave the "Pin 1 (next to Pin 0)" as it helps to avoid mistaking Pin 1.

Done.
 
I've checked the manual you posted; it is almost the same as the paper manual I got with my charger (which I did not trust), so that is interesting.

The handbook does contain references to LiLo, and also something which could either be a capital i or a lower case L, but on the Imax LCD a lower case L is
clearly visible as an L, which I argue does not make sense. LiIon (or LiIo) with capital i is an accepted symbol for lithium ion, and a capital i is not the same as a lower case L.

As for voltage and chemistry - see here:
http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries
also
http://www.powerstream.com/li.htm
and elsewhere

lithium iron phosphate - I never heard of them before,
but as I recently learned from Chalus Bo, there are lots of different lithium-ion battery, for example:
Charging Voltage: 4.35V  - www.raytechpower.com/Downloads.asp?ID=21

 
Normal Lithium-Ion or LiIon cells are identical chemistry to LiPo and want exactly the same charge cycle as LiPo - the only difference is in the packaging.
There is another cell type in the Lithium family which does use an endpoint of 4.1 V but I can't remember the exact name and couldn't find it on a quick search. We'll have to find it later.
Once we find the relevant information I suggest putting it in the ReadMe.

if you feel that something needs to be added, just make a fork on github,
add it, I will check it and if it's ok I will merge it with the project. 
 
The chip manufacturers like TI, Microchip etc are good sources of high quality information about battery chemistry and charging regimes.
This one has very good information on charging regimes:
AN1012 - attached
and this one is also quite good:
http://www.ti.com/lit/an/snva557/snva557.pdf

Some of the useful documents on manufacturers websites are Application Notes, some are articles, and some are datasheets for particular chips that have good information in them.

In the above documents there is also some useful information on pre-charging with a very low current  lithium cells that are deeply discharged.





On Thursday, December 19, 2013 12:01:29 PM UTC, cheali-charger wrote:



The Vb0pin - Vb2pin naming convention is based on a common balance port connector:
so I won't change it.

Paweł Si

unread,
Dec 21, 2013, 6:44:29 PM12/21/13
to cheali-...@googlegroups.com



2013/12/20 Hans Schmitd <hanssch...@gmail.com>
It is probably easier to replace the CPU,
but It wouldn't surprise me if the atmega32 and atmega32L
were in fact  the same.
If it works, just leave it as is.

Hans Schmitd

unread,
Dec 24, 2013, 7:32:45 PM12/24/13
to cheali-...@googlegroups.com


On Saturday, December 21, 2013 11:44:29 PM UTC, cheali-charger wrote:


It is probably easier to replace the CPU,
but It wouldn't surprise me if the atmega32 and atmega32L
were in fact  the same.
If it works, just leave it as is.

Problem is, it doesn't work! At least, there are a lot of problems, and I can't make much sense of them at the moment.
That's partly because I haven't had time to take a rigorous look at it at the moment. LiPos are not charging fully - at
about 4V they refuse to charge further. Other LiPos have refused to charge at between 3 and 4V. The charger goes beep beep beep and the voltage
blinks in the screen, and with each blink the voltage goes steadily DOWN - i.e. it is slowly discharging. A NiMH that I tried today also acted strangely.
It was 0.8V, and the charger was undecided whether to charge it or not, then it charged just a few seconds, and in that time the voltage went up to 1.12V,
then it said it was full. It was not, it was empty still. On the other hand I have just just successfully charged two LiPos to 4.15V each just now, so I don't
know what it is doing.

Paweł Si

unread,
Dec 27, 2013, 8:21:51 AM12/27/13
to cheali-...@googlegroups.com
2013/12/25 Hans Schmitd <hanssch...@gmail.com>
Problem is, it doesn't work! At least, there are a lot of problems, and I can't make much sense of them at the moment.
That's partly because I haven't had time to take a rigorous look at it at the moment. LiPos are not charging fully - at
about 4V they refuse to charge further. Other LiPos have refused to charge at between 3 and 4V. The charger goes beep beep beep and the voltage

The beeping means that something is wrong connected or you connected a battery with too low voltage on it.
 
blinks in the screen, and with each blink the voltage goes steadily DOWN - i.e. it is slowly discharging. A NiMH that I tried today also acted strangely.
It was 0.8V, and the charger was undecided whether to charge it or not, then it charged just a few seconds, and in that time the voltage went up to 1.12V,

you may have some loose cables, please check your battery connections.
 
then it said it was full. It was not, it was empty still. On the other hand I have just just successfully charged two LiPos to 4.15V each just now, so I don't
know what it is doing.

We should try to solve all problems one by one, if possible please start using LogView to monitor 
(and save) the chargers output values, You will need a UART->USB dongle to use LogView.

Best Regards,
Paweł



Hans Schmitd

unread,
Dec 27, 2013, 1:39:47 PM12/27/13
to cheali-...@googlegroups.com
Thanks Pawel. I have a 5V serial to usb adaptor for a temperature data logger, do you think that might work? It uses 3 connectors, Rx and Tx 0 - 5V and
ground (see P2 of the attached spec). On the Imax I have only the Tx (from Imax) and ground I think. Of course, there is the usual ambiguity of whether Rx
in the spec means Rx of the converter, or "connect-to-Rx" of the datalogger.

From the manual:
"The jack "OUTPUT" is the serial RS-232 interface in 3,5 mm stereo jack format. The
assignment can be defined as follows (connector plan):
At the back of the connector there is the ground = GND = reference mass (= reference
potential)
In the centre of the connector there is the contact RX = 5 V high input (= data input)
At the front at the point there is the contact TX = 5 V high output (= data output)"

Hope you've had a good Xmas!
Hans
100359-da-01-en-Schnittstelle_DATA_LOGGER_306_K202.pdf

Paweł Si

unread,
Dec 27, 2013, 5:05:20 PM12/27/13
to cheali-...@googlegroups.com



2013/12/27 Hans Schmitd <hanssch...@gmail.com>

Thanks Pawel. I have a 5V serial to usb adaptor for a temperature data logger, do you think that might work? It uses 3 connectors, Rx and Tx 0 - 5V and
ground (see P2 of the attached spec). On the Imax I have only the Tx (from Imax) and ground I think. Of course, there is the usual ambiguity of whether Rx
in the spec means Rx of the converter, or "connect-to-Rx" of the datalogger.

From the manual:
"The jack "OUTPUT" is the serial RS-232 interface in 3,5 mm stereo jack format. The
assignment can be defined as follows (connector plan):
At the back of the connector there is the ground = GND = reference mass (= reference
potential)
In the centre of the connector there is the contact RX = 5 V high input (= data input)
At the front at the point there is the contact TX = 5 V high output (= data output)"


Yes, it should work, but maybe you should consider buying a new one,
You could accidentally burn this one.
Any UART->USB dongle should do the job.

I recently bought 4 of them from china (similar to those):

They arrived after two months ;)
but still, they are very cheap.

on the charger you have a 3 pin connector:

1 pin: GND
2 pin: RXD
3 pin: not connected

You should check with a multimeter which one is GND.
 
Hope you've had a good Xmas!

Yes, thanks and 
happy new year! to all of You


Hans Schmitd

unread,
Jan 8, 2014, 7:52:32 PM1/8/14
to cheali-...@googlegroups.com


On Friday, December 27, 2013 10:05:20 PM UTC, cheali-charger wrote:

Any UART->USB dongle should do the job.

I recently bought 4 of them from china (similar to those):

They arrived after two months ;)
but still, they are very cheap.

on the charger you have a 3 pin connector:

1 pin: GND
2 pin: RXD
3 pin: not connected

Pin 3 is connected to Vcc

I've tried an RS232 to TTL converter (MAX232), connected via a Prolific USB to Serial converter. I connected pin 1 on Cheali to GND on MAX232/TTL,
and pin 2 on Cheali to Rx on MAX232/TTL. I set UART in Cheali settings to normal, 57600. I don't get any data on the computer, although Logview
claims it is connected. However there is something funny. At the bottom of the Logview window it says Testformat Lader, although I have Cheali set
as the device. If I click Edit Device Ini it loads the device ini for Testformat Lader.

Today I tried charging a single LiIon cell that had 3.25V - it said "3.25V, FULL" and refused to charge it. Then I put in two cells at about 3.95B each,
and it charged them for a short while, then said they were full at about 4V.

Paweł Si

unread,
Jan 9, 2014, 5:56:14 AM1/9/14
to cheali-...@googlegroups.com



2014/1/9 Hans Schmitd <hanssch...@gmail.com>
on the charger you have a 3 pin connector:

1 pin: GND
2 pin: RXD
3 pin: not connected

Pin 3 is connected to Vcc

I've tried an RS232 to TTL converter (MAX232), connected via a Prolific USB to Serial converter. I connected pin 1 on Cheali to GND on MAX232/TTL,
and pin 2 on Cheali to Rx on MAX232/TTL. I set UART in Cheali settings to normal, 57600. I don't get any data on the computer, although Logview
claims it is connected.


I probably should be more precise, sorry for that.

You should CONNECT! to the 3 pin connector:
1. GND
2. RXD from your UART->USB dongle (this is a TXD output signal, there is only a one way transmission from charger to PC)
3. don't connect

So pin 2 is the output signal TXD from the charger ("T"ransmitter) and should be 
connected to the PC (dongle) RXD pin ("R"eceiver).
Second thing is the signal voltage, the charger uses 5V as logic "1" and 0V as logic "0",
you definitely don't need a TTL->RS232 converter, most UART->USB dongles should work just fine.

In case you really wanted to use your MAX232, the only 
valid connection is to pin 11 (T1IN) or pin 10 (T2IN) on the MAX232,
but you should be aware that the output voltage 
from MAX232 (T1OUT,T2OUT) is 7V for logic "1" and -7V for logic "0".

 
However there is something funny. At the bottom of the Logview window it says Testformat Lader, although I have Cheali set
as the device. If I click Edit Device Ini it loads the device ini for Testformat Lader.

This is a common problem, please see for example:

 
Today I tried charging a single LiIon cell that had 3.25V - it said "3.25V, FULL" and refused to charge it. Then I put in two cells at about 3.95B each,
and it charged them for a short while, then said they were full at about 4V.

we will investigate this later.

Best Regards,
Paweł


Hans Schmitd

unread,
Jan 29, 2014, 5:53:18 PM1/29/14
to cheali-...@googlegroups.com
I have got my CP2102 now, and the LogView connection works. What is clear is that charging 4 cells works, but with many limitations, while charging 1 cell does not work at all. Discharging is also wholly inoperable.

If I put in 1 cell (LiIon or NiMH) it immediately claims the cell is full. The problem seems to be that the Vin is too high and cannot step down low enough. I can charge 2, 3 or 4 LiIon (I haven't tried more), but anything under 4 NiMH does not work.

For example with 1 LiIon it says something like this:
Lipo 3.70V/1C Ch
FUL 3.38V 5.49V2
The voltage is mostly around 5.5 to 6.5 V, not always the same.

The next problem is that it does not charge the batteries fully. This is my assumption on the basis of the LogView graphs and the final voltages. It looks like it is fast charging first with a moderate current, usually just over 1A (eg 1.16A), then as soon as the first cell reaches 4.2V it (appears to!! I could be wrong) stops charging it, and from this point on the current to all the other cells is also only trickle. Then all the other cells trickle charge until they reach 4.2 and then immediately stop, which is why I can never get a fully charged cell.

My understanding is that for LiIon there should first be a conditioning charge at low current to bring it up to the minimum voltage (if it was not already), then constant current until it reaches 4.2V, then constant voltage at 4.2V until current goes down to 0, when it is fully charged. Is that roughly what Cheali is doing?

What do you think Pawel, could this be caused by my CPU being overclocked? Or that the MosFets are the wrong type and/or damaged? It seems the buck mode isn't working correctly. Most of the time the CPU seems to be working OK (eg menus, calibration, etc), but maybe it is only when timing is critical that it causes problems.

I have photos of the final LCD state, Logview graph as JPG and as Excel data. Which should I upload?

I would like to change the CPU, and have already ordered a replacement, but am rather sceptical about my ability to desolder the existing chip without the proper tools. I saw a youtube video showing a similar chip being desoldered with a soldering iron and a piece of copper wire bent into a rectangle - it looked very easy but reality is probably otherwise. I once replaced a CPU on an STM8 Discovery after accidentally shorting it to 12V; the soldering part was OK (it still doesn't work, but most likely because another part was also damaged, and I don't know which); but to remove the broken chip I just ground it off - that took a LONG time, and this one would be much harder.

The first 2hrs 25mins of the charge on 19th January was lost - Logview seems to have closed, not sure why.
20140121-4xLiIon.jpg
20140118-4xLiIon.jpg
20140119-4xLiIon-E.jpg
20140120-2xLiIon.jpg
20140121-4xLiIon.jpg
20140122-4xLiIon.jpg
20140123-4xLiIon.jpg
20140125-4xNiMH-E.jpg
20140125-4xNiMH.jpg

Hans Schmitd

unread,
Jan 29, 2014, 6:16:11 PM1/29/14
to cheali-...@googlegroups.com
What is the current capability on the balance circuitry of the ImaxB6?

Paweł Si

unread,
Jan 30, 2014, 4:14:54 PM1/30/14
to cheali-...@googlegroups.com



2014-01-29 Hans Schmitd <hanssch...@gmail.com>:

I have got my CP2102 now, and the LogView connection works. What is clear is that charging 4 cells works, but with many limitations, while charging 1 cell does not work at all. Discharging is also wholly inoperable.

If I put in 1 cell (LiIon or NiMH) it immediately claims the cell is full. The problem seems to be that the Vin is too high and cannot step down low enough. I can charge 2, 3 or 4 LiIon (I haven't tried more), but anything under 4 NiMH does not work.

For example with 1 LiIon it says something like this:
Lipo 3.70V/1C Ch
FUL 3.38V 5.49V2
The voltage is mostly around 5.5 to 6.5 V, not always the same.

The chargers thinks that you connected something to the balance port.
"3.38V"   - is the voltage seen on the main leads
"5.49V2"  - is the voltage seen on the balance port (V2 - means two cells connected)

In a normal case the voltages should be equal (or the second voltage should be 0V when balance port disconnected)

can you measure the voltage on the balance port during this?
 
 
 

The next problem is that it does not charge the batteries fully. This is my assumption on the basis of the LogView graphs and the final voltages. It looks like it is fast charging first with a moderate current, usually just over 1A (eg 1.16A), then as soon as the first cell reaches 4.2V it (appears to!! I could be wrong) stops charging it, and from this point on the current to all the other cells is also only trickle. Then all the other cells trickle charge until they reach 4.2 and then immediately stop, which is why I can never get a fully charged cell.

hm.. I see lots of impulses in output current, that actually not so good.
It shouldn't be like this, I still have to work on it.

The reason for that is the "balance+charge" mode, in which the battery gets charged and discharged at the same time.
when  Your battery cell voltages differ strongly you probably should use:
first: charge, then: balance


My understanding is that for LiIon there should first be a conditioning charge at low current to bring it up to the minimum voltage (if it was not already), then constant current until it reaches 4.2V, then constant voltage at 4.2V until current goes down to 0, when it is fully charged. Is that roughly what Cheali is doing?


(there is no conditioning charge in cheali-charger)
1. battery gets charged  with constant current until one of the cells reaches 4.2V
2. battery gets charged  with constant voltage at 4.2V until the current drops to 0.1C
3. (only when balancing) some of the cells are also discharged (*) 


(*) -  a cell gets connected to a 21 Ohm resistor  - drop on the cell voltage in picture - battery can still be charged depending on the charge current.

What do you think Pawel, could this be caused by my CPU being overclocked? Or that the MosFets are the wrong type and/or damaged? It seems the buck mode isn't working correctly. Most of the time the CPU seems to be working OK (eg menus, calibration, etc), but maybe it is only when timing is critical that it causes problems.

I think there are no problems that cannot be solved ;)

I have photos of the final LCD state, Logview graph as JPG and as Excel data. Which should I upload?

Logview graph as JPG are fine, and  you could also send the original LogView files.
 
 
I would like to change the CPU, and have already ordered a replacement, but am rather sceptical about my ability to desolder the 
existing chip without the proper tools. I saw a youtube video showing a similar chip being desoldered with a soldering iron and a piece of copper wire bent into a rectangle - it looked very easy but reality is probably otherwise. I once replaced a CPU on an STM8 Discovery after accidentally shorting it to 12V; the soldering part was OK (it still doesn't work, but most likely because another part was also damaged, and I don't know which); but to remove the broken chip I just ground it off - that took a LONG time, and this one would be much harder.

don't change your charger, we will try to work on it as it is now,
it's more likely that I made some bugs in the firmware.


The first 2hrs 25mins of the charge on 19th January was lost - Logview seems to have closed, not sure why.

--

Paweł Si

unread,
Jan 30, 2014, 4:16:46 PM1/30/14
to cheali-...@googlegroups.com



2014-01-30 Hans Schmitd <hanssch...@gmail.com>:

What is the current capability on the balance circuitry of the ImaxB6?

A cell gets connected to a 21 Ohm resistor.
When the cell has 4.2V the discharge current is 200mA

Hans Schmitd

unread,
Feb 3, 2014, 5:06:42 PM2/3/14
to cheali-...@googlegroups.com
Thanks for the reply Pawel, see below:


On Thursday, January 30, 2014 9:14:54 PM UTC, cheali-charger wrote:



2014-01-29 Hans Schmitd <hanssch...@gmail.com>:
I have got my CP2102 now, and the LogView connection works. What is clear is that charging 4 cells works, but with many limitations, while charging 1 cell does not work at all. Discharging is also wholly inoperable.

If I put in 1 cell (LiIon or NiMH) it immediately claims the cell is full. The problem seems to be that the Vin is too high and cannot step down low enough. I can charge 2, 3 or 4 LiIon (I haven't tried more), but anything under 4 NiMH does not work.

For example with 1 LiIon it says something like this:
Lipo 3.70V/1C Ch
FUL 3.38V 5.49V2
The voltage is mostly around 5.5 to 6.5 V, not always the same.

The chargers thinks that you connected something to the balance port.
"3.38V"   - is the voltage seen on the main leads
"5.49V2"  - is the voltage seen on the balance port (V2 - means two cells connected)

The 5.49V is NOT the voltage across the balance port, that is about the 3.38. No idea where it is getting the 5.49V figure from. I assumed it was input voltage or something. It may think that 2 cells are connected, but only one is connected.

I HAVE connected to the balance port. I understood that you were recommending using both the main leads and the balance port, even with only 1 cell, and this was what I was doing.
So I tried it again just now, both with and without the balance port.
With one NiMH (pretty much discharged), it does not say FULL and it does try to charge it (yes, I am always getting inconsistencies), but only for 3 seconds, then it says program complete, reason V limit.
It then showed cell voltage 1.321V (with a voltmeter several minutes later and offline 1.26V). I think the initial values for the two voltages were something like 1.1V and 2.2V, but I'm afraid I didn't check it too closely.
It did not make any discernable difference whether the balance lead was connected or not, nor (I think this is correct, at least) whether I selected charge or charge + balance.
With a LiIon cell I am now getting a different result - with the balance lead connected I get "FULL" and about 3.9V/5.5V (didn't check too exactly), either selecting charge or charge+balance.
However with the balance lead disconnected, and selecting charge, it is charging the cell! It is currently saying 233mAh, 622mA, C 16'33", 4.199V.
Now (somewhat later) it is still showing 4.199, but I measured 4.13V across the main leads with a multimeter. Across balance port pins 0 and 1, it is 0V. A couple of minutes later 4.10V.
I started Logview belatedly, see attached image. It is funny that the Z1 graph is not visible at all!!!
I can't quite remember now if I tried this cell with the balance lead disconnected and selecting charge+balance or not - but if I did, it said FULL and refused to charge.

In a normal case the voltages should be equal (or the second voltage should be 0V when balance port disconnected)

can you measure the voltage on the balance port during this?
 
 
 

The next problem is that it does not charge the batteries fully. This is my assumption on the basis of the LogView graphs and the final voltages. It looks like it is fast charging first with a moderate current, usually just over 1A (eg 1.16A), then as soon as the first cell reaches 4.2V it (appears to!! I could be wrong) stops charging it, and from this point on the current to all the other cells is also only trickle. Then all the other cells trickle charge until they reach 4.2 and then immediately stop, which is why I can never get a fully charged cell.

hm.. I see lots of impulses in output current, that actually not so good.
It shouldn't be like this, I still have to work on it.

The reason for that is the "balance+charge" mode, in which the battery gets charged and discharged at the same time.
when  Your battery cell voltages differ strongly you probably should use:
first: charge, then: balance
Ah, I thought it was stopping the charge to the highest cell and charging the other three only through the balance lead, hence my question how much current can be put through the balance lead.
My LiIon cells are marked 3800mAh, and although my first ever attempts (which failed miserably) used a setting of 3800mAh I rapidly decided I was over rating them, and since then I have been using mostly a setting of 2200mAh (in one or two cases  less). However the starting current is never more than 1.1A, sometimes only 0.7A.
In one charge three cells started 3.85V, while the other was 3.45V. The 3.45V cell went up to 4.2V almost immediately, while the other three did not. Then after the end of the charge the initially 3.45V cell dropped rapidly to 4.05V while the other three stayed on 4.15V (Z2). There seems to be something funny going on here.


My understanding is that for LiIon there should first be a conditioning charge at low current to bring it up to the minimum voltage (if it was not already), then constant current until it reaches 4.2V, then constant voltage at 4.2V until current goes down to 0, when it is fully charged. Is that roughly what Cheali is doing?


(there is no conditioning charge in cheali-charger)
1. battery gets charged  with constant current until one of the cells reaches 4.2V
2. battery gets charged  with constant voltage at 4.2V until the current drops to 0.1C
3. (only when balancing) some of the cells are also discharged (*) 


(*) -  a cell gets connected to a 21 Ohm resistor  - drop on the cell voltage in picture - battery can still be charged depending on the charge current.

Hmm. So many cycles of charging and discharging can't be too good for the cell, surely? Is this the standard way of doing it? I had the idea that the highest battery would just have its current diverted through a shunt, while the rest of the cells continue to charge. Maybe that isn't possible with the IMAXB6?

What do you think Pawel, could this be caused by my CPU being overclocked? Or that the MosFets are the wrong type and/or damaged? It seems the buck mode isn't working correctly. Most of the time the CPU seems to be working OK (eg menus, calibration, etc), but maybe it is only when timing is critical that it causes problems.

I think there are no problems that cannot be solved ;)

I have photos of the final LCD state, Logview graph as JPG and as Excel data. Which should I upload?

Logview graph as JPG are fine, and  you could also send the original LogView files.
When I wrote that I attached graph, JPG and Excel for one charge cycle - then Google complained the files were too big - some of them HUGE! Therefore I just attached all the JPGs instead.
20140203-1xLiIon-midway.jpg
20140131-4xLiIon.jpg

Hans Schmitd

unread,
Feb 3, 2014, 5:17:09 PM2/3/14
to cheali-...@googlegroups.com


On Monday, February 3, 2014 10:06:42 PM UTC, Hans Schmitd wrote:
Thanks for the reply Pawel, see below:
 
With a LiIon cell I am now getting a different result - with the balance lead connected I get "FULL" and about 3.9V/5.5V (didn't check too exactly), either selecting charge or charge+balance.
However with the balance lead disconnected, and selecting charge, it is charging the cell! It is currently saying 233mAh, 622mA, C 16'33", 4.199V.
Now (somewhat later) it is still showing 4.199, but I measured 4.13V across the main leads with a multimeter. Across balance port pins 0 and 1, it is 0V. A couple of minutes later 4.10V.
I started Logview belatedly, see attached image. It is funny that the Z1 graph is not visible at all!!!

I have just tried resetting the Y-axis to autoscale, and the claimed values of voltage are virtually zero!!! Definitely very funny.
20140203-1xLiIon-midway3a.jpg

Paweł Si

unread,
Feb 4, 2014, 6:54:15 AM2/4/14
to cheali-...@googlegroups.com
2014-02-03 Hans Schmitd <hanssch...@gmail.com>

The 5.49V is NOT the voltage across the balance port, that is about the 3.38. No idea where it is getting the 5.49V figure from. I assumed it was input voltage or something. It may think that 2 cells are connected, but only one is connected.



Hans,
Let's solve only one problem at a time,
perhaps we should concentrate on charging one NiMH battery 
connected to the main leads (without the balance port) first.
(This is the simplest case).

The message: "program complete, reason V limit."
means that during charge the output voltage went beyond the safety limit,
for NiMH it is 1.8V.

The reason for that might be:
1. You have a very bad battery connection.
2. You are using very long and thin connection leads.
3. You are using a battery case with high resistance cables (connectors)
   (for example the Turnigy 9x Transmitter battery case - I had so)
4. The NiMH battery is dead.
5. there is a bug in the firmware.


what should be checked:
1-3. a) please measure the cables resistance, form the charger to the battery
        the entire path (to the place where the battery connects to a metal plate)
        (charger disconnected form power supply, battery disconnected)
        The resistance should be very small.
     b) try to connect the battery with another leads.
        if you accidentally disconnect the battery during charging,
        (even for a very short time period)
        you also get this message: "program complete, reason V limit."

4. ??
5. please send me the full LogView log from the 3 second of charging,
   (original LogView file)

Best Regards,
Paweł

 
I HAVE connected to the balance port. I understood that you were recommending using both the main leads and the balance port, even with only 1 cell, and this was what I was doing.
So I tried it again just now, both with and without the balance port.
With one NiMH (pretty much discharged), it does not say FULL and it does try to charge it (yes, I am always getting inconsistencies), but only for 3 seconds, then it says program complete, reason V limit.
It then showed cell voltage 1.321V (with a voltmeter several minutes later and offline 1.26V). I think the initial values for the two voltages were something like 1.1V and 2.2V, but I'm afraid I didn't check it too closely.
It did not make any discernable difference whether the balance lead was connected or not, nor (I think this is correct, at least) whether I selected charge or charge + balance.
With a LiIon cell I am now getting a different result - with the balance lead connected I get "FULL" and about 3.9V/5.5V (didn't check too exactly), either selecting charge or charge+balance.
However with the balance lead disconnected, and selecting charge, it is charging the cell! It is currently saying 233mAh, 622mA, C 16'33", 4.199V.
Now (somewhat later) it is still showing 4.199, but I measured 4.13V across the main leads with a multimeter. Across balance port pins 0 and 1, it is 0V. A couple of minutes later 4.10V.
I started Logview belatedly, see attached image. It is funny that the Z1 graph is not visible at all!!!
I can't quite remember now if I tried this cell with the balance lead disconnected and selecting charge+balance or not - but if I did, it said FULL and refused to charge.

(*) -  a cell gets connected to a 21 Ohm resistor  - drop on the cell voltage in picture - battery can still be charged depending on the charge current.

Hmm. So many cycles of charging and discharging can't be too good for the cell, surely? Is this the standard way of doing it? I had the idea that the highest battery would just have its current diverted through a shunt, while the rest of the cells continue to charge. Maybe that isn't possible with the IMAXB6? 

On The IMAX b6 you can only connect a 21 Ohm resistor.
 

Hans Schmitd

unread,
Feb 4, 2014, 5:49:06 PM2/4/14
to cheali-...@googlegroups.com


On Tuesday, February 4, 2014 11:54:15 AM UTC, cheali-charger wrote:
2014-02-03 Hans Schmitd <hanssch...@gmail.com>
The 5.49V is NOT the voltage across the balance port, that is about the 3.38. No idea where it is getting the 5.49V figure from. I assumed it was input voltage or something. It may think that 2 cells are connected, but only one is connected.



Hans,
Let's solve only one problem at a time,
perhaps we should concentrate on charging one NiMH battery 
connected to the main leads (without the balance port) first.
(This is the simplest case).

OK, I've connected one NiMH cell to main leads without balance port.
 NiMH cell taken out of working bright Cree LED torch, which has had significant use since last charge. Initial open circuit voltage 1.253V.
Initial screen NiMH 1.2V/1C Ch, 43%, final screen reason V limit then 40mAh 0mA, N 001:07 1.348V, vinal voltage open circuit 1.302V.

The message: "program complete, reason V limit."
means that during charge the output voltage went beyond the safety limit,
for NiMH it is 1.8V.

The reason for that might be:
1. You have a very bad battery connection.
2. You are using very long and thin connection leads.
3. You are using a battery case with high resistance cables (connectors)
   (for example the Turnigy 9x Transmitter battery case - I had so)
4. The NiMH battery is dead.
5. there is a bug in the firmware.


what should be checked:
1-3. a) please measure the cables resistance, form the charger to the battery
        the entire path (to the place where the battery connects to a metal plate)
        (charger disconnected form power supply, battery disconnected)
        The resistance should be very small.
     b) try to connect the battery with another leads.
        if you accidentally disconnect the battery during charging,
        (even for a very short time period)
        you also get this message: "program complete, reason V limit."

The multimeter cables have a resistance of about 0.7 ohms, anything less than this cannot be measured accurately, and the displayed resolution is 0.1 ohm.
Main leads (measured from battery terminals to IMAXB6) - c. 0 (<0.1) each
Balance terminals - ditto
b) Battery connections ever since I got LogView working have been excellent; before that they were improvised, and I had some doubts about them. All the wires (including balance wires) are quite heavy, soldered, with (except balance wires) hefty gold-plated connectors.

4. ??
Battery is OK
 
5. please send me the full LogView log from the 3 second of charging,
   (original LogView file)
Attached log from yesterday (LiIon) and from today (NiMH)

6) CPU overclocked?
7) Defective MosFETs? It did not work properly with original firmware, and discharging was completely inoperable with either original firmware or Cheali.
8) MosFETs used out of spec? VT14 is 4835B, VT16 and VT9 are IRF7811W, VT7 is IRFZ42.

Best Regards,
Paweł

On The IMAX b6 you can only connect a 21 Ohm resistor.
Ah, pity. It it worth trying to reduce the number of discharges?
 

20140203-1xLiIon-end.lov
20140204-1xNiMH.lov

Paweł Si

unread,
Feb 4, 2014, 6:51:04 PM2/4/14
to cheali-...@googlegroups.com
2014-02-04 Hans Schmitd <hanssch...@gmail.com>:
I'm only looking at the NiMH (one problem at a time)
and I see, a a voltage jump 
from Vout = 1.263V at Iout = 0A
to   Vout = 1.790V at Iout = 2.2A

This means that the Wires + battery internal resistance is:
R = (1.790V-1.263V)/2.2A = 0.240 Ohm

Unfortunate this is to much.
A NiMH maximum voltage during charge should be below  1.65V
and the safety limit is set to 1.8V
so if you want charge with 2.2A current then R should be:
R<0.068 Ohm

So we have 3 possibility:
1. The battery internal resistance is to high (battery is dead) - unlikely
2. the wires are too small
3. we have a bad LogView reading

The simplest test would be:
for 1 and 3. during charge measure the voltage on the battery (exactly on the battery)
       and the voltage on the chargers output.
      from that we can calculate the battery internal resistance,
      the wires resistance, and compare it with the logView reading.

for 2. take the standard alligator leads, attach them to the battery 
       (maybe secure them with some tape) and try again.


Of course record everything with LogView.

---------------------------------------------

hm.... I just the had a thought that it may have something to do with this:

But could you still do all the tests?

 

Paweł Si

unread,
Feb 5, 2014, 11:19:37 AM2/5/14
to cheali-...@googlegroups.com
Hi Hans,
I thought about this over night
and I come to the conclusion that the 1.8V limit is perhaps too low,
It seems to me that wires with resistance =< 0.130 Ohms are acceptable
(but it is still greater then 0.068 Ohm, that’s why)
I will change the limit in the future
(probably in a month).

So if you do not want to do those tests, than it's ok.


But You should be aware that in Your case: 
R=0.240 Ohm,
I=2.2A
you are pumping ~1.2V*2.2A=2.64W into the battery, 
and additionally your losing 2.2A^2*0.240 Ohm = 1.16W in form of heat.
That's 30% of the total energy.
(Of course, the LogView readings might be wrong)


So if You want we can test the next scenario:
II. charging 1 cell NiMH additionally balance port connected.

please connect some wires from the balance port to the battery, 
they should be attached exactly onto the battery 
(they should bypass the main leads).
pin "0" should be "-"
pin "1" should be "+"

Turn on the debug logs:
go to: "Options"->"Settings"->"UART:" and set it to "debug"

After that try to charge the battery.
Of course record everything with LogView.
(The part with "battery FULL" should be picked up by LogView)

And send me the LogView output.

Best Regards,
Paweł


Hans Schmitd

unread,
Feb 5, 2014, 4:46:36 PM2/5/14
to cheali-...@googlegroups.com


On Tuesday, February 4, 2014 11:51:04 PM UTC, cheali-charger wrote:
2014-02-04 Hans Schmitd <hanssch...@gmail.com>:



I'm only looking at the NiMH (one problem at a time)
and I see, a a voltage jump 
from Vout = 1.263V at Iout = 0A
to   Vout = 1.790V at Iout = 2.2A

This means that the Wires + battery internal resistance is:
R = (1.790V-1.263V)/2.2A = 0.240 Ohm

Unfortunate this is to much.
A NiMH maximum voltage during charge should be below  1.65V
and the safety limit is set to 1.8V
so if you want charge with 2.2A current then R should be:
R<0.068 Ohm

So we have 3 possibility:
1. The battery internal resistance is to high (battery is dead) - unlikely
2. the wires are too small
3. we have a bad LogView reading

The simplest test would be:
for 1 and 3. during charge measure the voltage on the battery (exactly on the battery)
       and the voltage on the chargers output.

What do you mean by "voltage on the chargers output?"
 
      from that we can calculate the battery internal resistance,
      the wires resistance, and compare it with the logView reading.

for 2. take the standard alligator leads, attach them to the battery 
       (maybe secure them with some tape) and try again.

Well, I don't think the wires can be too small, but I tried what you said. The battery is an AAA that is probably in poor condition. The charge cycle ended abruptly when I tried to measure the voltage on the battery and the contact was lost. At the time of ending, I think the battery voltage was 1.423V. The voltage displayed on the LCD was 1.6-something (maybe 1.621V, not sure) , but I don't think that was what you meant.

I set the Y-axis for LiIons to go from 3.0V to 4.21V to get a clearer and less cluttered graph, but when I charged the NiMH 2 days ago I had to return i to auto. I didn't change anything else as far as I know, but something has gone wrong - for all the NiMH batteries it is now showing a voltage of around 1mV or less, therefore I cannot see anything meaningful in these graphs at all. But judging from your comment above, you are still getting a reasonable graph from the logview data. I attach the logview data and also the screen image of what I see.

I don't think it is likely that the wires are too thin. I am using a 4-cell battery charger, from which I have removed all the cells. the wires are about 0.7 mm2 and not more than about 6cm long. At the other end are 4mm gold plated banana leads thoroughly soldered onto the wires, These connect to 50cm heavy copper wire with gold plated babana leads at both ends; the wires are around 3 mm2. The weakest link is at the battery terminals. Here there are chromium plated terminals soldered to a small PCB. The positive terminal is chromium plated copper soldered directly to the PCB, the negative terminal is plated iron which slides (under spring tension) in contact with a second piece of chromium plated iron, which is soldered via about 4 cm of the 0.7 mm2 wire to the PCB. At the PCB all connections to the other wires are no longer than a few millimeters, or zero, of wide copper tracks, all very generously soldered. The balance wires are the same 0.7 mm2 wire, but about 10 cm.
20140205-1-1xNiMH-direct-connect.lov
20140205-1-1xNiMH-direct-connect.jpg

Hans Schmitd

unread,
Feb 5, 2014, 5:24:22 PM2/5/14
to cheali-...@googlegroups.com

I wasn't sure whether you wanted the balance port connected alone, or balance plus main, so I did both. With balance plus main I tried to measure that battery voltage with the multimeter in the last few seconds, and just at that moment the voltage on the display suddenly went up from 1.4V to 2.2V - not sure if that was caused by the multimeter or whether it was coincidence - before that the display showed just over 1.4V and the multimeter also.

Another brief charge of the same battery - it immediately stopped complaining v limit.

The "Lipo Z1" must be measured on the balance port, that is why I am getting ridiculous values when the balance port is not connected?
20140205-2-1xNiMH-balance-port-only-debug.lov
20140205-3-1xNiMH-balance-port-and-main-debug.lov
20140205-4-1xNiMH-balance-port-and-main-debug.lov

Paweł Si

unread,
Feb 6, 2014, 9:25:53 AM2/6/14
to cheali-...@googlegroups.com
2014-02-05 23:24 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:

I wasn't sure whether you wanted the balance port connected alone, or balance plus main, so I did both.

Balance port and main leads connected at the same time.

 
With balance plus main I tried to measure that battery voltage with the multimeter in the last few seconds, and just at that moment the voltage on the display suddenly went up from 1.4V to 2.2V - not sure if that was caused by the multimeter or whether it was coincidence - before that the display showed just over 1.4V and the multimeter also.

Another brief charge of the same battery - it immediately stopped complaining v limit.



I looked on the logs and:
1. I don't see "channel 2" logs (Here are the debug data). 
  It looks like LogView saves channels separately so next time save both.
2. I am pretty sure that your problems come from bad wiring.

You must know that the charger is just a "current source".
If You do have any loose cables and the connection gets broken (even for a very short time period)
the voltage seen by the charger jumps up and the charger turns off the charging.

Please check your wiring twice and try to charge the NiMH again.
and save both channels in LogView.

 
The "Lipo Z1" must be measured on the balance port, that is why I am getting ridiculous values when the balance port is not connected?

 Yes, individual cells are measured on the balance port.


What do you mean by "voltage on the chargers output?"
 
I mean the the voltage on the banana output connectors (the voltage at the beginning of your main leads).
You should have a voltage difference of 0.5V when measuring at this point - relative to the voltage measured on the battery.
(due to the 0.24 Ohm wires resistance and 2.2A current)



Hans Schmitd

unread,
Feb 6, 2014, 5:11:58 PM2/6/14
to cheali-...@googlegroups.com


On Thursday, February 6, 2014 2:25:53 PM UTC, cheali-charger wrote:



2014-02-05 23:24 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:

I wasn't sure whether you wanted the balance port connected alone, or balance plus main, so I did both.

Balance port and main leads connected at the same time.

 
With balance plus main I tried to measure that battery voltage with the multimeter in the last few seconds, and just at that moment the voltage on the display suddenly went up from 1.4V to 2.2V - not sure if that was caused by the multimeter or whether it was coincidence - before that the display showed just over 1.4V and the multimeter also.

Another brief charge of the same battery - it immediately stopped complaining v limit.



I looked on the logs and:
1. I don't see "channel 2" logs (Here are the debug data). 
  It looks like LogView saves channels separately so next time save both.

I've saved both. I can't see any graphs on channel 2 though - in fact I've never been able to see anything on channel 2. I saved a JPG of what I get on channel 1 and 2 - do you get any more than that?
I checked the settings - it says UART debug.
 
2. I am pretty sure that your problems come from bad wiring.

You must know that the charger is just a "current source".
If You do have any loose cables and the connection gets broken (even for a very short time period)

The only time that ever happened was when I tried connecting the main leads directly to the battery terminals, as you requested. They were just held against the terminals by a spring, and when I tried to check the voltage one of the terminals slipped off.
 
the voltage seen by the charger jumps up and the charger turns off the charging.

Please check your wiring twice and try to charge the NiMH again.
and save both channels in LogView.

 
The "Lipo Z1" must be measured on the balance port, that is why I am getting ridiculous values when the balance port is not connected?

 Yes, individual cells are measured on the balance port.


What do you mean by "voltage on the chargers output?"
 
I mean the the voltage on the banana output connectors (the voltage at the beginning of your main leads).
You should have a voltage difference of 0.5V when measuring at this point - relative to the voltage measured on the battery.
(due to the 0.24 Ohm wires resistance and 2.2A current)

I think the problem there will be that the voltages arechanging fairly fast and the current is never as high as 2.2A and is gradually falling (when charging is really taking place, eg for 4x batteries), and then with only one battery the cycle usually only lasts a few seconds.

I've tried charging 2 NiMH cells with constant current from the current calibrator. I was expecting current to start from 0 when I entered the calibration mode but it did not - it started straight away with 1000mA. When I did the original charging it started at 0 and I had to hold down inc until the current went up to the desired value. Anyway I measured 2.58 +/- 0.01V across the 2 cells at the battery terminals and 2.58 +/- 0.01V at the charger output. (the +/- 0.01V means the variation I saw on the multimeter, not its accuracy which is worse than that.)

Just started charging one of the two above - both were so heavily discharged they were both at 0.88V and cheali refused to charge them I put them on constant current for a few seconds, now they will charge. The first one said 14% 1.08V 0.75Ah, then 1mAh 744mA, C 000:09 1.292V. After around 10 seconds I measured the voltages: 1.34V on battery terminals and 1.34V pn charger output. It is still charging, I'll post the results later.

So I don't see that the wires have any significant resistance. All of these batteries are from China though, so their internal resistance might not be too good.

20140206-1xNiMH-balance-port-and-main-debug-channel1.lov
20140206-1xNiMH-balance-port-and-main-debug-channel2.lov
20140206-1xNiMH-balance-port-and-main-debug-channel1.jpg
20140206-1xNiMH-balance-port-and-main-debug-channel2.jpg

Hans Schmitd

unread,
Feb 6, 2014, 5:22:04 PM2/6/14
to cheali-...@googlegroups.com
I've just measured the voltages again: 1.352V on the battery terminals and 1.353V on the charger output. (I forgot to change the range of the voltmeter last time, so 1 extra digit this time). That is with about 746-753mA. That suggests the wires are around 0.00133 ohms.

Paweł Si

unread,
Feb 6, 2014, 6:17:57 PM2/6/14
to cheali-...@googlegroups.com


2014-02-06 23:22 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:
I've just measured the voltages again: 1.352V on the battery terminals and 1.353V on the charger output. (I forgot to change the range of the voltmeter last time, so 1 extra digit this time). That is with about 746-753mA. That suggests the wires are around 0.00133 ohms.

Can You also save the LogView logs from that?
as previously.


Paweł Si

unread,
Feb 6, 2014, 6:29:23 PM2/6/14
to cheali-...@googlegroups.com
with connected balance port.
and send me also two channels.
 

Paweł Si

unread,
Feb 6, 2014, 6:57:01 PM2/6/14
to cheali-...@googlegroups.com
2014-02-06 23:11 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:
I've saved both. I can't see any graphs on channel 2 though - in fact I've never been able to see anything on channel 2. I saved a JPG of what I get on channel 1 and 2 - do you get any more than that?
I checked the settings - it says UART debug.


You have to deselect some of the inputs to see something.

I think the problem there will be that the voltages arechanging fairly fast and the current is never as high as 2.2A and is gradually falling (when charging is really taking place, eg for 4x batteries), and then with only one battery the cycle usually only lasts a few seconds.

when You are charging 4x batteries you get a safety limit of 1.8V*4 = 7.2V and the maximum voltage on cells is 1.65V*4 = 6.6V
So you have more room for the voltage drop.


Just started charging one of the two above - both were so heavily discharged they were both at 0.88V and cheali refused to charge them I put them on constant current for a few seconds, now they will charge. The first one said 14% 1.08V 0.75Ah, then 1mAh 744mA, C 000:09 1.292V. After around 10 seconds I measured the voltages: 1.34V on battery terminals and 1.34V pn charger output. It is still charging, I'll post the results later. 

So I don't see that the wires have any significant resistance. All of these batteries are from China though, so their internal resistance might not be too good.

Ok, I know now what is going on, the charger thinks there is also a second cell
(I will fix it in the future)
please connect  also P2 to P1 on the balance port (both pins should be connected to the battery "+" terminal)



Hans Schmitd

unread,
Feb 7, 2014, 5:16:03 PM2/7/14
to cheali-...@googlegroups.com


On Thursday, February 6, 2014 11:29:23 PM UTC, cheali-charger wrote:

Here are the logs
20140206-2-1xNiMH-channel1.lov
20140206-2-1xNiMH-channel2.lov

Hans Schmitd

unread,
Feb 11, 2014, 6:56:07 PM2/11/14
to cheali-...@googlegroups.com

I've replaced the CPU now, now I have a full-spec Atmega32A running at 16MHz.

The only (slight) problem is that there has been a problem reading and writing the eeprom with my ISP programmer - it is only reading and writing the first 256 bytes, even though it claims to be reading and writing 1024 bytes. In the files that are created on hard disk the 256 bytes is simply repeated 4 times to make 1024 bytes. When this 1 kB file is written back to eeprom it appears that only the first 256 bytes are written and the rest of the eeprom is probably not touched. I'm assuming it might be due to some incompatibility between different portions of the software Arduino system version / ArduinoISP program / avrdude program - but I'll have to check that later, I don't have time this week.

After replacing the CPU I copied the cheali flash and the last backed up eeprom, and then I noticed that from battery setting 6 onwards was just squares on the LCD, so I assume that part of the eeprom was all FF's. I then checked all the eeprom backups I made and all cycle the first 256 bytes.

Anyway my question is this: is all of the calibration data stored in the first 256 bytes, or is some of it stored later? Is there anything important in the later part of the eeprom, apart from user battery settings? I know the UART state setting is later because that was reset to default. Could there be any conflict between the data in the first 256 bytes and something stored elsewhere?

I have now reset the eeprom to FF's so that cheali set up the whole eeprom and then copied the first 256 bytes of my eeprom backup again.

Paweł Si

unread,
Feb 12, 2014, 6:25:29 AM2/12/14
to cheali-...@googlegroups.com
I had a similar problem when I used arduino as ISP,
it turned out that there was a bug in avr-gcc.
(avr-gcc 4.5.3 in my case)

Maybe You should try the latest Arduino version or AVR-GCC.

Hans Schmitd

unread,
Feb 12, 2014, 6:28:38 AM2/12/14
to cheali-...@googlegroups.com

What about the contents of eeprom - I am OK there am I?

Paweł Si

unread,
Feb 12, 2014, 7:52:40 AM2/12/14
to cheali-...@googlegroups.com
2014-02-12 12:28 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:
Anyway my question is this: is all of the calibration data stored in the first 256 bytes, or is some of it stored later? Is there anything important in the later part of the eeprom, apart from user battery settings? I know the UART state setting is later because that was reset to default. Could there be any conflict between the data in the first 256 bytes and something stored elsewhere?


all calibration data (points) are stored in  the first ~90 bytes of the eeprom,
after that there are "programData" - individual battery information's,
and finally "settings":


But if your ISP doesn't work you may have more problems.


Hans Schmitd

unread,
Feb 21, 2014, 7:25:19 PM2/21/14
to cheali-...@googlegroups.com


On Wednesday, February 12, 2014 12:52:40 PM UTC, cheali-charger wrote:

But if your ISP doesn't work you may have more problems.

I've finally made some progress, and the last several days have been doing some testing.

The problem with the ArduinoISP is that the program provided by/with Arduino is long outdated (even with the  latest software versions) and is only DESIGNED to read the first 256 bytes of the EEPROM. The flash memory is not affected.
The original author of the software has since 2010 provided un update to the software that reads the full EEPROM - it is a simple matter of using that software instead.

The correct Arduino software to use is here:
Latest version:
https://github.com/rsbohn/arduinoisp
(works with Arduino 1.0 and several versions of avrdude from 5.10 to 6.1, this or the one below should also work with earlier or later versions of Arduino)
(note that there are some differences in baud rate between different versions, sometimes 19200 sometimes 9600 - the latest version uses 9600 which seems to work better at least with avrdude 6.1)
See also:
http://savannah.nongnu.org/projects/avrdude
http://code.google.com/p/mega-isp/downloads/list
http://code.google.com/p/mega-isp/downloads/detail?name=ArduinoISP.04.zip&can=2&q=

Flash writing seems to have been OK all along.

My feeling is that it is working better with the new processor, but I can't yet eliminate the possibility that the main difference is simply that I am now shorting the Vb1 and Vb2 pins. So far I have only tested a single LiIon cell, charging and discharging.

There are a number of issues that I have still. I am not convinced of the validity of some of the measurements - especially Rbatt, Rwires, charge capacity, discharge capacity, charge endpoint and discharge endpoint.

The cell I have tested is a LiIon UltraFire 18650 cell from China, nominally 3800mAh (but probably actually significantly less), which I bought 2 years ago but was still shrink-wrapped until 20th January. It is cell number 19, which was cell 3 in the charge on 31st January (old CPU).

First I tried a discharge - it complained "cell full" and refused to discharge, but I noticed it was claiming "LiPo 3.70V/1C Di FUL 4.05V 6.55V2" so I connected Vb1 to Vb2 and then it discharged - first time ever! (never could discharge with Imax firmware). It was set for the default discharge current of 1.190A (set as 2200mAh). However, although it should have been virtually full (claimed 87%) it registered only 489mAh discharge. It stopped at 3.0V (stated only "program complete") and immediately sprung back to 3.6V - i.e. I think it was not fully discharged.

Depending on what our aim is in discharging, we should consider whether a constant discharge to 3V and then an abrupt end is really what we want - if we use a different discharge current it will stop at a different endpoint, because it will always bounce back when we remove the load. According to the cell capacity we set and the number of cells, Cheali will automatically set different values for discharge current.

I then recharged the same cell (in two stages, because I had to break in the middle and restart next day). Notice that it charged at a constant current of about 215 to 220 mA from beginning to end, even though it was set at 2200 mAh and Ic 2200mA. It charged a claimed 142mAh plus 2641mAh in 40 mins plus 725 mins 48 secs, 4.138V, and ended with the message "program complete reason: cap COFF".

I then set discharge current to 250mA and discharged again. This time it said 90% 4.08V and discharged 617mAh in 149 minutes to 3.184V. 2 minutes later I tried a "top-up" discharge, 24% 3.297V, it managed only 5mAh in 1 1/2 mins to 3.15V endpoint.

Then I charged again (still set to 2200mA), 18% 3.22V. Program complete reason: cap COFF after 725 mins 36 secs, 4.060V, again exactly 2641mAh. Again it charged from beginning to end at constant current of only 220mA.

I have a number of issues with these results, though many things are not yet clear.
The claimed discharge capacity is completely implausible in my opinion. The cells are almost certainly not as good as the 3800mAh claimed, and could easily be very much less, but that they are SO bad is out of the question in my opinion.
The claimed charge capacity is less implausible, but in view of the claimed discharge, the starting voltage and end voltage, I think it is also substantially inflated.
Cheali was quoting high values for the wire resistance, which varied from moment to moment and from beginning to end of charge/discharge cycles - which is obviously impossible.
Cheali was quoting even higher values for cell resistance of over 200 ohms, which also varied, but they varied less than wire resistance.
I have no idea what normal values for cell resistance are (even for sub-standard cells), but I am sure they cannot be nearly so high. Is cell resistance an ohmic value, and does it change on a moment to moment basis according to charge/discharge conditions or not?

Why is Cheali claiming such high values for the wire/cell resistances? Presumably this is going to make many other calculations wildly inaccurate - maybe both in the calibration calculations as well as the charge/discharge calculations.

That Cheali can think 2 cells are connected to the balance port is also worrying.
I have a very sensitive 4-channel thermocouple circuit which uses an MCP3424 ADC, which is affected by spurious signals in unused thermocouple channels unless these are shorted out. I suspect what is happening is that when the ADC internally switches between channels it can carry over some charge from one channel to the next, if the unused thermocouple connectors are not shorted together. Maybe we have something similar here on the balance connector.
Is there any way of shorting the unconnected balance lead connectors from the software?
The spurious voltages shown by LogView as connected to all the higher balance connectors, and similarly the values shown during calibration, are also relevant here.

I'll post some results, but we'll have to see how many Google will allow me to upload.

Hmm - couldn't upload any log files at all, so I've uploaded the graphs instead. The log files are all 6 to 12MB each.
20140218-1-1xLiIon-discharge-channel1.jpg
20140220-2-1xLiIon-discharge-250mA-channel2.jpg
20140220-3-1xLiIon-charge-channel1.jpg
20140220-3-1xLiIon-charge-channel2.jpg
20140218-1-1xLiIon-discharge-channel2.jpg
20140218-2-1xLiIon-charge-start-channel1.jpg
20140218-2-1xLiIon-charge-start-channel2.jpg
20140219-1-1xLiIon-charge-finish-channel1.jpg
20140219-1-1xLiIon-charge-finish-channel2.jpg
20140220-1-1xLiIon-discharge-250mA-channel1.jpg
20140220-1-1xLiIon-discharge-250mA-channel2.jpg
20140220-2-1xLiIon-discharge-250mA-channel1.jpg

Paweł Si

unread,
Feb 25, 2014, 4:11:23 PM2/25/14
to cheali-...@googlegroups.com
2014-02-22 1:25 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:


On Wednesday, February 12, 2014 12:52:40 PM UTC, cheali-charger wrote:

But if your ISP doesn't work you may have more problems.

I've finally made some progress, and the last several days have been doing some testing.

The problem with the ArduinoISP is that the program provided by/with Arduino is long outdated (even with the  latest software versions) and is only DESIGNED to read the first 256 bytes of the EEPROM. The flash memory is not affected.
The original author of the software has since 2010 provided un update to the software that reads the full EEPROM - it is a simple matter of using that software instead.

The correct Arduino software to use is here:
Latest version:
https://github.com/rsbohn/arduinoisp
(works with Arduino 1.0 and several versions of avrdude from 5.10 to 6.1, this or the one below should also work with earlier or later versions of Arduino)
(note that there are some differences in baud rate between different versions, sometimes 19200 sometimes 9600 - the latest version uses 9600 which seems to work better at least with avrdude 6.1)
See also:
http://savannah.nongnu.org/projects/avrdude
http://code.google.com/p/mega-isp/downloads/list
http://code.google.com/p/mega-isp/downloads/detail?name=ArduinoISP.04.zip&can=2&q=

Flash writing seems to have been OK all along.

My feeling is that it is working better with the new processor, but I can't yet eliminate the possibility that the main difference is simply that I am now shorting the Vb1 and Vb2 pins. So far I have only tested a single LiIon cell, charging and discharging.


Yes, it's probably the shorting of Vb1 and Vb2 pins.
I'll fix it on the next release.

 
There are a number of issues that I have still. I am not convinced of the validity of some of the measurements - especially Rbatt, Rwires, charge capacity, discharge capacity, charge endpoint and discharge endpoint.

The cell I have tested is a LiIon UltraFire 18650 cell from China, nominally 3800mAh (but probably actually significantly less), which I bought 2 years ago but was still shrink-wrapped until 20th January. It is cell number 19, which was cell 3 in the charge on 31st January (old CPU).

First I tried a discharge - it complained "cell full" and refused to discharge, but I noticed it was claiming "LiPo 3.70V/1C Di FUL 4.05V 6.55V2" so I connected Vb1 to Vb2 and then it discharged - first time ever! (never could discharge with Imax firmware). It was set for the default discharge current of 1.190A (set as 2200mAh). However, although it should have been virtually full (claimed 87%) it registered only 489mAh discharge. It stopped at 3.0V (stated only "program complete") and immediately sprung back to 3.6V - i.e. I think it was not fully discharged.

Depending on what our aim is in discharging, we should consider whether a constant discharge to 3V and then an abrupt end is really what we want - if we use a different discharge current it will stop at a different endpoint, because it will always bounce back when we remove the load. According to the cell capacity we set and the number of cells, Cheali will automatically set different values for discharge current.


the previous cheali-charger version  discharged the battery to 3V going down with current to 0.1C 
but I decided that this is too much for the battery, 
some people even suggest that you shouldn't discharge it to 3V, it's not healthy for the battery,
the truth is that after a certain point (3.2V-3.4V) the battery has very little power left
and the risk of damaging the battery drastically increases
but we can add a "aggressive discharge" setting (disabled by default) If you think that's imported.

 
 
I then recharged the same cell (in two stages, because I had to break in the middle and restart next day). Notice that it charged at a constant current of about 215 to 220 mA from beginning to end, even though it was set at 2200 mAh and Ic 2200mA. It charged a claimed 142mAh plus 2641mAh in 40 mins plus 725 mins 48 secs, 4.138V, and ended with the message "program complete reason: cap COFF".

I then set discharge current to 250mA and discharged again. This time it said 90% 4.08V and discharged 617mAh in 149 minutes to 3.184V. 2 minutes later I tried a "top-up" discharge, 24% 3.297V, it managed only 5mAh in 1 1/2 mins to 3.15V endpoint.

Then I charged again (still set to 2200mA), 18% 3.22V. Program complete reason: cap COFF after 725 mins 36 secs, 4.060V, again exactly 2641mAh. Again it charged from beginning to end at constant current of only 220mA.

I have a number of issues with these results, though many things are not yet clear.
The claimed discharge capacity is completely implausible in my opinion. The cells are almost certainly not as good as the 3800mAh claimed, and could easily be very much less, but that they are SO bad is out of the question in my opinion.
The claimed charge capacity is less implausible, but in view of the claimed discharge, the starting voltage and end voltage, I think it is also substantially inflated.

If You still have the logView files, please send them directly to me.

 
Cheali was quoting high values for the wire resistance, which varied from moment to moment and from beginning to end of charge/discharge cycles - which is obviously impossible.


The wires resistance is the voltage difference between Vout (on main leads) and Vbalance (on balance port) divided by the output current.
Rwire=(Vout-Vbal)/Iout
unfortunately the Vout measurement is not very accurate, so you shouldn't take it too seriously when Iout < 1A.    


 
Cheali was quoting even higher values for cell resistance of over 200 ohms, which also varied, but they varied less than wire resistance.


200m Ohms is a lot for a battery, I would say that it's damaged,
but as previously the current should be high (>1A) to get a meaningful value.

 
I have no idea what normal values for cell resistance are (even for sub-standard cells), but I am sure they cannot be nearly so high. Is cell resistance an ohmic value, and does it change on a moment to moment basis according to charge/discharge conditions or not?


The cell resistance depends on many factors for example: charge, temp., age, type ..
The measured accuracy depends mostly on the charge current.
It's the voltage difference on the cell when output current changes.

  
Why is Cheali claiming such high values for the wire/cell resistances? Presumably this is going to make many other calculations wildly inaccurate - maybe both in the calibration calculations as well as the charge/discharge calculations.


As long as You have the balance port connected the Rwire value is ignored (it's only informative)
The Rcell value is used to calculate the next "current step" (delta Iout) so that the battery voltage is always <= 4.20V
Even if it's very off the charger will still charge but it will take him more time to reach the upper limit (4.20V).
 

That Cheali can think 2 cells are connected to the balance port is also worrying.
I have a very sensitive 4-channel thermocouple circuit which uses an MCP3424 ADC, which is affected by spurious signals in unused thermocouple channels unless these are shorted out. I suspect what is happening is that when the ADC internally switches between channels it can carry over some charge from one channel to the next, if the unused thermocouple connectors are not shorted together. Maybe we have something similar here on the balance connector.

That's only a simple bug in the code, it will be fixed in the next release ;)

 
Is there any way of shorting the unconnected balance lead connectors from the software?
The spurious voltages shown by LogView as connected to all the higher balance connectors, and similarly the values shown during calibration, are also relevant here.

any voltage bellow 0.6V on the balance port is ignored (on each cell).
 
 
I'll post some results, but we'll have to see how many Google will allow me to upload.

Hmm - couldn't upload any log files at all, so I've uploaded the graphs instead. The log files are all 6 to 12MB each.

send them to me.

Best Regards,
Paweł

Hans Schmitd

unread,
Mar 6, 2014, 11:15:49 AM3/6/14
to cheali-...@googlegroups.com
Hello Pawel, I have sent the first three files. After that I couldn't send any more, maybe the mailbox is too full.

Hans Schmitd

unread,
Mar 15, 2014, 4:38:43 PM3/15/14
to cheali-...@googlegroups.com
I tried sending another file, but it did not work. I got an error message "An error (#618) occurred while communicating with the server." I was getting the same message last time I tried.

Paweł Si

unread,
Mar 15, 2014, 5:26:26 PM3/15/14
to cheali-...@googlegroups.com
Gmail has a file size limit of 25MB, please split them into smaller files,
you can split files with "Total Commander".

Best  Regards,
Paweł



2014-03-15 21:38 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:
I tried sending another file, but it did not work. I got an error message "An error (#618) occurred while communicating with the server." I was getting the same message last time I tried.

--
You received this message because you are subscribed to the Google Groups "cheali-charger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cheali-charge...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paweł Si

unread,
Mar 15, 2014, 5:39:02 PM3/15/14
to cheali-...@googlegroups.com


2014-03-15 21:36 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:
Hello Pawel,

I'll try sending you the other three files (if it will let me - FAILED!). Is there any way of reducing the sample frequency in Logview so that the data files are not so big?


No, You can't reduce the sample frequency.
just split them.

 
Where I am able to charge at all, the current is so slow it takes about 18 hours, and then the log files are huge.
At present I am having even less success - I can't charge anything at all except with the calibration setting (hmm, pretty hazardous!).

what do you mean by that?
can You make a small video?

Best Regards,
Paweł

Paweł Si

unread,
Mar 15, 2014, 6:59:04 PM3/15/14
to cheali-...@googlegroups.com
I'm currently looking into your logs and:
1. 20140218-2-1xLiIon-charge-start-channel2.lov
2. 20140219-1-1xLiIon-charge-finish-channel2.lov
    a) you are charging the battery with 220mA - why such a small current?
    b) the charging process stops at V1=4.142V - that's very strange it should stop at 4.2V
       - did you stopped it manually?
    c) for some reason the graph splits after 40 minutes  - hm.. I'm currently testing this.

3. 20140218-1-1xLiIon-discharge-channel2.lov
  - I'm not sure what kind of battery this is but I can clearly see a big voltage drop at the begging (16s):
    from V0 = 4.05V,  I0 = 0A  (discharge current)
    to   V1 = 3.75V,  I1 = 1A
   That means that the internal resistance is R = (V1-V0)/(I1-I0) = (4.05V-3.75V)/1A = 0.300 Ohm = 300mOhm
   If this is a battery used for power tools (toys) it's definitely dead.

ps.
- It's easer for me to read channel1, so if you have two channels send me both.
- please restart LogView after each record, for some reason you logs contain many activities. 

Best Regards,
Paweł

Message has been deleted

Hans Schmitd

unread,
Mar 15, 2014, 7:24:29 PM3/15/14
to cheali-...@googlegroups.com
I just posted a reply with a lot of details, but it is marked deleted. Can you undelete it? (it took a long time to write)

Hans Schmitd

unread,
Mar 15, 2014, 7:27:58 PM3/15/14
to cheali-...@googlegroups.com


On Saturday, March 15, 2014 9:26:26 PM UTC, cheali-charger wrote:
Gmail has a file size limit of 25MB, please split them into smaller files,

The files in question were 11.6MB each, posted one at a time.
 

Hans Schmitd

unread,
Mar 15, 2014, 7:32:48 PM3/15/14
to cheali-...@googlegroups.com
In a message you wrote above (which I cannot access at present) you asked why I am charging at 220mA - that is what I would like to know! I can't get any more than that. A lot of the details were in the message that was mysteriously deleted as soon as I posted it. In battery settings all the log files I sent you by email were set at 2200mA charge current - I don't get that though.

Paweł Si

unread,
Mar 15, 2014, 7:45:45 PM3/15/14
to cheali-...@googlegroups.com
hm.. Ok, That make sense now :)
Try this:
Reset the charger to default settings (go to: "options"->"reset default") - after that 
try to charge a battery (with a bigger current). Don't even calibrate the charger.


2014-03-16 0:32 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:
In a message you wrote above (which I cannot access at present) you asked why I am charging at 220mA - that is what I would like to know! I can't get any more than that. A lot of the details were in the message that was mysteriously deleted as soon as I posted it. In battery settings all the log files I sent you by email were set at 2200mA charge current - I don't get that though.

--

Hans Schmitd

unread,
Mar 16, 2014, 8:01:13 AM3/16/14
to cheali-...@googlegroups.com


On Saturday, March 15, 2014 10:59:04 PM UTC, cheali-charger wrote:
I'm currently looking into your logs and:
1. 20140218-2-1xLiIon-charge-start-channel2.lov
2. 20140219-1-1xLiIon-charge-finish-channel2.lov
    a) you are charging the battery with 220mA - why such a small current?
    b) the charging process stops at V1=4.142V - that's very strange it should stop at 4.2V
       - did you stopped it manually?

No, it stopped itself. I think I have never had a charge reach 4.2V. Many times a charge has done constant current until 4.x and then immediately stopped. Many other times it has started from constant voltage (although the voltage is way below 4.2) and never does any constant current. The charge modes are not working correctly at all on my charger. Also the discharge finishes early, with a massive amount of charge left in the battery. There is a very hefty voltage rebound - if you partially discharge a full cell at high current the voltage will drop very deeply and very quickly, but then it will recover within very few seconds. The voltage could briefly go below 3 volts, even though it is still 90% full (my opinion, not measured data!).
 
    c) for some reason the graph splits after 40 minutes  - hm.. I'm currently testing this.

What do you mean the graph splits? I can't see that. Maybe it is something I am not displaying.

3. 20140218-1-1xLiIon-discharge-channel2.lov
  - I'm not sure what kind of battery this is but I can clearly see a big voltage drop at the begging (16s):
    from V0 = 4.05V,  I0 = 0A  (discharge current)
    to   V1 = 3.75V,  I1 = 1A
   That means that the internal resistance is R = (V1-V0)/(I1-I0) = (4.05V-3.75V)/1A = 0.300 Ohm = 300mOhm
   If this is a battery used for power tools (toys) it's definitely dead.

Pawel, if you look above: STARTQUOTE "

There are a number of issues that I have still. I am not convinced of the validity of some of the measurements - especially Rbatt, Rwires, charge capacity, discharge capacity, charge endpoint and discharge endpoint.

The cell I have tested is a LiIon UltraFire 18650 cell from China, nominally 3800mAh (but probably actually significantly less), which I bought 2 years ago but was still shrink-wrapped until 20th January. It is cell number 19, which was cell 3 in the charge on 31st January (old CPU).

First I tried a discharge - it complained "cell full" and refused to discharge, but I noticed it was claiming "LiPo 3.70V/1C Di FUL 4.05V 6.55V2" so I connected Vb1 to Vb2 and then it discharged - first time ever! (never could discharge with Imax firmware). It was set for the default discharge current of 1.190A (set as 2200mAh). However, although it should have been virtually full (claimed 87%) it registered only 489mAh discharge. It stopped at 3.0V (stated only "program complete") and immediately sprung back to 3.6V - i.e. I think it was not fully discharged.

Depending on what our aim is in discharging, we should consider whether a constant discharge to 3V and then an abrupt end is really what we want - if we use a different discharge current it will stop at a different endpoint, because it will always bounce back when we remove the load. According to the cell capacity we set and the number of cells, Cheali will automatically set different values for discharge current.

I then recharged the same cell (in two stages, because I had to break in the middle and restart next day). Notice that it charged at a constant current of about 215 to 220 mA from beginning to end, even though it was set at 2200 mAh and Ic 2200mA. It charged a claimed 142mAh plus 2641mAh in 40 mins plus 725 mins 48 secs, 4.138V, and ended with the message "program complete reason: cap COFF".

I then set discharge current to 250mA and discharged again. This time it said 90% 4.08V and discharged 617mAh in 149 minutes to 3.184V. 2 minutes later I tried a "top-up" discharge, 24% 3.297V, it managed only 5mAh in 1 1/2 mins to 3.15V endpoint.

Then I charged again (still set to 2200mA), 18% 3.22V. Program complete reason: cap COFF after 725 mins 36 secs, 4.060V, again exactly 2641mAh. Again it charged from beginning to end at constant current of only 220mA.
" ENDQUOTE

All these 6 records (the three you have plus the other three) were using the same battery, cell number 19. This cell is not at all dead, it has a lot of capacity, and can produce good current.
I am absolutely 100% certain that all your resistance calculations are WILDLY wrong for my charger and for the way it is set up and for the batteries I have used. Maybe it is a very small error in other chargers that is massive in my charger, or maybe this error does not exist in other chargers, I don't know. But what I can say for certain is that in my charger as I have used it your resistance calculations are massively wrong. They are far too inconsistent with each other and with fixed constants such as wire resistance and battery performance. Whether I have a defect component, or a wrong component, or a wrong design I don't know. This must lie at or near the root of the problem. Can it be that some of your core assumptions are not quite correct?


ps.
- It's easer for me to read channel1, so if you have two channels send me both.
- please restart LogView after each record, for some reason you logs contain many activities. 

It is strange that it saves several records together on one channel, yet ignores the other channel!

I have all the log files, and also photos of the LCD, I'll try and upload them somewhere.

Best Regards,
Paweł

Paweł Si

unread,
Mar 16, 2014, 9:28:06 AM3/16/14
to cheali-...@googlegroups.com
2014-03-16 13:01 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:


On Saturday, March 15, 2014 10:59:04 PM UTC, cheali-charger wrote:
I'm currently looking into your logs and:
1. 20140218-2-1xLiIon-charge-start-channel2.lov
2. 20140219-1-1xLiIon-charge-finish-channel2.lov
    a) you are charging the battery with 220mA - why such a small current?
    b) the charging process stops at V1=4.142V - that's very strange it should stop at 4.2V
       - did you stopped it manually?

No, it stopped itself. I think I have never had a charge reach 4.2V. Many times a charge has done constant current until 4.x and then immediately stopped. Many other times it has started from constant voltage (although the voltage is way below 4.2) and never does any constant current. The charge modes are not working correctly at all on my charger. Also the discharge finishes early, with a massive amount of charge left in the battery. There is a very hefty voltage rebound - if you partially discharge a full cell at high current the voltage will drop very deeply and very quickly, but then it will recover within very few seconds. The voltage could briefly go below 3 volts, even though it is still 90% full (my opinion, not measured data!).
 
    c) for some reason the graph splits after 40 minutes  - hm.. I'm currently testing this.

What do you mean the graph splits? I can't see that. Maybe it is something I am not displaying.

3. 20140218-1-1xLiIon-discharge-channel2.lov
  - I'm not sure what kind of battery this is but I can clearly see a big voltage drop at the begging (16s):
    from V0 = 4.05V,  I0 = 0A  (discharge current)
    to   V1 = 3.75V,  I1 = 1A
   That means that the internal resistance is R = (V1-V0)/(I1-I0) = (4.05V-3.75V)/1A = 0.300 Ohm = 300mOhm
   If this is a battery used for power tools (toys) it's definitely dead.

Pawel, if you look above: STARTQUOTE "
There are a number of issues that I have still. I am not convinced of the validity of some of the measurements - especially Rbatt, Rwires, charge capacity, discharge capacity, charge endpoint and discharge endpoint.

The cell I have tested is a LiIon UltraFire 18650 cell from China, nominally 3800mAh (but probably actually significantly less), which I bought 2 years ago but was still shrink-wrapped until 20th January. It is cell number 19, which was cell 3 in the charge on 31st January (old CPU).

First I tried a discharge - it complained "cell full" and refused to discharge, but I noticed it was claiming "LiPo 3.70V/1C Di FUL 4.05V 6.55V2" so I connected Vb1 to Vb2 and then it discharged - first time ever! (never could discharge with Imax firmware). It was set for the default discharge current of 1.190A (set as 2200mAh). However, although it should have been virtually full (claimed 87%) it registered only 489mAh discharge. It stopped at 3.0V (stated only "program complete") and immediately sprung back to 3.6V - i.e. I think it was not fully discharged.

Hans, I'm currently adding a "extreme discharge" option to the charger,
(maybe You can propose a better name or it).


 
Depending on what our aim is in discharging, we should consider whether a constant discharge to 3V and then an abrupt end is really what we want - if we use a different discharge current it will stop at a different endpoint, because it will always bounce back when we remove the load. According to the cell capacity we set and the number of cells, Cheali will automatically set different values for discharge current.

I then recharged the same cell (in two stages, because I had to break in the middle and restart next day). Notice that it charged at a constant current of about 215 to 220 mA from beginning to end, even though it was set at 2200 mAh and Ic 2200mA. It charged a claimed 142mAh plus 2641mAh in 40 mins plus 725 mins 48 secs, 4.138V, and ended with the message "program complete reason: cap COFF".

I then set discharge current to 250mA and discharged again. This time it said 90% 4.08V and discharged 617mAh in 149 minutes to 3.184V. 2 minutes later I tried a "top-up" discharge, 24% 3.297V, it managed only 5mAh in 1 1/2 mins to 3.15V endpoint.

Then I charged again (still set to 2200mA), 18% 3.22V. Program complete reason: cap COFF after 725 mins 36 secs, 4.060V, again exactly 2641mAh. Again it charged from beginning to end at constant current of only 220mA.
" ENDQUOTE

All these 6 records (the three you have plus the other three) were using the same battery, cell number 19. This cell is not at all dead, it has a lot of capacity, and can produce good current.
I am absolutely 100% certain that all your resistance calculations are WILDLY wrong for my charger and for the way it is set up and for the batteries I have used. Maybe it is a very small error in other chargers that is massive in my charger, or maybe this error does not exist in other chargers, I don't know. But what I can say for certain is that in my charger as I have used it your resistance calculations are massively wrong. They are far too inconsistent with each other and with fixed constants such as wire resistance and battery performance. Whether I have a defect component, or a wrong component, or a wrong design I don't know. This must lie at or near the root of the problem. Can it be that some of your core assumptions are not quite correct?


In my opinion You currently biggest problem is the small output current,
I looked again at the charts and there is really something strange going on,
Can You do a small test for me?
1. reset the charger to default settings ("options->"reset default").
2. don't calibrate the charger!
3. charge a discharged (Vcell<3.8V) battery for not longer then ~10 minutes, current set to 2200mA.  
4. send me the LogView files but this time "channel 1" and "channel 2"   
The resistance values are only on channel 1, without them I can't tell what's going on.
 
Best Regards,
Paweł

Jim McPherson

unread,
Mar 16, 2014, 10:30:39 AM3/16/14
to cheali-...@googlegroups.com

"The cell I have tested is a LiIon UltraFire 18650 cell from China, nominally 3800mAh (but probably actually significantly less), which I bought 2 years ago but was still shrink-wrapped until 20th January. It is cell number 19, which was cell 3 in the charge on 31st January (old CPU)." 


I'm not Pawel, but I do have a working Cheali-Charger... Number 1: http://budgetlightforum.com/node/27603 Are you sure your ultrafires are what they say they are? Check out the link then, reconsider. The evidence from your LogView suggest that there is a serious problem with your battery. 

What are you using to calibrate? (of course don't calibrate before the next test as Pawel suggests).

-Jim
 

Hans Schmitd

unread,
Mar 16, 2014, 12:10:34 PM3/16/14
to cheali-...@googlegroups.com
Well, what I can say with certainty is that my batteries are at least 10 times better quality than my charger! I assumed from the start that the real capacity is less than the claimed 3800mAh - as long as it is more than half that it is OK for me - but performance wise they are much better than that, as long as they are charged fully, which this charger cannot do (as to reliability of the batteries I cannot say yet).

On Sunday, March 16, 2014 2:30:39 PM UTC, Jim McPherson wrote:

"The cell I have tested is a LiIon UltraFire 18650 cell from China, nominally 3800mAh (but probably actually significantly less), which I bought 2 years ago but was still shrink-wrapped until 20th January. It is cell number 19, which was cell 3 in the charge on 31st January (old CPU)." 


I'm not Pawel, but I do have a working Cheali-Charger... Number 1: http://budgetlightforum.com/node/27603 Are you sure your ultrafires are what they say they are? Check out the link then, reconsider. The evidence from your LogView suggest that there is a serious problem with your battery. 

The serious problem is with the charger, not the batteries.

Paweł Si

unread,
Mar 16, 2014, 12:30:53 PM3/16/14
to cheali-...@googlegroups.com
2014-03-16 17:10 GMT+01:00 Hans Schmitd <hanssch...@gmail.com>:
Well, what I can say with certainty is that my batteries are at least 10 times better quality than my charger! I assumed from the start that the real capacity is less than the claimed 3800mAh - as long as it is more than half that it is OK for me - but performance wise they are much better than that, as long as they are charged fully, which this charger cannot do (as to reliability of the batteries I cannot say yet).

The serious problem is with the charger, not the batteries.

 
In my opinion it does not matter whether the battery is good or not,
the charger should still be able to charge it with high current.

In fact I'm mostly testing the "charge-balance" functionality 
with a dead battery (one cell is bead), to is if the charger can handle it.

Hans can You please make the test?

Simone Fabris

unread,
Mar 16, 2014, 1:34:53 PM3/16/14
to Paweł Si, cheali-...@googlegroups.com

Hello,

I had a similar behaviour (low charging current and other "strange" problem with a 18650 Trustfire "protected" battery.

Hans, are you sure that your battery does not have an internal protection circuit?

Simone

Jim McPherson

unread,
Mar 16, 2014, 9:55:14 PM3/16/14
to cheali-...@googlegroups.com
Another point of reference ( I still think the battery could cause at least some of these errors). My charger slowly ramps up the current when charging. I just setup a test charge and it starts a 100ma for ~2seconds, then moves to 200ma for ~2 seconds, then 300ma..... 400ma.... then jumps up to 2.2amps (my chosen charge rate). I'm still new to the code, but am guessing that it is checking the battery during this ramp up and if it fails, which most ultrafires will, may stop charging.

-Jim 
Reply all
Reply to author
Forward
0 new messages