Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2167

How to Upgrade my Digital Thermometer Clock?

$
0
0
The Digital Thermometer clock used a DS1302 RTC chip which isn’t really very accurate and mine tends to lose a few minutes every month, so I started looking around to see if I could find a better alternative.

The DS3231 is billed as an “Extremely Accurate I2C-integrated RTC”. These are supplied in 16 pin surface mount DIL packages and from the limited research I did, seemed a little bit expensive. It would also mean that if I wanted to create a simple upgrade to my clock, I’d have to either make an new PCB, or a small piggy-back PCB board to hold just the chip.
Ebay to the rescue.

I found these:
 
 
A search for "DS3231 for Pi" revealed many sellers selling these tiny modules that have a backup battery, the IC, associated discrete components and an interface connector all for very little money but it took a bit of fiddling to figure out the pin connections as the documentation on the Ebay sellers site was just plain wrong, however with the aid of a multi-meter I managed to “tap out” the pins.

Unfortunately they are supplying a lithium backup battery rather than a super-capacitor. This means that the battery will probably need to be replaced at some point.

The conversion of the existing clock is really quite simple.

First, you need to de-solder and remove the following components:
  • Battery BT1
  • KY270-38002-0331 Jumper
  • IC5 (RTC Chip) and its socket if you used one
  • X2 32KHz Crystal
The topside of your PCB should now look something like this:
Picture
 
In place of the J2 jumper you've just removed, you will need to solder in a wire link as the existing jumper is too tall and will get in the way of the replacement RTC module.

Next there are three modifications to the underside of the PCB board required.
Picture
 
A small wire link needs to be soldered as shown in the yellow circle on the right of the image. This allows +5v to flow to one side of the soldered J2 jumper and eventually into the new RTC module.

Next carefully solder in two 4.7K resistors as shown. These act as +5v pull-ups for the I2C bus connections to the new RTC module. I’ve outlined where the original RTC IC chip was.

The last activity is to modify a 5-pin Molex connector to accommodate the new RTC module. You could just use a strip of 5-header pins instead.
Picture
 
Solder a small length if wire to the right-hand pin. This will be used for the modules GND connection.

The modified connector needs to be soldered into the top row of 4 holes left by the original RTC IC. You may need to carefully drill these holes a bit larger of your connector pins won't fit.

The wire from the connector is soldered into the bottom right pin hole left after the removal of the original RTC chip - pin 4.

The module can now be inserted into the connector as shown in the lower picture.
Picture
 
The last activity is to load the new firmware .HEX file into the PIC and then switch on.

I do have a re-vamp of this project planned that will include the DS3231 module as standard, but this quick conversion does the job nicely.

The below .ZIP file contains the new .HEX file firmware, and the project source code for those of you who want to make your own modifications.

Viewing all articles
Browse latest Browse all 2167

Trending Articles