Author Topic: Oscillator circuit -- check my math?  (Read 677 times)

0 Members and 1 Guest are viewing this topic.

Offline dcrookstonTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Oscillator circuit -- check my math?
« on: June 12, 2021, 11:30:23 pm »
Hi,

I'm (trying to) build a 1MHz Pierce-gate clock signal generator.  I've got this crystal (relevant data below):https://www.mouser.com/datasheet/2/122/ECS-10-13-1XH-1830021.pdf

and I'm using this paper for formulas, etc.: https://www.crystek.com/documents/appnotes/pierce-gateintroduction.pdf

The first thing I'm having trouble with is that I'm supposed to do some math to ensure that the circuit's gain is >= 1.  This requires knowing the transconductance (Xc) of the inverter, and the reactance of C1 and C2.  I checked the data sheets for my inverter but I couldn't find Xc listed, and the (admittedly small amount of) Googling I did, didn't turn up a formula for calculating it.  Same with reactance of capacitors.  But it seems that, in the circuit shown in the paper, the logic IC is already functioning as a high-gain amp, so I didn't worry about it too much.  The inverter I'm using is an SN74ACT04IDREP.  (Datasheet linked below.)

I picked the value of Rf from the table -- 5M \$\Omega\$ for a 1MHz circuit.  Easy.  I'll need to optimize it when I'm building the actual circuit but it should be fine for now.

Now for the capacitors.  Their values depend on the load capacitance of the crystal, which is 13pF.  Then you calculate the values of C1 and C2 with this formula:

$$13pF=\frac{(C_{in}+C_1)(C_2+C_{out})}{C_{in}+C_1+C_2+C_{out}}+3pF$$

Cin and Cout are the capacitance of the inverter; C1 and C2 will be equal.  The inverter's datasheet lists Cin as 4.5pF but doesn't list a Cout, so I used 5pF.  (I imagine Cout depends on whatever is downstream of the inverter, and I'm not sure how to calculate that.)

After doing the math I got 15pF for C1 and C2.

With that value determined, we can calculate the appropriate value for Rs using this formula:

$$Rs=\frac{1}{2 \pi fC_2}$$

Using 1M \$\Omega\$ as the frequency and 15pF for C2 we get:

$$Rs=\frac{1}{(2\pi)(1 \cdot 10^9)(15 \cdot 10^{-12})}$$

which, if I did it right, gives 10k6 \$\Omega\$.  More or less.

Final values, summarized:
Rf: 5M \$\Omega\$
C1 and C2: 15pF
Rs: 10k6 \$\Omega\$

Have I done my math right?

Also, if you've made it this far, what does this (from the paper) mean, and how can I find these values for my crystal?  They aren't on the data sheet.

Quote
In the Pierce-gate oscillator, the crystal works in the inductive region of its reactance curve.

Inverter's datasheet: https://www.ti.com/lit/ds/symlink/sn74act04-ep.pdf
« Last Edit: June 12, 2021, 11:32:19 pm by dcrookston »
 

Offline cortex_m0

  • Regular Contributor
  • *
  • Posts: 114
  • Country: us
Re: Oscillator circuit -- check my math?
« Reply #1 on: June 13, 2021, 03:39:46 am »
A little bit of notation clarification:
Transconductance is usually given the symbol gm with units of Siemens (or in some older references, Mhos), and the reactance of a capacitor is Xc, given in Ohms.

The reactance of a capacitor is simple to calculate. Xc = 1 / (j*2*pi*C), where f is the oscillator frequency in Hz, C is the capacitor value in Farads, and j is the unit of complex impedance (commonly known as the imaginary number "i" in mathematics).

Transconductance is not ordinarily specified for logic gates; logic chips like the hex inverter you've selected are generally intended to take signals in the same voltage domain, but provide more current drive, e.g. a 2mA capable output from a microcontroller can be converted to 24mA with an LVC family logic chip.

Texas Instruments sells chips intended for oscillator applications, such as the SN74LVC1404, which does have gain data in the datasheet: https://www.ti.com/lit/an/szza043/szza043.pdf
 

Offline dcrookstonTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Re: Oscillator circuit -- check my math?
« Reply #2 on: June 13, 2021, 06:57:16 am »
So it looks like I could have skipped a lot of the headache and just picked up a SN74LVC1404, yeah?

The j in that formula -- is it mathematically identical to i, but with a specific meaning in this context?
 

Offline cortex_m0

  • Regular Contributor
  • *
  • Posts: 114
  • Country: us
Re: Oscillator circuit -- check my math?
« Reply #3 on: June 13, 2021, 10:24:47 pm »
So it looks like I could have skipped a lot of the headache and just picked up a SN74LVC1404, yeah?

Depends on whether the task is to get something that works as quickly as possible with as few complications, or learning certain fundamentals. But, professionally I have always been able to buy an oscillator, or use an IC (like a modern microcontroller) that has a crystal interface included

Quote
The j in that formula -- is it mathematically identical to i, but with a specific meaning in this context?

Yes. The urban legend is that the symbol "j" was chosen because electrical engineers use "i" for current (Amps). I've never seen that in writing though.
 

Offline dcrookstonTopic starter

  • Contributor
  • Posts: 11
  • Country: us
Re: Oscillator circuit -- check my math?
« Reply #4 on: June 14, 2021, 01:14:08 am »
Well, I've enrolled in 6.002.1x, Circuits and Electronics, and I plan to complete the full set which is equivalent to MIT's full 6.002 course.  In the meantime, though, I do just want to get the damn clock circuit working =)  I've looked through TI's site and I'm sure I can find something on there to help me set up a quick (and hopefully not too dirty) clock signal generator.
« Last Edit: June 14, 2021, 01:15:44 am by dcrookston »
 

Offline Tom45

  • Frequent Contributor
  • **
  • Posts: 556
  • Country: us
Re: Oscillator circuit -- check my math?
« Reply #5 on: June 14, 2021, 03:36:00 am »
Quote
The j in that formula -- is it mathematically identical to i, but with a specific meaning in this context?

Yes. The urban legend is that the symbol "j" was chosen because electrical engineers use "i" for current (Amps). I've never seen that in writing though.

My freshman year in EE back in the 60s we were told that EEs use j because i was already used for current. Don't remember if it was in a textbook or not.

We got i for current from the frenchman  André-Marie Ampère (intensité du courant, (current intensity)).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf