# Building a crystal controlled oscillator.

**URL:** <https://boards.straightdope.com/t/building-a-crystal-controlled-oscillator/706282>\
**Category:** Factual Questions\
**Created:** [December 4, 2014, 2:29am UTC](https://boards.straightdope.com/t/building-a-crystal-controlled-oscillator/706282 "2014-12-04T02:29:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mdcastle](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mdcastle](https://boards.straightdope.com/u/Mdcastle)\
**Post date:** [December 4, 2014, 2:29am UTC](https://boards.straightdope.com/t/building-a-crystal-controlled-oscillator/706282/1 "2014-12-04T02:29:44Z")

</div>

I’m looking at the application note for the datasheet on the LM393, and was wondering if the crystal oscillator would be easily constructed, or if this is getting into the realm of leads too long causing too much capacitance and it not working. Also, the data sheet uses a 100khz crystal, do I need to modify anything to use a more common 32768 crystal with these specs:  
Load Capacitance: 12.5pF.  
Equivalent resistance: 35KΩ.  
Frequency tolerance: +20 PPM  
I would then use a 4059 to get the exact frequency I want. Is there a guide or online calculator on how to use one of these?

> **[lm293-n.pdf](https://www.ti.com.cn/cn/lit/ds/symlink/lm293-n.pdf)**
>
> 1531.76 KB

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [December 4, 2014, 4:12am UTC](https://boards.straightdope.com/t/building-a-crystal-controlled-oscillator/706282/2 "2014-12-04T04:12:34Z")

</div>

Unless you really want the excitement of building your own oscillator, I would recommend a “clock oscillator” like this:

> **[DS32KHZN/DIP | Digi-Key Electronics](https://www.digikey.com/en/products/detail/DS32KHZN%2FDIP/DS32KHZN%2FDIP-ND/420269)**
>
> Order today, ships today. DS32KHZN/DIP – 32.768 kHz TCXO CMOS Oscillator 5V 14-DIP Module from Analog Devices Inc./Maxim Integrated. Pricing and Availability on millions of electronic components from Digi-Key Electronics.

If you want to make your own, it’s easier to use a inverter to drive the crystal, like [this](http://electronicdesign.com/site-files/electronicdesign.com/files/archive/electronicdesign.com/content/content/63079/63079-fig1.jpg).

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [December 4, 2014, 10:59am UTC](https://boards.straightdope.com/t/building-a-crystal-controlled-oscillator/706282/3 "2014-12-04T10:59:53Z")

</div>

> [@beowulff](#):
>
> Unless you really want the excitement of building your own oscillator, I would recommend a “clock oscillator” like this:  
> [DS32KHZN/DIP Analog Devices Inc./Maxim Integrated | Crystals, Oscillators, Resonators | DigiKey](http://www.digikey.com/product-detail/en/DS32KHZN%2FDIP/DS32KHZN%2FDIP-ND/420269)

I had exactly the same thought. I haven’t used a discrete oscillator circuit like that in decades.

> [@beowulff](#):
>
> If you want to make your own, it’s easier to use a inverter to drive the crystal, like [this](http://electronicdesign.com/site-files/electronicdesign.com/files/archive/electronicdesign.com/content/content/63079/63079-fig1.jpg).

To expand on this a bit, this is called a “Pierce Oscillator” (named after its inventor). The wikipedia article for it has decent information about how it works:

> **[Pierce oscillator](https://en.wikipedia.org/wiki/Pierce_oscillator)**
>
> The Pierce oscillator is a type of electronic oscillator particularly well-suited for use in piezoelectric crystal oscillator circuits. Named for its inventor, George W. Pierce (1872–1956), the Pierce oscillator is a derivative of the Colpitts oscillator. Virtually all digital IC clock oscillators are of Pierce type, as the circuit can be implemented using a minimum of components: a single digital inverter, one resistor, two capacitors, and the quartz crystal, which acts as a highly select If th...

This is a more detailed beginner-level description of a Pierce Oscillator (warning - PDF):

> **[pierce-gateintroduction.pdf](https://www.crystek.com/documents/appnotes/pierce-gateintroduction.pdf)**
>
> 187.86 KB

While the wikipedia article does say basically how to calculate the values for the capacitors, the pdf article goes into a lot more detail about it and also explains the feedback resistor a lot better (including why it would be missing in the schematic that **beowulff** linked to).

You can google “Pierce oscillator” for more info.
