Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Short Review: DS3231 RTC Breakout Board

Status
Not open for further replies.
Hi,

Yes, good idea. I find so many Ardy libs around for so many things. Really flattens the uC projects implementation landscape.
Basically all that is needed is a resistor and thermistor or other temperature sensing device, maybe something that doesnt age as much like diode.

As a matter of fact, dont most uC's have an onboard comparator? Most of the PIC's i used has that, and that alone would suffice as the controller. The onboard voltage reference (or use the supply voltage if stable enough) plus the resistor and thermistor or diode and that would be it, except the heater and heater driver of course.
 
Last night we had a massive storm here on the Highveld of Gauteng South Africa. Lightning strike within 20-30 meters of my house. When everything in the house trips out, lights flash and TV's die, you know you've been served.
Checked this morning what was destroyed last night ...
Security camera,
Internet ADSL router
PLC system 24V power supply
and ....
DS3231 RTC Li-Ion battery.

All my Arduino related equipment froze up, but after a power recycle they worked again. It was then that I noticed my RTC time reverted back to 00:00:00. I expected the worst. Lightning is nobody's friend, but luckily it was only the battery and my sealed unit's battery was still good.

Now, was it really the lightning that killed the battery, or did it run down? I now need to check if this DS3231 RTC unit charges the battery while in use???
 
Yes there is a comparator, and there are a couple of articles on the web where they have been used for oven controllers, if startup and a hysteritic fluctuation in temp a little bit is not a problem then you can use one, using a comparator will give a fairly big overshoot on temp at warm up.
Pid's give a much tighter control, down to 0.1 degree and a flat startup when properly tuned.
 
Yes there is a comparator, and there are a couple of articles on the web where they have been used for oven controllers, if startup and a hysteritic fluctuation in temp a little bit is not a problem then you can use one, using a comparator will give a fairly big overshoot on temp at warm up.
Pid's give a much tighter control, down to 0.1 degree and a flat startup when properly tuned.

Hi,

Ok so it has been tried and done, that's good to know.
Back in the 1980's i had made a somewhat larger oven using an op amp as controller and a light bulb as the heater :)
I think it was a 100 watt light bulb but cant remember now. It was meant for temperature testing/cycling other parts.

RB did a lot of interesting projects.
 
Last edited:
Last night we had a massive storm here on the Highveld of Gauteng South Africa. Lightning strike within 20-30 meters of my house. When everything in the house trips out, lights flash and TV's die, you know you've been served.
Checked this morning what was destroyed last night ...
Security camera,
Internet ADSL router
PLC system 24V power supply
and ....
DS3231 RTC Li-Ion battery.

All my Arduino related equipment froze up, but after a power recycle they worked again. It was then that I noticed my RTC time reverted back to 00:00:00. I expected the worst. Lightning is nobody's friend, but luckily it was only the battery and my sealed unit's battery was still good.

Now, was it really the lightning that killed the battery, or did it run down? I now need to check if this DS3231 RTC unit charges the battery while in use???

Hi again,

Wow, sorry to hear that. Sounds like you lost some good equipment.

Isnt there any surge protector or something you can use? Here when we have a bad lightning storm coming i just unplug stuff. You can usually tell it's coming because you can hear thunder in the distance, and it gets closer and closer. Once the stuff is unplugged it's hard for it to get damaged. Maybe you could try that next time unless you are unlucky enough to be the first one struck in the area, in which case you would have to check the weather reports regularly to see if anything is coming. That might help anyway.

You might also look into a line conditioner, or a converter that runs some of the equipment.

As for the battery on the RTC, my first guess is that the battery was being overcharged for the whole time you were using it and that damaged it which means it lost it's ability to hold a charge well enough to run anything after that. When the power went out, the battery kicked in, but then died quickly. That's a typical scenario with batteries that are overcharged. Of course it could have been bad to begin with, but after my measurements on my RTC unit i see that it is already overcharged, and the schematic shows that the charge circuit is too inadequate for proper charging. What i will do is pull the 200 ohm resistor and see how long it lasts without charging for a few years. If the battery is good, it should hold the voltage for years. If it is bad, i'll have to replace it with a CR2032 alkaline and not charge it at all. That would last for maybe 10 years.

You could start by simply measuring the battery voltage. That would tell if it went bad. if you charge it again, see how long it takes to diischarge.
 
Hello,
Both DS3231 and ds1307 are RTC so, what are the more power or benefits of DS3231?

Hi,

That's a good question.

The main difference is the accuracy over time. The DS1307 has a crystal that is external to the IC chip that does the oscillation using that crystal, and because the crystal is outside the chip it is subject to temperature variation as the ambient changes. The DS3231 on the other hand has the crystal built right into the chip itself, and the chip does a temperature measurement every 64 seconds and changes the load capacitance to make the crystal frequency stay constant. The DS3231 also has a mechanism for compensating for the aging of the crystal, which means over long periods of time it changes a register value that adjusts the frequency slightly according to known aging characteristics of the crystal being used.
So the DS3231 uses two different compensation techniques to keep the frequency stable over short time spans as well as longer time spans, while the DS1307 uses the standard external 32kHz crystal which is known to vary more with temperature and aging.

There may be some superficial differences too, like alarms that can be set and how they can be set, etc., but the accuracy issues are usually the most important to get a clock that runs for a very long time without the need to reset the time.

I had a watch once that i had to reset very month. That got tiresome so i got rid of it :)
The one i have now rarely needs resetting (sells for about $20 USD), maybe once per year if that. I compare the RTC to that for testing.
The RTC has been working so accurately though i have to wonder which one is more accurate now, the watch or the RTC.
 
Q) Isnt there any surge protector or something you can use?

A) That does not work. My ADSL line comes through four surge protectors. Lightning simply laughs at me

I also unplug my stuff when you hear the first indication of lightning coming, but the one of last night sneaked up upon us like a thief in the night. We had no indication of a storm coming. Next moment massive BANG and flash of light at the very same time, and well, that's it. Start replacing equipment :banghead:

I think you may be right regarding the overcharging etc. I have not measured the voltage with the circuit powered on, but it does make sense. Perhaps your alkaline battery is a good idea. I will investigate when I come back from my work trip.
 
upload_2015-12-4_14-25-19.png

According to my computer ;)
 
According to my computer ;)
i need this calculation how?
Answer :Option C

Explanation :

28th May 2006 = (2005 years + period from 1-Jan-2006 to 28-May-2006)

We know that number of odd days in 400 years = 0
Hence the number of odd days in 2000 years = 0 (Since 2000 is a perfect multiple of 400)

Number of odd days in the period 2001-2005
= 4 normal years + 1 leap year
= 4 x 1 + 1 x 2 = 6

Days from 1-Jan-2006 to 28-May-2006 = 31 (Jan) + 28 (Feb) + 31 (Mar) + 30 (Apr) + 28(may)
= 148

148 days = 21 weeks + 1 day = 1 odd day

Total number of odd days = (0 + 6 + 1) = 7 odd days = 0 odd day
0 odd day = Sunday

Hence May 28 2006 is Sunday.
 
1. What day of the week does May 28 2006 fall on

A. Saturday

B. Monday

C. Sunday

D. Thursday

Why do you need this information?

Since you brought this into the RTC thread i should mention that the RTC has the day of week too, so if it was May 28 2006 it would give you a return value of 0 probably for Sunday.

Since you started talking about the calculation for this, it might be interesting to have a clock that can calculate days between dates for example, so you can enter two dates and it would calculate the number of days between those two points in time. Might be other interesting functions to build into an actual clock too.
 
Hello again,

Another small but important update for this product...especially the ones that have an installed LIR2032 instead of the CR2032...

As i mentioned previously in this thread, i have found that the charge circuit for these clocks both DS1307 and DS3231 installed on many boards (but not all) is entirely inadequate and possibly even dangerous. The reason is because Li-ion batteries require a strict charging regimen where some parameters, if ignored, can at best result in battery failure and at worst result in fire. Luckily the charge current is light, but because of internal damage to the battery it may be possible for it to get hot anyway due to the stored energy. Luckily there isnt that much stored energy either, so we might be ok but i am not taking any chances. That's only the worst case, and since the best case is that the battery gets ruined that defeats the purpose of having a battery to begin with so i decided i absolutely must do something about this.

First though, i made several measurements over time to make sure my suspicion was correct because i would not want to modify something that only seemed to be a problem at first but then turned out not to be in reality. So over several days i measured the battery voltage, and sure enough, it not only reached 4.3 volts which is already over the specified 4.200 volts (max 4.250 volts for standard Li-ion) but actually crept up even higher, to 4.37v now, so that was the last straw for me as that is way too high already.

That led me to rip off the 200 ohm SMD resistor that is connected in series with the battery. That is the resistor that only limits the charge current to the battery, and that is it's only purpose. Without that resistor (with it unsoldered and ripped off the board) the battery can no longer charge at all, so it's voltage will not climb any higher. We dont really need it to charge anyway under normal operating conditions because the power supply normally keeps the clock alive anyway, and so the battery just sits there, assuming it was being charged correctly that is. Without the charge circuit the battery will still take over it just wont recharge again unless we restore the 200 ohm resistor. But the clock circuit takes such little power anyway that the battery would probably still keep the clock running (and keeping the correct time) for years to come even without another recharge.

So using a hot air gun and directing the heat away from the main clock chip to heat only the resistor, the 200 ohm resistor is off the board now and so the problem is over. Hopefully though, the battery is not ruined already, which could very well be the case. I still have more to test though, so i will rip off the 200 ohm resistor before i even try testing them.

PLEASE pass the word around the web about this problem so that everyone can eliminate this problem. I would hate to see a fire start because of this, and even would hate to see someone loose their time setting just because the stupid battery was ruined. Most likely they would replace the battery with the same type, and the same thing would happen again :)

I will be checking the time function and battery function over the next week or so before switching to another board of the same type. So far it is keeping very good time, and i noticed the seconds have been synced with my watch too over the last 24 to 48 hours. When the seconds of the RTC change to one value, the seconds of the watch change to the same value at the same exact time as far as discernible with the human eye, so they are synced and stay synced within some sub second interval at least over some time.
 
I think you're SERIOUSLY over reacting here :D

I don't see as a tiny trickle charge (less than 5mA) to the battery could be in any way 'dangerous', or indeed damage the battery.

But if you want to be paranoid, then remove the resistor and replace the battery with a non-rechargeable one - this was a common modification in VCR's that used an RTC with a NiCd battery - as NiCd's often do the batteries failed, and official mods were to replace with a longer lasting non-rechargeable version. Nice little earner back in the day :D
 
I think you're SERIOUSLY over reacting here :D

I don't see as a tiny trickle charge (less than 5mA) to the battery could be in any way 'dangerous', or indeed damage the battery.

But if you want to be paranoid, then remove the resistor and replace the battery with a non-rechargeable one - this was a common modification in VCR's that used an RTC with a NiCd battery - as NiCd's often do the batteries failed, and official mods were to replace with a longer lasting non-rechargeable version. Nice little earner back in the day :D

Hello Nigel,

Well, that's what it might sound like, but it's a real issue and since i first posted this i have found that this is a known issue and someone already reported that their battery blew up. People on the Arduino site have reported battery 'bloating' when charged on this board with this circuitry.

With Li-ion batteries it's not just about the current, the voltage must be limited to a certain level and that level is 4.200 volts with a max of 4.225 volts. This is in almost every data sheet we see. They dont make that spec just for the fun of it, there is a good reason for this. The battery stores energy and it doesnt matter if that energy comes in all at once or little by little, it's the energy and how fast it is dissipated that determines the real danger.

Now i dont expect every battery to blow up, and i think that is a very rare case. But what i DO expect is that EVERY battery will be ruined. I seriously doubt that any battery will survive this kind of over voltage. That's because Li-ions have a known characteristic when they are overcharged by a small amount (not a large amount) and that is premature failure, and that means they dont hold a charge very well anymore. That's the most likely outcome, that the battery will fail to hold a charge enough to keep the clock running when that's the whole purpose of having a back up battery in the first place :)
People already reported failures, but i've only read about one explosion so far. But this isnt a new issue either as i am reading about this on other sites too now. The most common fix is to pull the resistor or diode and replace with a CR2032. I recommended the resistor because it is farther from the IC chip and thus the heat during unsoldering will be farther from the chip. Also, i figured that if we ever did want to charge the battery again we could just connect a resistor temporarily, like a regular 1/4 unit, just to charge for a little while.

As i said i dont think a battery blowing up is the most likely scenario, but over charging will ruin the battery most definitely. And we also have to keep in mind that there are tolerances to consider like the diode drop and the actual power supply being used.
As diodes get hotter their characteristic voltage drops lower, and that can contribute to a worse over charge condition.
Even more so, the power supply tolerance can be as high as 5 percent, which doesnt seem like much but to a Li-ion battery that could make the difference between working for years and only working for a few days. So a 5v power supply could be as high as 5.25 volts, and that means an extra 0.25 volts to the battery which is a serious over voltage already.

If you'd like to keep your circuit intact that's up to you of course, but i would advise reading more about this on other sites. On issues like this it is also better not to tone it down but to actually do the opposite: stress the importance of fixing this. But again if you'd like to keep your circuit and battery as is that's up to you, and maybe report how it goes over the weeks or months to come.

I measured my battery this morning again and it measures 4.37v so it didnt change much after removing the resistor. That means the self discharge is not outrageous, so that's a good sign. I might force discharge it down to 4.2v though to make sure it does not have to have that higher voltage for too much longer.

We do have things working for us here. For one as you mentioned too, the charge current is low. For another, the total energy storage is low. These two suggest the danger is minimal. However, i cant see allowing my battery to get ruined when i know better than that and this has been common knowledge for years now. The data clearly shows a marked decrease in life when the battery is over charged. That's why they recommend an even lower termination voltage (4.15v) for even longer life (life in years that is not in the number of charge cycles).

Maybe it is time for you to get your Nano's going and get your RTC's a cookin' :)

Somewhat related, the story of the Boeing 787 fire...
https://dmediamom.com/2014/01/23/te...al-can-rechargeable-batteries-overheat-or-no/

The article asks the question: Would you rather be technically right or not take a risk?
 
Last edited:
Hello Nigel,

Well, that's what it might sound like, but it's a real issue and since i first posted this i have found that this is a known issue and someone already reported that their battery blew up. People on the Arduino site have reported battery 'bloating' when charged on this board with this circuitry.

Can you provide the link(s)? Did the reporters provide actual data or just anecdotes? Lithium battery bloating in the hobby world is often associated with improper discharge (e.g., too much current). Google didn't return a single instance of a fire or explosion associated with the DS3231 charge system. In fact, I didn't find any fires at all associated with the LIR2032.

John
 
Hi,


Did you check the Arduino site? There is a lot more written about this on that site under the "Sensors" section.

Does it matter that much? If the battery over charges, it is ruined even if it doesnt explode or just burst and no fire.

What do we know for sure without more factual input so far?
We know that Li-ion batteries have a life time curve that goes down with maximum voltage charge level. There's no question about that.
We know that Li-ion batteries should not be over charged for risk of fire. There's no question about that.
We know that the Li-ion batteries in these boards are being over charged when run at 5v. There's no question there either.

What are we not sure of?
We know that this battery will be damaged as to the life of the battery if it is over charged, but we are not sure of the exact conditions needed to blow this actual battery, that is, get it to explode and flame up, or get so hot it can cause material melting or smoke damage.

What you would have to prove to show that it can not start a fire is you would have to prove that several makes of batteries from different manufacturers do not blow up under test of over charging and prove that over long time periods. That means you'd have to acquire many batteries and subject them to an over change and wait five years for the results. It might not blow after five minutes, 10 minutes, one day, one week, one year, even four years, but that fifth year it might blow and burn down your house. Then again, it may never blow before you get rid of the board.

So the final question really is, are you willing to take that chance knowing that an Li-ion battery is being over charged and that is known to be dangerous and at the very least will ruin the battery?

At 4.3v i was quite worried about it but still let it ride for a while yet, but at 4.4v it's just way too high to let this one go. That's not the max either as that was with my power input of about 4.8v. At a true 5v it would go higher, and with the tolerance of the 5v supply it could go even higher.
 
I don't think we should have to search the entire Arduino site to find support for statements you have presented here. Please just give the links.

Remember, we are not talking about Li-ion batteries in general. You have raised the fear level for the DS3231 and its LIR2032 battery, and specifically those devices/batteries are the ones under discussion. Have there been any DS3231 fires or explosions attributable to overcharging the battery with the circuit in the DS3231 operated within its recommended safe operating area?

John
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top