Hello there,
This issue is related to the small Real Time Clock breakout boards that include a rechargeable Li-ion cell battery on the board, but could also apply to any other Li-ion cell battery recharging applications.
BTW, anyone else notice this? It's hard to believe that this isnt a hot topic on the web.
First let me just state that i have been working with hardware for over 40 years and have studied Li-ion cell recharging in depth in order to understand what it takes to charge a cell like this without damaging the cell.
To start, one of these cells requires a charge current not to exceed the manufacturers recommendation on the data sheet, and limiting the voltage across the cell to 4.200 volts with a max of 4.250 volts.
What i found on the RTC boards like for the DS1307 and DS3231 chips is the batteries are being constantly overcharged. This is because the "charging" circuit consists of ONLY a series resistor and diode. The resistor is 200 ohms, and the diode is type 1N4148 or equivalent.
What this causes is when there is a +5v power supply (typical of the Arduino Uno) the diode causes a voltage drop of about 0.7v when there is significant current flowing, which already puts the battery at 4.300 volts which is already over voltage. But the diode voltage drop lowers somewhat with current, so as the battery charges the voltage can rise even above that. For a real example, i have a voltage of 4.8v and the battery is already at 4.3v. If i increased the voltage to 5v it would rise more.
This is not acceptable for an Li-ion battery and must be corrected or else the battery will be ruined too soon and thus it will not back up the time keeping chip properly, and that's the best possible outcome. The worst is that the battery could get hot and cause a fire. Luckily, the 200 ohm resistor limits the current a max of 25ma with a fully discharged battery.
The solutions would be of many types, but to start the list here we go...
- After the battery is charged, remove the 200 ohm resistor from the board.
- Remove the resistor, replace the battery with a regular CR2032 battery.
- Remove the resistor, connect a well-designed charging circuit made for the LIR2032 battery.
- Connect a shunt regulator with sense lead on the battery positive terminal, shunt action lead on the anode of the diode. This is more complicated though and requires a very specific regulator design.