The builtin real-time clock (RTC) in my Keithley 706 works rather nicely as a clock in my lab when the scanner is not in use. The 7-segment displays are big and clear and they are two dedicated displays for the seconds which comes in quite handy. However the main drawback of this auxiliary clock functionality is that, well, it is not very accurate. It is rather annoying when I need to adjust the clock every couple of days to make sure it remains correct.
Fortunately this problem is easy to fix as for most RTCs, the clock accuracy is directly determined by the 32768 Hz crystal it uses. So to make the clock more accurate, all we need to do is to use a more accurate clock source.
A typical on-chip crystal oscillator circuit is shown below. The load capacitors and the crystal are typically supplied externally (components below the dashed line). The load capacitors are almost always fixed with regard to the specific crystal oscillator used. However the exact oscillation frequency can be fine-tuned a little bit if a trim-capacitor is used.
The trim-capacitor method is rarely used however as it adds additional cost and requires extra calibration procedures. Also, the inherent temperature effect of a typical crystal makes such adjustment less useful.
An alternative way to achieve better precision is to not use the external crystal but to inject a precise 32768 Hz external signal directly into the OSC pin of the on-chip oscillator instead. This is possible as the core of the on-chip oscillator is simply an inverter (see schematics above). Without the external crystal oscillator to complete the feedback loop, the inverter simply inverts the signal presented at its input. This is the approach I took here.
The picture blow shows the main control board of the Keithley 706 scanner (you can take a look at my previous teardown article for more information). The RTC on this board is a μPD1990 serial I/O calendar and clock chip, which is located inside the highlighted yellow rectangle. The 32768 Hz clock crystal is to the bottom right of the RTC chip.
For this modification, I used a DS3232 temperature compensated precision RTC and configured to use its output (pin 3) to drive the XTAL input (pin 13) of the μPD1990. Note that for the DS3232 to output the 32.768 kHz clock signal, the 3rd bit (EN32kHz) of its control register (0Fh) must be asserted. If in your application the RTC is only operated by battery the 6th bit (BB32kHz) needs also to be set to 1 in order to enable the clock output. For the application described in this article, the Vcc of DS3232 is tied to the Vcc of μPD1990, which is in turn backed up by the on-board battery inside the Keithley 706.
The closeup picture below shows the modification to the main controller board. I first desoldered the 32.768 kHz crystal and then soldered the clock output directly to μPD1990’s XTAL pin (pin 13) and tied DS3232’s Vcc to μPD1990’s Vcc. The ground connection is tied to the ground pin of a nearby chip.
Here is a picture of the DS3232 board I made. A CR2032 cell along with a supercap provides the battery supply to the DS3232. The clock output, Vcc and ground connections are wired to the main board via the connector on the top. The DS3232 was calibrated with my HP 5350B using method mentioned in an earlier blog post.
There is plenty of space inside the Keithley 706 and the RTC board can be conveniently mounted on the supporting rail. Here is a picture showing the board mounted.
With this modification, I expect the clock accuracy to be better than a couple of seconds per month. You can easily use the same method to make pretty much any clock source that uses a standard 32768 Hz crystal more accurate.