Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: RPI DS3231 Real Time Clock Module for RPi  (Read 5466 times)

0 Members and 1 Guest are viewing this topic.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
RPI DS3231 Real Time Clock Module for RPi
« on: February 12, 2021, 01:14:15 pm »
I think I left a post about me using this module previously, but I cant find it, so i decided to leave a new one.
First, background info.
On my photobooth I use a RPi 2.
Since I have the option of stamping date and time on each photo, I needed a way to have the date and time on the RPi be correct between power downs.
So I bought a cheap DS3231 Real Time Clock Module from ebay or amazon.
It didnt have a lot of info on it but it was pretty easy to install and setup. I wont get into that here.
It had been put up for over a year, I decided to drag it out and test it. Guess what. The date and time was December 31 1999 and 00:00.
The date and time auto corrected a few seconds later when the RPi connected to the internet. But when I disconnected from internet date/time reset to 1999 after RPi reboot.
Since I made this to be carried to parties, get togethers, or whatever, I knew an internet connection may not always be available, so keeping correct date and time was important.

From info I gathered on web, the battery on the module is rechargeable. So I left photobooth on all night and tried next morning. Still no correct date/time.
I unplugged the module and measured voltage on the battery. It was around 0.25 volts. So it didnt charge in more than 10 hours. I figured battery was bad.
I removed the battery and soldered two test leads in the place of it.
Here is a pic:



I then placed a diode in series and temporarily wired it to a CR2023 coin battery (I used the diode to prevent any current trying to charge the battery, since the CR2023 is not rechargeable):



The clock worked great while setup like this.
The battery had two clips that was spot welded to it, these soldered onto the circuit board. I removed these so i could see the battery number:



This battery is a CR927, and according to the specs, it is not rechargeable. So that bit of info about this module is wrong. The specs also say the battery should last 7 to 10 years, so I either got a defective battery or one that had been on a shelf in china for many years.
I wish they had a battery holder on this module so I could just change out the battery when it dies. (There are some models that do have this holder.)

So my plans are to acquire a coin cell battery holder and install it. And go with a more common coin cell 3 v battery.

Hope this helps anyone else who decides to use one of this clock modules.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: RPI DS3231 Real Time Clock Module for RPi
« Reply #1 on: February 12, 2021, 06:17:14 pm »
 :cheers:
Raspberry Pi, AttractMode, and Skeletor enthusiast.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: RPI DS3231 Real Time Clock Module for RPi
« Reply #2 on: February 13, 2021, 11:00:06 am »
I was going through some files on my hard drive and came across this text file that I saved when I first got the RTC board.
I didnt write this text file, but found it on the web.
Thought it might come in handy if you are considering adding the RTC to your RPi project.

No thanks necessary, however I will accept cash and property.  ;D

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: RPI DS3231 Real Time Clock Module for RPi
« Reply #3 on: February 13, 2021, 03:56:27 pm »
About to put the lid on this little side project.

I removed the coin cell holder from an old junk motherboard.



I then soldered it to a 4 prong solder tie clip. I bent the prongs to 90 degree angle.
Soldered the holder's pins to the two outside prongs of the tie clip.
I then soldered the wires from the RTC circuit to the two battery holder pins. Also soldered the pins to the tie clip prongs for support.
(I double checked to insure polarity was correct)



I then hotglued everything more more support. I also hotglued the wires to the RTC circuit board, just for grins and giggles.



I then fastened the contraption to the RPi by using the tie clips mount attached to a RPi mounting screw.
Inserted the CR2023 battery and tested. All is well.



Thats all for now.

« Last Edit: February 13, 2021, 04:01:50 pm by DaOld Man »