Go Down

Topic: ZS-042 DS3231 RTC module (Read 23173 times) previous topic - next topic



I am very happy i found this thread with the help of another member in another thread.

First, i have worked with hardware for many years now and i took an especially good look at Li-ion battery charging circuits because i had to work with them a lot in the past.

What i found out is that Li-ion batteries are more dangerous than other types and that they require a very very specific charging technique in order not to damage them or create fire.

What i found out about RTC boards like this one is that the ones with an LIR2032 battery (which is an Li-ion) have one of the poorest charging circuits for a battery of that type that i have EVER seen before.  It's just a diode and resistor.  This causes the battery to overcharge over time when the board is run at a voltage of about 4.5v or above.  In any case, at 5v it definitely over charges as careful measurements have shown.  This can cause fire or at least early failure of the back up battery, which results in no back up battery when the power goes out.

One single measurement may not be enough, there has to he several measurements done over time, several days, in order to see the rise in voltage of the battery.  When the unit is first powered up at 5v, the battery may seem fine at 4v or even less, but allowed to run for several days in a row the battery voltage climbs higher and higher.  My measurements had shown first 4.29 volts, then today (12/05/2015) it was up to 4.37 volts.  The absolute max is specified as 4.225v for safe operation and of course battery life.

Solution?  Some have been mentioned already, but i decided just to pull the series resistor which is 200 ohms and is surface mount.  Using a hot air gun and directing the heat away from the main chip, the resistor was removed.  it is easier and safer to remove the resistor than the diode on this board because the diode is much closer to the IC chip than the resistor, and also the connection can be made again in the future if you want to charge the battery again for some reason, for a short time period that is.  I doubt you will ever need to charge the battery again however, unless you let it sit for a very long time without powering up.

You will note that the smart designs do not have a back up battery or else have the CR2032 non rechargeable battery with NO charge circuit.

BTW the Due board could run the charge circuit at 3.3v which would not over charge the battery.

Would the CR2032 battery overcharge when running at 3.3v if the board had a charge circuit?
Well the silicon diode used looks like a standard 1N4148 diode and that drops a nominal 0.65v when conducting, so the max charge voltage reaching the battery would be 3.3v minus 0.6v which equals 2.7v, so it may not hurt anything.  The diodes voltage drops somewhat though for light currents, so it is possible that it might reach as high as 3v, and as the diode temperature is increased it could reach higher because that decreases the characteristic voltage more, so we could run into some charging of the non rechargeable battery.  It'd doubtful this would happen, but we cant fully eliminate the possibility without careful testing.  So in the end it is probably best to just desolder the resistor and remove it.  After doing that there is NO way it can charge without some very abnormal board or chip failure like an accidental short (drop the board onto something metallic) or perhaps whisker growth.  These would be more rare though.

Please pass this information along so other people know about this.


Hello, I try to powered the DS3231 by backup capacitator 5.5V 0,22F and i can say that is work very good. If I compare price of capacitator and LIR2031 the capacitator is 1/3 price. It can backup time module for 24h sure (tested). Now I try if it possible to backup it for all weekend. That is enough for me.


Feb 05, 2016, 11:49 am Last Edit: Feb 05, 2016, 11:57 am by bartgrefte
It's a good thing I came across this topic, got the same RTC module here and even though there's a diode, the voltage at the battery-holder is above 4.2V. I measured 4.7V. So using the LIR is out of the question.

Are there any others who started using a capacitor like
Hello, I try to powered the DS3231 by backup capacitator 5.5V 0,22F and i can say that is work very good. If I compare price of capacitator and LIR2031 the capacitator is 1/3 price. It can backup time module for 24h sure (tested). Now I try if it possible to backup it for all weekend. That is enough for me.
That would be an alternative solution, but I would like to read more than one experience :)


Apr 15, 2016, 09:38 pm Last Edit: Apr 15, 2016, 10:40 pm by SpoodleMix
I don't mean to waist anybody's time, or insult anyone, but this question needs some closure.

OK. that said, the diode and resistor circuit is not intended to make a charging circuit for the CR2032 battery.
The first question one should ask needs to be: What does a RTC do? Answer: It keeps a constant signal (clock). It's second function is to keep that clock when the normal system power is gone. This is why your PC computer has a similar or even the same CR2032 battery on the motherboard. The RTC battery's purpose is to keep the clock running when the power is lost to the system. By cutting the trace or removing the diode or resistor, you have only removed the ability to keep the time when the VCC power is gone. Now, that would only be the case if the ZS-042 circuit was built correctly. In case nobody has checked to see if any CR2032 battery voltage is getting to VCC, to power the RTC, when system power is down, I thought I would mention that it is not. In other words, the battery is not connected correctly to do anything, let alone work as a battery backup. Don't waste your time cutting traces, just take the battery out if you are concerned about it. You will have the same result. The battery does nothing in this circuit except take voltage from VCC.

If you are wondering if I will ever get to the point (solution), here it is. The diode is in backwards. That is it.

The diode's only function is to block charging of the CR2032 from power off of VCC, not provide a charging circuit. The resistor is a current limiting resistor intended to take the load off of the diode.
The battery should provide power to VCC to keep the RTC running in case of a power failure. This is a one way job from the battery to VCC. The way the board is shipped from China, makes a power path from VCC to the battery, not the other way around.
If you reverse the diode, you will have full functionality of the RTC, including battery backup. Only problem is that the power LED will drain the battery quickly. If you want to remove or cut anything, reverse the diode and then remove the LED so your battery will last longer when the system power is off. Remember, just because someone manufactured it, it does not make it correct. This board is both a bad design along with bad manufacturing. But does work if you fix it.


I know this is an old thread but found it recently and think the above reply is incorrect.

I'm aware that you do not often visit here, so a good chance that you will not see this.

I think you're totally wrong. The DS3231 has a battery input that provides the chip with power when normal power goes off (if battery is connected). So the diode/resistor is not there to feed the DS3231; why even put a resistor in there in the first place if it was not for charging and the battery is supposed to supply power to the Vcc pin.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.


I have to agree with @sterretje here - the DS3231 has an isolated battery input which is specifically designed to keep the internal clock (not the I/O pins) alive when Vcc is gone. If you turn that diode around, your battery will be trying to drive Vcc (at around 2.3ish volts) and potentially an entire system connected to it (not just the power LED!). The resistor/diode combination really just looks like an extremely badly-designed charging circuit, or a circuit designed to charge a supercap (which should actually work quite well). So either use a supercap (would be nice if a supercap was available in a CR2032 form factor!) or disconnect that circuit to avoid a nasty fire/explosion.


So i just recieved two rtc with cr2032 batteries in them. I order may 8, so they  are still shipping them.

This is from the ebay page, note they state the battery cr2032 is rechargeable. or is it poor wording and they are trying to say the circuit will stay working with the battery "recharging the cuircuit"

1 Size: 38mm (length) * 22mm (W) * 14mm (height)
2 Weight: 8g
3 Operating voltage :3.3 - 5 .5 V
4 clock chip: high-precision clock chip DS3231
5 Clock Accuracy :0-40 ℃ range, the accuracy 2ppm, the error was about 1 minute
6 calendar alarm clock with two
7 programmable square-wave output
8 Real time clock generator seconds, minutes, hours, day, date, month and year timing and provide valid until the year 2100 leap year compensation
9 chip temperature sensor comes with an accuracy of ± 3 ℃
10 memory chips: AT24C32 (storage capacity 32K)
11.IIC bus interface, the maximum transmission speed of 400KHz (working voltage of 5V)
12 can be cascaded with other IIC device, 24C32 addresses can be shorted A0/A1/A2 modify default address is 0x57
13 with rechargeable battery CR2032, to ensure the system after power failure, the clock move any natural normal
14 Packing: single anti-static packaging
Wiring instructions (with Arduino uno r3 for example):
SCL → A5
SDA → A4
VCC → 5V

So I am just learning and thats why i look everything up, i have read different "solutions" to the problem and understand that charging a lithium (I just learned the lithium = non rechargeable and lithium-ion = rechargeable) battery is a bad thing. so what is the simplest way to stop this from happening?

Of all the things i thought I would get hung up on... the battery lol


Reply #1 has an image of the board with an indication which track to cut for use with CR2032; it also has the schematic.

If you have a soldering iron, you can remove the resistor just above the word SCL at the right or the diode (next to the bigger chip).

From the schematic you can see that any of the above will break the path between Vcc and the battery (BAT)

I have done neither of these exercises yet.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131