Trimming a 32.768 kHz oscillator circuit - Page 1
Forum section: electronics / projects

author: Dragon88
author_rank: Regular Contributor
timestamp: April 05, 2015, 12:44:48 am
content: A while back, I threw some semi-decent 32.768 kHz crystals onto a Digikey order. I hadsomeplan for them at the time, but they ended up sitting around. Today I decided to make one jiggle and see how good they really are.I popped a 74LVC1GX04 on the breadboard and some passives to make up a Pierce oscillator. Of course my passive values were all wrong at first, so I messed around with that for a while, and ended up using a decade box to find Rs. Then it came to C1 and C2. C2 was happy at 68 to 100 pF paired with a very low value for C1. Somethingaround5 pF. But of course this is where I ended up spending most of my time, because I had to play the game of seeing how close I could get to spot on. Just using a 4.7 pF for C1 worked, but the frequency was too high. My entire bag of 4.7pF caps measured about 3.8, and I actually needed somewhere around 5 pF to "zero" in the frequency. Not having a variable cap handy, I put two 10 pF in series and that got me really close. 32.768071 kHz (yes my counter is calibrated). I tried several caps from the bag hoping to find that magic pair, but alas, I was still out. I needed half a bee's dick more capacitance on C1, as Dave would say.I then tried something a little odd. I hooked up the big electrolytic seen in the picture below to ground, and left it unconnected on the positive side. It's just pushed into the breadboard close to the C1 capacitors but not connected. The pin from the adapter board in that row is a non-connect. This big electrolytic just being physically close to the others got me what I needed. It's actually pretty fun, I can push it around and "trim" the frequency of the circuit. Pushing it closer to the two caps near it (probably their leads actually) increases the C1 capacitance and reduces the frequency of the circuit a tiny amount. Similar to interfering with a circuit by touching components with your hand, but more controlled.Of course this is totally impractical. Once the temperature changes a degree C or a butterfly farts I'll be off again, but it made for a fun hour or so messing around on the breadboard. These crystals seem pretty good, I'll probably use them for a RTC some time in the future. I don't usually see careful trimming on RTC circuits, but maybe I'll try to make a really accurate one with some trimmers. Oh, and of course gravity compensation!

author: Rufus
author_rank: Super Contributor
timestamp: April 05, 2015, 01:03:01 am
content: https://www.google.com/search?q=gimmick+capacitor

author: calexanian
author_rank: Super Contributor
timestamp: April 05, 2015, 07:02:18 am
content: Be careful. You may wind up fighting with Schrodenger and his cat really fast!

author: German_EE
author_rank: Super Contributor
timestamp: April 05, 2015, 10:27:21 am
content: Assuming that you do not want to use a trimmer there are a number of alternatives for a gimmick capacitor:1) Twisted wire, but you probably knew this one already2) 50 ohm coax cable has a capacitance of about 100pF/m so your 5pF trimmer will be about 5cm of coax.3) PCB material. Capacitance depends on the thickness and type of the dielectric but once you have a small piece soldered in place you can just snip pieces off until you get the value you need.

author: dannyf
author_rank: Super Contributor
timestamp: April 05, 2015, 11:23:23 am
content: Quotethat's 2ppm off 32Khz. At t hat level, temperature induced drift may dominate.Small capacitors are nothing but 1 wire twisted around another insulated wire. Pulling the straight wire allows adjustment of the capacitance.

author: Dragon88
author_rank: Regular Contributor
timestamp: April 05, 2015, 12:47:21 pm
content: Quote from: dannyf on April 05, 2015, 11:23:23 amNo doubt. It was 5 degrees C colder in the lab this morning because I didn't run the heat last night, so I fired up the circuit as I had it yesterday and checked the numbers. It had drifted down about 2.2 ppm, which is better than predicted by the data sheet.I like all of these trimmer ideas!I will try some today. I especially like the varactor idea and locking it to a frequency reference. Maybe I'll just do temperature compensation with a small microcontroller, DAC, and temp sensor to start.

author: Zero999
author_rank: Super Contributor
timestamp: April 05, 2015, 01:05:43 pm
content: You could put the crystal in a small oven and heat to something like 40oC. It's fairly easy to build this yourself.

author: dom0
author_rank: Super Contributor
timestamp: April 05, 2015, 03:25:48 pm
content: Watch crystals have their inflection point at about 25 °C so you will get to high temperature coefficients quickly with rising oven temperature. Wouldn't go farther than 40 °C.Anyways, watch crystals are not the best crystals (in many ways). If you want precision 32.768 kHz, use a miniature TCXO and a frequency synthesizer.Also, breadboards are not really suitable for most kinds of oscillator circuits...