# Cannot fine tune Colpitts oscillator with crystal

I'm trying to design a cheap video synthesizer. In order to do it, I need to provide my Arduino Nano with an external clock so it can drive the timer that generates the complex video pulses I need.

What I wanted was to have the possibility to "move" the horizontal timing in order to synchronize it to an external video source or not, and also have the possibility to slightly move the H timing for video feedback purposes.

For this, I first tried to make a clock with 4046 IC and some capacitors at 15.625kHz (scanline rate) but it jitters a lot and it's not as precise as I need.

I have the idea to build a basic oscillator with a 4.43MHz crystal with a variable capacitor and a varactor diode for using as a timing source of the Arduino timer, and modify the timing settings in my Arduino code because they are calculated right now for 15.625kHz. I saw a similar approach like this on other systems and they work. There are some differences though and that's why I can't do the same thing with my design.

The problem: I tried the schematic posted and get the 4.43MHz sine but I can't fine tune it with the variable capacitor. When you move the variable capacitor, the sine changes amplitude but the frequency does not change. I didn't try the varactor yet because first I wanted to know if the schematic works. I also tried a Pierce design on a TI paper and it does the same thing or doesn't make any modifications on frequency or amplitude at all. What am I doing wrong? I made some changes in the original schematic because there are some parts I don't have. Those changes are in red.

• The frequency does change but the change is so small that you're not seeing it. The change will be in the order of ppm, parts per million. Like 10 ppm which equals to 40 Hz change on 4.43 MHz. Does your measurement equipment have enough resolution to measure that? Apr 17, 2020 at 15:22
• Sorry! Changed! :) Apr 17, 2020 at 15:24
• It's "kHz" and "MHz". Ditto what @Bimpelrekkie says. What did you use to measure any changes in frequency? Apr 17, 2020 at 15:29
• kHz / MHz: I'll change it. Thanks for the input on that! Apr 17, 2020 at 15:31
• The amplitude changes because you're getting closer or further from the crystal's resonant frequency, I believe. You are tuning it, and your scope isn't displaying anything precise enough to measure it, as @Bimpelrekkie explains. Apr 17, 2020 at 15:40

Take the equivalent circuit of a crystal: -

In perfect series resonance it will have this frequency of oscillation: -

$$F_S = \dfrac{1}{2\pi\sqrt{L_1C_1}}$$

And, if you calculate the value it is 5.850652 MHz (not far from the 4.43 MHz used by the OP).

But, look at the value of capacitance used ($$\C_1\$$) - it is 3.7 femto farads (fF). With 5 pF extra in series the series net capacitance becomes 3.697 fF. With 60 pF in series it becomes 3.6998 fF.

So taking the value of 3.697 fF (5 pF added tuning) and recalculating the series resonant frequency you get 5.853025 MHz.

As you can see you might get a change in frequency of 0.04 %.

• Is this as stable as a Crystal clock? Apr 18, 2020 at 17:58
• @DanChelger I'm not sure what you mean. My answer is about explaining your circuit and, your circuit is an oscillator so, it has to be unstable (within bounds) for it to oscillate. I also explain that your variable capacitor can move the frequency slightly and a crystal clock probably doesn't have that facility therefore "this" cannot be as stable as a Crystal clock. But I don't really know how to make comparisons here because Crystal clock doesn't have some universal or generic meaning. Apr 19, 2020 at 12:12

I'm wondering at the whole approach you're taking with the problem. If the video doesn't need to be synchronized, then you should not care so much about how accurate the crystal is - video devices are fairly tolerant of this. A hundred PPM or so should be good enough.

On the other hand, if you're using the trim to try to match another video source's line rate, so that you can make a modified hsync using digital methods, without jitter... that's not a workable approach. You need what's called a line-locked clock, that is, a clock that makes a known number of clocks per horizontal line, with a known phase relationship to a reference hsync.

There's a number of techniques for doing this, using VCOs, delay-locked loops, frequency synthesizers with VCXOs, and so forth. The very simplest method is similar to what old TVs did: 'crash-lock' the line clock with sync (actually, they did this with the color burst). But since sync is the very thing you want to control, crash-lock won't give good results. You need something better.

There's a number of very old chips out there that make line-lock clocks. They're basically obsolete now. My suggestion? Use a digital TV decoder chip. This will give you a very good line-locked clock with low jitter and extracted syncs, which will be useful to you even if you decide you don't want to do anything with the video data itself.

Using a TV decoder this way is not like the cheap-and-cheerful video of old, but it will give you good results.

• Thank for the reply! The idea is to have the possibility to sync it or to go on freerun mode. I tried an approach with CD4046 at 15.625kHz (line rate) were the frequency was modified with a pot on the VCO input. It was not stable so it didn't work well. The idea is not just to have lock on the video input but have the possibility to move the H sync so the image moves. My approach is similar to a design made some years ago by an artist, but in that case, he did this with a varactor on a 13.5Mhz tank that controlled the Arduino clock directly. That works perfect, I have that design working. Apr 18, 2020 at 17:55
• With the CoVid I don't have places to buy right now those components. So, having some 4.43Mhz crystals, my idea was to drive not the processor but a timer in order for it to generate the line pulses every 15.625kHz. 4.43Mhz clock -> Sine to Square -> Timer input on arduino dividing the 4.43Mhz to 15.625kHz Apr 18, 2020 at 17:57

I saw a video about opening up the crystal and sanding it slightly to make it a higher frequency. So I would suppose you can make about any crystal value you want by just getting a lower frequency crystal and then sanding it down until you get your desired frequency. Not very satisfying, but supposedly it works.