charging the battery

I'm with slipstick on this, ted. Your comment shows little consideration for battery chemistry or overall reliability or safety Different battery chemistries require different charging techniques. For instance:

  • OK to indefinitely trickle charge a NiCad at C/10, but you risk driving off all the hydrogen from a NiMH battery if you do that. Lithium I'm not as familiar with, except that charging one is even more specific in the requirements (for Lithium chemistries, I rely on off the shelf solutions).

  • Negative Delta V is a good technique for terminating a fast charge on a NiCad, but, with a NiMH battery, this is more difficult, because the dip in voltage is much less, so is harder to detect.

  • Delta T is another good way to terminate a charge on a NiCad, especially because while the battery is charging the reaction is strongly endothermic-the battery cools during charging. Less so, with a NiMH, but this is still a good technique for terminating a charge on a NiMH. In fact, when charging a NiMH battery, it's a very good idea to monitor the temperature, because when the temperature goes up, that means the battery is fully charged, and electrolysis is occurring. If the battery is allowed to get too hot, hydrogen will vent from the cell, depleting it's capacity.

And so on. In some cases incorrect charging will, merely result in reduced capacity and/or longevity. In other cases, as slipstick pointed out, it can be downright dangerous.

BTW: I, too, would like some "smart pants" ;D