• 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.

DS3231 Initialization

Status
Not open for further replies.

Gayan Soyza

Active Member
Guys I have a problem with DS3231 chip. Made a clock with a cheap Ebay module & it worked fine.

After 1 month of continuous run the time halted. After searching the internet found that the crude charging circuit & the battery gives lots of problems & need to remove the crude Li cells charging circuit on these modules. I modified the circuit & placed a new CR2032 battery.

The problem is in a good A/C condition (cool) the time works fine. At home (Hot) the time holds & not counting. The time increments sometimes very slowly.

I just guess does the Aging Register have some garbage values after my battery issue? Do you guys set this register when power up the chip?
 

Attachments

ericgibbs

Well-Known Member
Most Helpful Member
hi Gayan,
I have used a number of these modules for many, many months, all OK.
The only problem was that the initial CR2032 cell that was supplied with the modules failed after after about a month, I guess it is the same as many manufacturers, they use cheap batteries in order to keep the costs down.

I have had no problems with the charging circuits, so far.

I suspect your problem is the inbuilt crystal oscillator, which is failing when the DS3231 gets 'hot'.

The ageing register programming just adds/subtracts very low value capacitors connected in parallel with main cap, which I understand is about 6pF.
The ageing register is normally trimmed/set by the manufacturer, you can add/subtract oscillator capacitance to adjust for a 'fast/slow' clock.
I do not set the ageing reg at power up.

Eric
Attached a copy of the DS3231 PDF.
A001.gif
 

Attachments

Last edited:

Gayan Soyza

Active Member
Hi Eric thanks for the details.

I suspect your problem is the inbuilt crystal oscillator, which is failing when the DS3231 gets 'hot'.
That's a very sad story.I ordered 20 modules of these & I have those modules at the moment.In my clock I just use this module as a plug in type.With this type of errors I cannot use this module :(

I still use the DS1307 code.Not even touching the CONTROL registers in DS3231 because the Oscillator Enable is active when first powered up.

I still wondering the factory value of the Aging register or may be its coming with a value of "0" :(
 

ericgibbs

Well-Known Member
Most Helpful Member
hi,
You could test read register 10h, in order to check the age reg value.
Note it will change with temperature.

I assume that you have pull up resistors on the SCL and SDA line.??

E
 

Attachments

dr pepper

Well-Known Member
Most Helpful Member
I have some too, and they were supplied with non rechargeable batteries.
I never messed with the xtal age register, as far as I know it auto updates.
If you just have the one faulty, bin it and try again, might just be a one off.
 

Gayan Soyza

Active Member
I also monitored the Aging register values of my other modules using a serial monitor.It shows value of "0".Even though if I remove the battery & check the aging value is still 0.Will se how it goes :) Still wondering how this chip got this problem..!!
 

Attachments

Last edited:

dr pepper

Well-Known Member
Most Helpful Member
Are you sure the age register is actually readable.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top