Oscillator circuit -- check my math? - Page 1
Forum section: electronics / beginners

author: dcrookston
author_rank: Contributor
timestamp: June 12, 2021, 11:30:23 pm
content: 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.pdfand I'm using this paper for formulas, etc.:https://www.crystek.com/documents/appnotes/pierce-gateintroduction.pdfThe 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 C1and C2. I checked the data sheets for my inverter but I couldn't find Xclisted, 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 Rffrom the table -- 5Mfor 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 C1and C2with this formula:$$13pF=\frac{(C_{in}+C_1)(C_2+C_{out})}{C_{in}+C_1+C_2+C_{out}}+3pF$$Cinand Coutare the capacitance of the inverter; C1and C2will be equal. The inverter's datasheet lists Cinas 4.5pF but doesn't list a Cout, so I used 5pF. (I imagine Coutdepends on whatever is downstream of the inverter, and I'm not sure how to calculate that.)After doing the math I got 15pF for C1and C2.With that value determined, we can calculate the appropriate value for Rs using this formula:$$Rs=\frac{1}{2 \pi fC_2}$$Using 1Mas the frequency and 15pF for C2we get:$$Rs=\frac{1}{(2\pi)(1 \cdot 10^9)(15 \cdot 10^{-12})}$$which, if I did it right, gives 10k6. More or less.Final values, summarized:Rf: 5MC1and C2: 15pFRs: 10k6Have 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.QuoteInverter's datasheet:https://www.ti.com/lit/ds/symlink/sn74act04-ep.pdf

author: cortex_m0
author_rank: Regular Contributor
timestamp: June 13, 2021, 03:39:46 am
content: A little bit of notation clarification:Transconductance is usually given the symbol gmwith 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

author: dcrookston
author_rank: Contributor
timestamp: June 13, 2021, 06:57:16 am
content: 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?

author: cortex_m0
author_rank: Regular Contributor
timestamp: June 13, 2021, 10:24:47 pm
content: Quote from: dcrookston on June 13, 2021, 06:57:16 amDepends 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 includedQuoteYes. 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.

author: dcrookston
author_rank: Contributor
timestamp: June 14, 2021, 01:14:08 am
content: 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.

author: Tom45
author_rank: Frequent Contributor
timestamp: June 14, 2021, 03:36:00 am
content: Quote from: cortex_m0 on June 13, 2021, 10:24:47 pmMy 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)).