How to get ds3231 to keep time when not plugged into arduino uno

No just the ground wire, the ds3231 still gets power form arduino and it still has the cell battery inserted at the back of the ds3231

I've done a fair. Bit with the 3232, I'm thinking the 3231 will be very similar. I had lots of problems but solved them all by reading the datasheet very carefully. Making sure you have pull-up resistors made a difference, I think the SQW Needed one also. The SCL AND SDA lines also of course need pull-ups. I also found that with i2c the wiring mattered, capacitance or something but try changing the worse locations etc. I've burnt days on this only to move the wires a bit on the SCL/SDA lines and hey presto, working fine than.

Ok thanks for your reply. I thought the board I bought already had the pull up resistors on it (see link)? Also what do you mean move the wires a bit, do you mean just tweak them or change the pins that they were going to?

Has this question have a final answer, I have the DS3232 and I can't figure out how it is supposed to retain the time when I remove the USB cable from my UNO. I mean, what is the use of the battery if the module will not hold the time, and yes, I tested the battery.

jimr1947: Has this question have a final answer, I have the DS3232 and I can't figure out how it is supposed to retain the time when I remove the USB cable from my UNO. I mean, what is the use of the battery if the module will not hold the time, and yes, I tested the battery.

This is a 6 year old thread.

Start your own thread and describe your situation there.

Have used tens of DS3231 modules and all retain their time when the Arduino goes through a power fail restart.

Perhaps it’s the way you have written your sketch which we cannot see.