Variable / Trimmer Capacitors

bpowell

Senior Member
Hello Gang,

I'm working on a binary clock project...and I've used the DS1307 chip as my RTC...I know the stock crystals / chip give about 20PPM performance, and I understand that can be dialed in a bit by using a variable / trimmer capacitor from X1 to GND on the crystal.

So, I'm wondering...what is the experience out there? What range of trimmer caps should I look for? Any part suggestions? I got a few trimmers from Mouser, but they're surface mount, and I'm afraid too small for me to work with...(Murata 2 - 20 pF 25Volt).

So, I thought I'd go to the source of all knowledge and see what the recommendations are.

Currently, my prototype was clocked running about a second and a half fast per day (which is within the 20PPM tolerance)...with a software adjustment at midnight, I have the tolerance down to around .4PPM...but I'd like to try and use a trimmer to keep the time from slipping so much per day. A second and a half over the course of a day is noticeable when comparing the clock to a reference. I know, as the designer, I'm the only one who will notice it...but geeze!

I'm going to look into the DS3231 for future projects, however, for my own "Because I can" mentality, I'd like to see how dialed in I can get the DS1307.

Thanks!
 

geoff07

Senior Member
You can pull an xtal frequency down a bit with a capacitor, though I wouldn't know what value, it would need some trial and error. But I expect it would be tiny so you would need a small cap and a physically small circuit arrangement. But there are other factors that affect stability, principally temperature, and the type of xtal. Before trying to pull the frequency I think I would buy a few and try swapping one for another to see if you can find one that is naturally closer to the setpoint. As temperature can affect a clock crystal by 0.04ppm/degC according to wikipedia, you are already pretty close to what is possible and better than a minute a month! If you really want an accurate clock why not use the radio clock signals from MSF?
 

bpowell

Senior Member
Yeah...I know there will be some trial and error...hence the trimmer / variable cap vs. a fixed value...but I need one that's a little easier to install / manipulate.

I know the clock is pretty accurate now...but I'm just trying to see HOW accurate I can get it (as a stand-alone clock).

MSF (WWVB for us here in the US) is also a great solution...however, I'm having trouble finding the receivers...since they've modified the WWVB signal, the new-and-improved receiver isn't released yet...and the old modules have dropped off the internet. I still poke around thrift-shops, looking for old "Atomic Clocks" which I will promptly tear apart for the receiver module.

Also, for the same cost of the receiver module, I've picked up a GPS receiver...so I will try setting (and maintaining) an RTC with time from GPS...which should be pretty easy...but still, I'm just trying to see how dialed-in I can get a stand-alone DS1307.

Thanks Geoff!
 

eggdweather

Senior Member
DS3231 would the obvious choice either that or use a varactor diode of about 20pf, most diodes do exhibit variable capacitance in reverse and you could drive it with a DAC output.
 

marks

Senior Member
Hi bpowell,
I did think to try this also but there is really no point.
you just can't compete with the accuracy of the ds3231.
- the code is almost identical
- we can also read the temperature
- we can use the faster 400 khz I2C
- it will work from 2.3v to 5.5v for our projects
I think they have become as cheap heres one like Ive just order to try.
http://www.ebay.com.au/itm/New-DS3231-Precision-RTC-Module-Memory-Module-for-Arduino-Raspberry-Pi-/201099257902?pt=AU_B_I_Electrical_Test_Equipment&hash=item2ed273282e
i will also be able to use it on my future r.pi when they come down in price lol
other cheaper modules also have memory
but if you have gps you proberly dont need a rtc at all.
 

premelec

Senior Member
@bpowell - we used to trim up vacuum tube circuits with 'gimmicks' which were capacitors simply made from a short twisted pair of wire with open end - you could try that for your initial adjustments and go for something better later... a temperature controlled xtal oven helps a lot... :)
 

fernando_g

Senior Member
Gimmicks caps. Ahhhh those were the days. And manipulating air core inductors (and applying wax afterwards).
 

fernando_g

Senior Member
Anyways to answer your question: have you considered a varactor to tune the capacitance?
Related question: do they still make trimmer caps? Haven't seen one in eons.
 

bpowell

Senior Member
Anyways to answer your question: have you considered a varactor to tune the capacitance?
Related question: do they still make trimmer caps? Haven't seen one in eons.
I'm not familiar with varactors,,, they look like two pin devices... Is need to adjust capicatance between x1 and ground... Where would I apply voltage to adjust it?

I'll have to do some learning!
 

eggdweather

Senior Member
A varactor diode as I suggested (can be just about any diode but a diode designed for tuning is better) would be fitted where the tuning capacitor would go, isolated with a series capacitor and you apply reverse voltage to the diode. So if the capacitor would normally be connected from one side of the xtal to ground, then the varactor diode would be connected anode to ground and cathode to the xtal via an isolating (for DC) series C usually of simialr size say 10pf and the diode cathode would be fed via a DC voltage from your DAC output with a series R (say 10K) to limit current flow, although not required if well below any breakdown voltage of the diode. Then as you vary the (in-effect) reverse voltage, the C varies and you adjust the freqenucy of the clock.
 

premelec

Senior Member
Keep in mind the temperature coefficient of diode C type units can be considerably more than a mechanical trimmer... and it's nice to know that varactors exist...
 
Top