Crystal Oscillator Question (Transistor Based Amp)
Moderators: adafruit_support_bill, adafruit

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Sun Feb 17, 2013 9:18 pm

mstone@yawp.com wrote:Stated that way, putting a capacitor and inductor together gives you two lags, not a lag and a lead cancelling each other out.

I may give away my age here, but do you remember the TV show Diff'rent Strokes? If so:

What you talkin' 'bout, Willis? :D

Last night I stumbled on a website tutorial that I thought did a pretty good job of explaining phasor diagrams. I soon realized that I have become quite rusty when in comes to trigonometry, but generally speaking the tutorial usually (not always) made sense to me. In particular, I had trouble:

  • Reconciling the tutorial's explanation of phase shift with your explanation a few posts ago.
  • Reconciling the tutorials explanation of resonance with your explanation.

So where are you getting the two lags? I can see that the voltage drops across the inductor and the capacitor are 180 degrees out of phase with each other (as per tutorial link below), but again... it is my understanding that the two cancel each other out at resonance.

http://www.learnabout-electronics.org/a ... ra_101.php
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Sun Feb 17, 2013 9:47 pm

mstone@yawp.com wrote:Hmm.. the word 'leads' is technically accurate but misleading.. it suggests time running backwards.

Try these:

- In a resistor, voltage and current are in phase
- In a capacitor, voltage lags behind current
- In an inductor, current lags behind voltage

I agree with you on this point.

mstone@yawp.com wrote:Mechanically, current is equivalent to the momentum of a moving weight, voltage is equivalent to the tension in a stretched or compressed spring. If you connect them, a moving weight has momentum, but its motion stretches or compresses the spring. Tension in the spring applies force to the weight, and that changes the weight's speed.

By definition, the weight's speed keeps increasing as long as the spring tension keeps pulling it, so the weight will reach its highest speed when at the point where the spring stops pulling. Also by definition, the spring's tension will increase as long as the weight keeps moving away from that neutral point, so spring will reach its highest tension or compression at the points where the weight stops moving.

The tension and momentum always oppose each other, and each reaches its maximum (and can change the other most strongly) when the other reaches its minimum. You can say either one leads or lags the other, but trying to decide which one lags while the other one is leading gets confusing.

I understand the analogy. I also understand that if you connect a battery across a capacitor in a tank circuit, the voltage will oscillate back and forth as soon as the battery is disconnected. If the capacitor and inductor are ideal, the voltage/waveform will swing back and forth as a sine wave ad infinitum... but in reality the signal will die off due to resistance in the wires.

What I don't get is how this relates to phase shift in the phasor diagrams. :?: :?
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Sun Feb 17, 2013 10:19 pm

mstone@yawp.com wrote:And this one:

mauifan wrote:A second experiment I tried was... well... I realized that C1 and C2 were effectively in series from the perspective of X1. With C1=C2=22pF, the total capacitance across X1 was about 11pF (perhaps a little more due to the breadboard wiring). I replaced the crystal with a 180uH inductor and calculated that the resonant frequency of this tank circuit was about 3.5MHz. I fed a sine wave signal into one side of the tank and monitored the output signal. I saw a phase shift approaching 180 degrees, but it occurred at a much higher frequency than 3.5MHz.

The capacitors are only in series if you feed the input into the end of one of them. If you feed it into the node where the capacitor and inductor meet, they're effectively in parallel. That makes the effective capacitance 44pF. The equation for a CLC pi filter cancels out the factor of two though, so you got the resonant frequency right anyway.

Thing is, the phase shift of a CLC pi filter is only 90 degrees at resonant frequency. The filter only approaches 180 degree phase shift asymptotically, but most of the shift shows up over the first decade (10x multiple) of frequency.

Again, I am confused. :?: Everything I have seen on Google suggests that this pi network effectively divides capacitance in half. Or said another way, my Google searches answered the question about what capacitors I would need for a microcontroller, i.e.:

Take the crystal's load capacitance, multiply by two, and subtract 3-9 pF (to account for stray capacitance).

I have mentioned this on other threads, but perhaps it bears repeating. Based on my previous training with computers and such, I tend to have this "black box" mentality when it comes to design that may be interfering with my ability to truly get that "aha" moment. Any suggestions?
mstone@yawp.com wrote:In this case, you should see about 170 degrees of shift at 35mHz.

Are you saying 35 millihertz or megahertz? Can you explain how you calculated this?
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Mon Feb 18, 2013 10:43 pm

mauifan wrote:So where are you getting the two lags? I can see that the voltage drops across the inductor and the capacitor are 180 degrees out of phase with each other (as per tutorial link below), but again... it is my understanding that the two cancel each other out at resonance.

http://www.learnabout-electronics.org/a ... ra_101.php

If I may add to this as a means to try to clarify what I am trying to say....

I built a simple test circuit: A 1K resistor in series with a tank circuit (a 180uH inductor in parallel with two 22pF caps connected in series, total=11pF) connected to ground. I fed a sine wave into the 1k resistor and measured the response at the junction between resistor and tank circuit. At frequencies below ~1MHz, I saw a phase shift to the "left"; at frequencies about ~1MHz, I saw a phase shift to the "right."

I am not sure why resonance occurred at about 1MHz (perhaps stray capacitance in the breadboard?) instead of at about 3.5MHz, but that's not what I was testing for. Rather, I am confused by this thread because I saw exactly what I expected -- i.e. the up to 90 degree phase shift from the inductor and the opposite phase shift from the capacitor basically cancelled each other out.

I suppose I can visualize how the inductor can shift the phase 180 degrees from the perspective of the capacitor (or similarly how the cap can shift the phase 180 from the perspective of the inductor), but not from the perspective of the incoming reference signal, which by "definition" is zero degrees.

:?: :?
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Tue Feb 19, 2013 2:30 pm

What you talkin' 'bout, Willis? :D

Yeah, we're both from the same vintage. ;-) On rereading my own post in context of your questions, I'm going to quote Sanford and Son on myself:
You big dummy..

I screwed up. The description is based on convoluted reasoning that doesn't help you here and now. After you're comfortable with phasors and filters you may get drunk enough someday to think, "oh, so that's what he meant." But your next thought will be, "wow.. that really wasn't worth the effort."

If you've found a resource that makes sense, don't let me screw it up for you.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 11337
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Tue Feb 19, 2013 7:17 pm

mstone@yawp.com wrote:If you've found a resource that makes sense, don't let me screw it up for you.

Alas... I haven't found a resource that makes sense. I have found little nuggets and tidbits that individually make sense in and of themselves, but I am still struggling in my mind on how to piece it all together.

In this case, I am struggling with the concept of how a pi netwok (consisting of a crystal/inductor and 2 caps) is able to shift/invert a reference signal by [almost] 180 degrees at resonance. :?: :?: :?:

Or as in the case of the circuit in this link below (which I got from Google), how does the xtal (presumably in conjunction with C1 and C2) invert the signal?
http://www.play-hookey.com/oscillators/ ... llator.gif

(Again, mstone... let me reiterate that this thread is the best resource that I have found so far -- perhaps because I get to ask questions. Thanks!)
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Tue Feb 19, 2013 9:02 pm

mauifan wrote:In this case, I am struggling with the concept of how a pi netwok (consisting of a crystal/inductor and 2 caps) is able to shift/invert a reference signal by [almost] 180 degrees at resonance. :?: :?: :?:

See, that's the thing: it can't.

The problem is that the circuit diagram from Wikipedia is lying to you by omission. It gives you a recipe for putting components together and getting them to resonate, but doesn't show you the parts that make the circuit actually work.

Here's how the phase shifts actually appear around the feedback loop:

Image

The resistor and capacitor on the left form an RC low-pass filter with 60 degrees of phase shift for the component values shown.

A crystal's impedance is purely resistive at its exact resonant frequency, but acts like an inductor above that frequency. The actual curve looks like this:

Image

A you can see, it gets really inductive really fast for a really narrow range of frequencies above the actual resonant frequency. That's what makes the magic work.

The crystal is cut so its actual resonant frequency is slightly below the one you want.. maybe 15Hz low for a 1MHz crystal. The total phase shift around the loop is less than 360 degrees at the exact resonant frequency, but above exact resonance the crystal acts like an inductor. That inductance meets the second capacitor and forms a self-tuning LC filter that gives you enough phase shift to take the total phase shift around the loop to exactly 360 degrees.

The Wikipedia circuit (and most gate oscillator circuit diagrams) don't show you that all-important resistor coming in from the left. The circuit will work because of the inverter's nonidealities:

Image

and both of those 'hidden' features provide the delay which is critical to making the circuit work.

Case in point: if we have a 10MHz crystal, its period will be 100nS. The average CMOS inverter's propagation delay is about 10nS.. you add that to the inversion and you get an effective phase shift of about 205 degrees just from the inverter. The average CMOS gate can deliver about 25mA of current, which makes it equivalent to a 200 ohm resistor attached to a 5v supply. Assuming a 22pF cap, that gives you an RC filter whose cutoff frequency is about 36MHz. That gives you about another 15 degrees of phase shift at 10MHz. So.. taking parasitics into effect, we're actually getting about 220 degrees of phase shift from the inverter, as opposed to the ideal 180.

Circuit diagrams depend on what's called the 'lumped matter discipline'.. we know that real components have all sorts of parasitics, but when we draw that ideal resistor squiggle, we promise the reader that only the ideal resistive components of that device matter to the circuit. If the parasitics do matter, we add notes like "low ESR/tantalum" for capacitors that need to perform well at high frequencies.

Circuit diagrams that depend critically on unstated parasitics tick me off bigtime.. I imagine the person who drew them sitting back with a smug little grin and saying, "let's see if they're smart enough to figure this out."

Grr..
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 11337
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Thu Feb 21, 2013 7:21 pm

mstone@yawp.com wrote:
mauifan wrote:In this case, I am struggling with the concept of how a pi netwok (consisting of a crystal/inductor and 2 caps) is able to shift/invert a reference signal by [almost] 180 degrees at resonance. :?: :?: :?:

See, that's the thing: it can't.

The problem is that the circuit diagram from Wikipedia is lying to you by omission. It gives you a recipe for putting components together and getting them to resonate, but doesn't show you the parts that make the circuit actually work.

<lines deleted>

Circuit diagrams that depend critically on unstated parasitics tick me off bigtime.. I imagine the person who drew them sitting back with a smug little grin and saying, "let's see if they're smart enough to figure this out."

Grr..

I read your post a couple of times. My response the first time through was something to the effect of "Eureka! That's it!" But after the 3rd or 4th time through, I am no longer sure that your numbers make sense. :cry:

My study of electronics has been at times very frustrating for me, in part because every tutorial I have seen seems to omit some small detail that is vitally important to circuit operation. For example the tutorial at http://www.electronics-tutorials.ws/osc ... ators.html does a pretty good job, but the author seems to have a tendency to add "mystery components" to his circuit diagrams without explaining why he put them there.

Jeri Ellsworth also did a video on phase shift that i think is pretty good (see http://www.youtube.com/watch?v=T8lEGChW ... detailpage). She uses 3 stages of RC filters at about 60 degrees per stage to achieve 180 degrees -- which I think I totally understand -- but if you look at her circuit diagram near the 2:00 mark, she has a "mystery" 1Meg resistor. i assume that it exists for biasing, but... well... it just looks weird compared to other transistor amp circuits I have seen.

So... with Jeri Ellsworth's video in mind, I am going to stop this post here... and start a new entry in this thread....
(or maybe not... at least not now. I typed it up, pressed submit... and it was gone due to a timeout. Will have to try again later. The short version of that post was basically that I still don't get how the xtal, acting as an inductor, doesn't cancel out the effects of the previous stage.)
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Fri Feb 22, 2013 1:59 am

mauifan wrote:I read your post a couple of times. My response the first time through was something to the effect of "Eureka! That's it!" But after the 3rd or 4th time through, I am no longer sure that your numbers make sense. :cry:

I do that all the time. Sometimes it means there's a problem with the explanation, sometimes it means I have an idea sitting crooked in my head.

mauifan wrote:The short version of that post was basically that I still don't get how the xtal, acting as an inductor, doesn't cancel out the effects of the previous stage.)

You're probably getting caught on the electrical equivalent of a double negative.

Phase shift doesn't depend on the components per se.. it depends on the kind of filter the components make. Low-pass filters always give you a negative phase shift; high-pass filters always give you a positive phase shift.

When it comes to the kind of filter a group of components make, there are two variables in play: the type of component (inductor or capacitor), and its orientation in the circuit (series or shunt). That gives you four possible combinations:

Image

For reactive components in series (upper left, lower right), we care about the part of the input that makes it through the component and reaches the output node. For reactive components in shunt (lower left, upper right), the signal is already at the output node and we care about the part that doesn't escape through the component to GND.

The upshot is that a series inductor acts like a shunt capacitor, and a series capacitor acts like a shunt inductor.

Don't just take my word for it.. build all four versions and test them on your scope. It'll take maybe fifteen minutes and will give you the experience to bridge the gap between "that's what he says" and "I've seen it happen with my own eyes." That's a hugely important thing.

One of the few nice things about filters is that they 'superimpose', meaning you can basically add the effects of one to the effects of the next (technically it's an operation called 'convolution', but the idea is that they combine in an intuitive way).

If we redraw the two low-pass filters with impedances rather than resistors, then plug in the behavior for an inductor or capacitor, we get this:

Image

In both cases, we get "better than just a fixed value resistor" low-pass filtering.

I know I haven't talked about the RC filter that precedes this part of the ciruit, but the idea of superimposition applies there too. The LC section is a 'second order' low-pass filter (it has two reactive components, so the function that describes it is a second-order differential equation) and the preceding RC section is a first-order low-pass filter.

- The RC stage, being a low-pass filter, gives us a negative phase shift.

- The crystal, acting like a series inductor, keeps high-frequency signals from ever reaching the second capacitor. That gives us a second dose of low-pass filtering, and more negative phase shift.

- The second capacitor shunts higher-frequency signals to GND, for a third dose of low-pass filtering, with still more negative phase shift.

The trick is to add the modifiers 'series' and 'shunt' to the properties of 'inductance' and 'capacitance', and it's really easy to get confused (case in point, the post I disavowed a couple of days ago).

One of the less attractive things about filters is that everything's symmetric.. if energy flows into a component here, it flows back out over there. A component's shunt behavior is the inverse of its series behavior, and a capacitor's behavior is the inverse of an inductor's behavior. Descriptive words like 'charging', 'dicharging', 'through', and 'across' only apply to specific nodes at specific times, and using them in the wrong context sends you in exactly the wrong direction.

IMO, the best strategy is to study the simple (first-order) filters deeply enough to get a feel for them, then take the rules about combining filters on progressively more faith as the number of stages increases.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 11337
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Fri Feb 22, 2013 10:42 pm

mstone@yawp.com wrote:Phase shift doesn't depend on the components per se.. it depends on the kind of filter the components make. Low-pass filters always give you a negative phase shift; high-pass filters always give you a positive phase shift.

Awww... man! You mean to tell me that I did all that math for nothing??? :mrgreen:

Seriously, though... Last night I stumbled upon a video on YouTube (can't remember which video, but I think that this is a clip from the larger video: http://www.youtube.com/watch?v=ppK_z4O6 ... detailpage). While watching that video, I realized that the capacitor and crystal (acting as an inductor) formed a voltage divider. So I went through the math as shown below.

lc-phase-shift-math.jpg
My math exercise LC Phase Shift
lc-phase-shift-math.jpg (114.32 KiB) Viewed 1776 times

Does this look right to you, mstone? Assuming that I didn't make any mistakes in my "j" math, it proved to me that an inductor in series with a capacitor can indeed cause a phase shift of almost 180 degrees.

[Ignore the "w" (omega), except in the one line w=2*pi*f. I realized that I goofed and erased most of them, but obviously didn't get them all.)

And to back it up, I built a test circuit using L=180uH and c=11pf (actually two 22pF caps in series). I connected my scope to Vin (signal generator), and to Vout (channel 2). As was the case in other tests, I saw no phase shift below about 1MHz. I saw a HUGE gain at about resonance (aka about 1MHz) and a near 180 degree shift at about 1.27MHz.

Not sure why I saw resonance at 1MHz instead of the calculated 3.5MHz, but I presume that my breadboard has tons of stray capacitance based on how I wired it.
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Sun Feb 24, 2013 10:15 am

mauifan wrote:Awww... man! You mean to tell me that I did all that math for nothing??? :mrgreen:

Hey.. math is its own reward. ;-)

mauifan wrote:While watching that video, I realized that the capacitor and crystal (acting as an inductor) formed a voltage divider.

Yes! Absolutely right.

mauifan wrote:Does this look right to you, mstone?

Pretty much. You solved the equation correctly and your work is correct from one step to the next.

Ya kinda solved the wrong problem though.. ;-) What you derived (correctly) was the fact that an ideal LC tank has infinite gain (or zero impedance) at its resonant frequency. There's a connection between that and phase shift, but it isn't trivial.

This is one of the cases where drawing the pictures makes it easier. The 'j' equations for reactance draw out like so:

Image

The diagram at the bottom shows how you add reactances together.. basically "go up, go right, go down, then see where you end up." The angle of the "where you end up" arrow is the phase angle for the circuit.

The drawings are 'analytically correct', BTW.. they encode all the ideas you need to solve real problems. You can draw the arrows on paper, measure the "where you end up" arrow with a ruler and protractor, and get correct values for the RLC circut in question (to within the accuracy of your drawing and measuring tools).

The 'formal' version -- literally meaning 'done with formulas' -- is an equivalent but independent way of getting the same answers. All good (well, successful) mathematicians use both. The drawings give you a large-scale view of the problem, the formulas let you put a specific chunk of the problem under the microscope. Without the drawings, it's easy to get lost in a heap of symbols. Without the formulas, your results stop at 'somewhere around there' precision.

So.. using the drawings to get an overall view of what's happening, phase angle depends on the relative sizes of the inductive and capacitive components. If the inductive reactance is bigger, the phase angle is positive. If the capacitive reactance is bigger, the phase angle is negative. Either way, the limiting case is where there's no resistance and the circuit is effectively a pure inductor or a pure capacitor:

Image

If the reactance is purely inductive, the phase angle is 90 degrees. If the reactance is purely capacitive, the phase angle is -90 degrees. You can imagine the "where you end up" arrow (official name, the 'resultant') swinging from +90, through 0, to -90.. a 180 degree sweep.

Resonance is the special case where Zl and Zc cancel each other exactly:

Image

In that case, the resultant is purely resistive.. and apparently I forgot to draw the 'zero'. Whoops. ;-)

mauifan wrote:And to back it up, I built a test circuit using L=180uH and c=11pf (actually two 22pF caps in series). I connected my scope to Vin (signal generator), and to Vout (channel 2). As was the case in other tests, I saw no phase shift below about 1MHz. I saw a HUGE gain at about resonance (aka about 1MHz) and a near 180 degree shift at about 1.27MHz.

The effect was exactly what you predicted, even if the frequency wasn't. Bravo! You're getting good enough at this stuff that you can predict what will happen.

mauifan wrote:Not sure why I saw resonance at 1MHz instead of the calculated 3.5MHz, but I presume that my breadboard has tons of stray capacitance based on how I wired it.

A quick crunch of the numbers shows that, for a 180uH inductor, a 1.27MHz resonance takes about 100pF of capacitance. That's easily within the limits of what a breadboard can do.

More importantly, we've gotten to the point where it's easy to explain the difference between your prediction and the experimental results.. in this case, it was the exact parasitic capacitance of something known to have parasitic capacitance. Adjusting for the exact result just involves plugging in another number.

Plugging in numbers is easy. Understanding where to plug them is the hard part, and you've come a heckuva long way from where you started. Zen high-fives all around. ;-)
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 11337
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Mon Feb 25, 2013 12:56 am

mstone@yawp.com wrote:Ya kinda solved the wrong problem though.. ;-) What you derived (correctly) was the fact that an ideal LC tank has infinite gain (or zero impedance) at its resonant frequency. There's a connection between that and phase shift, but it isn't trivial.

I solved the wrong problem? How so? It seems to me that your "box step" approach to this "dance" yields the same result as my "shuffle step." :D

The equation I derived was:

Gain "Vector" = -jXc / [RL + j(XL - Xc)]

I am not sure I will do a good job of explaining it, but in my mind, the "amplitudes" of Xc, XL, and RL kinda determine the phase angle (which given that the reference signal is at zero, also means phase shift).

If Gain predominately along +REAL AXIS ==> near 0 phase shift;
If Gain predominately along -REAL AXIS ==> near 180 phase shift;
If Gain predominantly along +j axis ==> near +90 degree phase shift;
If Gain predominantly along -j axis ==> near -90 degree phase shift;

Said another way, this equation gives me a mental picture of the resultant vector (angle and amplitude). If the resultant vector has components along both the real and "J" axis, the angle will differ.

Example:
If Xc=10, XL=5, and RL=100, you are saying "Take 5 steps up the +j axis, then +100 steps along the real axis, then walk 10 steps in the -j direction, and see where you are standing in relation to your starting point and the +real axis.

I think I am saying the same thing, but I don't think that the order matters. I can walk 5 steps up the +j axis, and then take 10 steps back. As long as I walk the same +100 steps, I will end up in the same place.

Am I making sense? I think this is a case where I have the mental picture correct, but I don't think I am explaining it well.
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Mon Feb 25, 2013 1:22 am

While I am at it, I suppose my next step may be to actually build a circuit... but I think I am going to encounter some "difficulty."

If I connect the output of my transistor amplifier circuit to my LC filter, it seems to me that my circuit will oscillate at whatever the LC circuit's resonant frequency happens to be at (which seems to be at about 1MHz). But if I try to do the same with a crystal, it seems to me that my circuit will need to be far more "picky" to get it to oscillate.

Hmm... not sure how to ask this.... but my 32KHz crystal needs a 12.5pF load to oscillate at its intended frequency.

1) How am I going to get my load value down considering that my breadboard seems to be adding 100pF load?

2) In my mind, a 12.5pF load means that the crystal "sees" a 12.5pF capacitor across its terminals. On the one hand, I know what that means. On the other... well... I am getting confused over it because... well... let's just say that I have some difficulty imagining myself as that crystal.

Said another way, I kinda get what it means to have a Thevenin equivalent circuit, but it is not always easy to imagine it.

Anyway... it's getting late. I am sure that I can do a better job explaining my question, but I will leave it as is for now.
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Mon Feb 25, 2013 5:32 pm

mauifan wrote:I solved the wrong problem? How so? It seems to me that your "box step" approach to this "dance" yields the same result as my "shuffle step." :D

The equation I derived was:

Gain "Vector" = -jXc / [RL + j(XL - Xc)]

I guess it was a point of vocabulary. Gain is the vector's vertical component. Delay is its horizontal component, and phase is the angle. The vector itself is called the 'response vector' or 'phasor'.

mauifan wrote:If Gain predominately along +REAL AXIS ==> near 0 phase shift;
If Gain predominately along -REAL AXIS ==> near 180 phase shift;
If Gain predominantly along +j axis ==> near +90 degree phase shift;
If Gain predominantly along -j axis ==> near -90 degree phase shift;

Correct, but there's one subtle point: to get a response predominantly along the -REAL axis, you need a negative resistance. We don't actually have -100k resistors, but you can simulate the effect with active components or by chaining filters together.

mauifan wrote:Am I making sense? I think this is a case where I have the mental picture correct, but I don't think I am explaining it well.

All the ideas are there, and you're arranging them in the right order. Wording is just a technical detail.

Do keep working on the verbal description. The more times you run through it, the better the ideas will align themselves in your mind. You're past the steep part of the learning curve though. If you go back through your references, you'll probably have a lot of small Aha! moments when you hit things that gave you trouble before. When you get to the "yeah yeah, whatever" stage, you'll be ready to tackle Fourier transforms and Laplace transforms. ;-)

Congratulations!
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 11337
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Mon Feb 25, 2013 6:29 pm

mauifan wrote:While I am at it, I suppose my next step may be to actually build a circuit... but I think I am going to encounter some "difficulty."

Not really. What you'll get is an effect called 'pulling'.

If you remember, the crystal's inductance increases (dramatically) with frequency. That inductance works with the load capacitance to form a second-order filter, and the filter takes the phase shift around the loop to 360 degrees. The loop's phase shift is a function of the filter response, the filter response is a function of frequency, and oscillation happens when the phase shift is exactly 360 degrees.

The filter response also depends on the size of the capacitor though. The load capacitance in the datasheet is the value that gives you exactly the right amount of phase shift at exactly the right frequency. A different-sized capacitor will just move the '360 degree phase shift' effect to a different frequency. Instead of having a 32768Hz oscillator, you might get a 32767.9Hz oscillator.

Deliberately adjusting the capacitance to tune the oscillator's frequency is called 'pulling the frequency'. It's something you do when you need a time base that's truly accurate and stable, like for HAM radio.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 11337
Joined: Thu Feb 11, 2010 2:51 pm