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

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Tue Feb 26, 2013 7:24 pm

Hey mstone! I have some good news... and some not-so-good news. :D :(

Armed with the newfound knowledge that a LC voltage divider can indeed shift phase 180 degrees and old knowledge that a LC circuit will resonate at some semi-known frequency, I built the following circuit:

LC-oscillator-success-circuit.jpg
LC Oscillator Circuit Diagram
LC-oscillator-success-circuit.jpg (29.66 KiB) Viewed 1300 times

It worked!!! You might be able to see the details yourself, but I got a nice steady sine wave at a frequency a hair over 1MHz!

LC-oscillator-success-1MHz.jpg
LC Oscillator Circuit Output
LC-oscillator-success-1MHz.jpg (124.34 KiB) Viewed 1300 times

Needless to say, I am thoroughly excited about this! And the frequency seems to be compatible with earlier discussions, i.e. a 180uH inductor and 120pF capacitor resonate at about 1MHz. :D :D :D :D :D

Now for the bad news....

This also means that I have about 100pF of stray capacitance in my circuit! :cry: :cry: :cry: :cry: :cry:
My 32kHz crystal requires a load of 12.5pF. My 4MHz crystal requires a load of about 20pF.
How on earth am I going to realistically remove 100pF from my breadboarded circuit???

The obvious (?) answer is to put a small capacitor in series with Cbreadboard, but... well... how exactly does one accomplish this feat given that Cbreadboard is virtual?

(Needless to say, my attempt to replace the inductor with a crystal didn't work. :) )
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Wed Feb 27, 2013 6:07 pm

mauifan wrote:It worked!!! You might be able to see the details yourself, but I got a nice steady sine wave at a frequency a hair over 1MHz!

LC-oscillator-success-1MHz.jpg

Needless to say, I am thoroughly excited about this! And the frequency seems to be compatible with earlier discussions, i.e. a 180uH inductor and 120pF capacitor resonate at about 1MHz. :D :D :D :D :D

Actually... now I am starting to think that maybe I got lucky. :(

As an experiment, I adjusted the gain (Rc). I found that there was a "sweet spot" in the vicinity of 3K. Too little gain, and the oscillation stopped (as I suspected). Too much gain, and the oscillation stopped as well (not what I expected.)

As a second experiment, I removed the two 22pF caps from the circuit. I guess I am not at all surprised, but the circuit still worked... albeit at a slightly higher (and expected) frequency. So my question from my previous post remains: How do you deal with stray capacitances in a breadboard?

(Another thought that came to mind was to try to spread the connections apart, i.e. rather than use every row on the breadboard, use every other -- or every 3rd -- row. But then again, the leads on my test components are only so long, which I foresee as somewhat limiting.)
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Thu Feb 28, 2013 12:30 am

mauifan wrote:It worked!!! You might be able to see the details yourself, but I got a nice steady sine wave at a frequency a hair over 1MHz!

All right! :D

mauifan wrote:Needless to say, I am thoroughly excited about this!

Darn straight.. you worked hard to earn it. Fair warning though: that rush is the opium hit of circuit hacking. It's addictive.

mauifan wrote:How on earth am I going to realistically remove 100pF from my breadboarded circuit???

You don't. That isn't bad news though.. it's another triumph.

Your knowledge has advanced beyond the limits of your tools, so you're ready to pick up a more powerful set of tools. It's kind of like the day you realized that you needed more than a multimeter, and bought an oscilloscope. Breadboards are okay for circuits in the milliamp, microfarad, and kilohertz range. They're nearly useless in the microamp, picofarad, and megahertz range though. To get good results in that region, you have to break out the soldering iron.

The usual building technique is called 'dead bug' or 'ugly' construction. You use an unetched sheet of copper clad as your ground plane, solder components directly to that, then solder additional components to the leads that are sticking up in the air. ICs get flipped upside down and glued to the board, making them look like 'dead bugs'.

Some people don't take ugly construction seriously because the results are.. well.. ugly. It looks like somebody tipped out a junk drawer and soldered things where they landed. Those people haven't read Linear Application Note 47 (http://cds.linear.com/docs/en/applicati ... an47fa.pdf) by Jim Williams. It's basically "how I develop high-performance circuits" written by a guy who characterizes the effects of his cable connectors and designs equipment to test the limits of his oscilloscope. It's big (132 pages) but there are lots of photos and lots of good information. He documents the process of building a circuit from a sheet of bare copper clad to a finished circuit ready for testing.
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: 10082
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Thu Feb 28, 2013 3:00 pm

mstone@yawp.com wrote:You don't. That isn't bad news though.. it's another triumph.

Your knowledge has advanced beyond the limits of your tools, so you're ready to pick up a more powerful set of tools. It's kind of like the day you realized that you needed more than a multimeter, and bought an oscilloscope. Breadboards are okay for circuits in the milliamp, microfarad, and kilohertz range. They're nearly useless in the microamp, picofarad, and megahertz range though. To get good results in that region, you have to break out the soldering iron.

The usual building technique is called 'dead bug' or 'ugly' construction. You use an unetched sheet of copper clad as your ground plane, solder components directly to that, then solder additional components to the leads that are sticking up in the air. ICs get flipped upside down and glued to the board, making them look like 'dead bugs'.

Some people don't take ugly construction seriously because the results are.. well.. ugly. It looks like somebody tipped out a junk drawer and soldered things where they landed. Those people haven't read Linear Application Note 47 (http://cds.linear.com/docs/en/applicati ... an47fa.pdf) by Jim Williams. It's basically "how I develop high-performance circuits" written by a guy who characterizes the effects of his cable connectors and designs equipment to test the limits of his oscilloscope. It's big (132 pages) but there are lots of photos and lots of good information. He documents the process of building a circuit from a sheet of bare copper clad to a finished circuit ready for testing.

Still not feeling confident in myself for reasons such as:

1) Are you telling me that there is no way that I can get a crystal to oscillate using a breadboard? The 32KHz watch crystal I have been using has a load capacitance of 12.5pF. If the breadboard automatically adds around 100pF, there is no way that I can ever match the "correct" load capacitance.

2) Why was a successful getting the watch crystal to oscillate using op amps on a breadboarded circuit? (see viewtopic.php?f=19&t=33796)

3) Why didn't my sine wave become a square wave when I increased the gain (pot Rc)? (I presume that this has something to do with the resistance the inductor sees looking back towards the transistor? When Rc is at 3k, the effective resistance is about 1.5k... but if Rc is at 60k, the effective resistance is .1k, which causes a phase shift "overshoot?")

4) I used an inductor because... well... it is always an inductor. A crystal can be an inductor or capacitor, depending on the frequency. I think I understand how the crystal works qualitatively, but how does that translate quantitively? Inductance is almost infinite just before the anti-resonant frequency, but how do I know when I am close to what that frequency is when all I know is that the crystal has a load of x pF?
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Fri Mar 01, 2013 9:50 am

I started writing a very large post, but the farther I went, the more I realized that I need to point you toward the crystal's equivalent circuit. There's a version of it here: http://www.raltron.com/cust/tools/appno ... rt%201.pdf

The equivalent circuit contains an inductor and a couple of capacitors, so it's a complex resonant circuit all by itself. It's the combination of a very selective bandpass filter and a very selective band-reject filter whose corner frequencies are very close together.

The important fact to take away is that the resonant and anti-resonant frequencies are intrinsic properties of the crystal itself. The load capacitance doesn't have any effect on those two values. To understand the effects of load capacitance, think back to the reactance vector diagrams: capacitance produces a -Zc vector, which can be cancelled by a Zl vector.

If the load capacitance is zero, the -Zc vector is zero, so it takes zero Zl vector to cancel it out. That means a circuit containing the crystal would oscillate at the crystal's intrinsic resonant frequency.

If the load capacitance was infinite, it would add an infinite -Zc vector to the reactance diagram, so you'd need an infinite Zl vector to cancel it out. A perfect crystal does have infinite inductance at the anti-resonant frequency though, so a circuit where the crystal has to drive infinite load capacitance would oscillate at the crystal's intrinsic anti-resonant frequency.

If the load capacitance is somewhere between zero and infinity (like it will be in any real circuit), the overall feedback loop will move to the frequency somewhere between the crystal's intrinsic resonant and anti-resonant frequencies.

In other words, you don't need to have exactly the right load capacitance to make the circuit oscillate. A perfect crystal could oscillate with any load capacitance between zero and infinity, and a real crystal can drive a load capacitance maybe 50-100,000 times as large as the ideal value. For the specific crystals we're talking about, you could probably go up to a microfarad of load capacitance before the crystal just can't push hard enough any more.

So:

mauifan wrote:1) Are you telling me that there is no way that I can get a crystal to oscillate using a breadboard?

No. The crystal can oscillate for a huge range of load capacitances. It will oscillate at 32768Hz +/- 20ppm when the load capacitance is 22pF. Other loads will produce other frequencies, but they'll all be within maybe 1000ppm of 32768Hz.

That range is negligible when you're building "let's see how this works" circuits, but unacceptable for accurate timekeeping. An error of 1000ppm (0.1%) adds up to about a minute and a half per day. 20-30ppm is accurate to about a minute per month.

mauifan wrote:2) Why was a successful getting the watch crystal to oscillate using op amps on a breadboarded circuit?

Same answer as above.. the load capacitor doesn't make the crystal oscillate. It's just tunes the circuit's exact frequency.

mauifan wrote:3) Why didn't my sine wave become a square wave when I increased the gain (pot Rc)?

If your scope probe was connected to the signal labeled 'OUT', there's no way you'd ever see a square wave. That node is the output of a low-pass filter, so the closest approximation of a square wave you could get would be a gradual curve up to a fixed voltage, then a gradual curve down to another fixed voltage. To get that, you'd have to drive the filter with a square wave significantly below its corner/resonant frequency. Since you're actually driving the filter with an inverted copy of the filter's output, the input will never be that slow.

If you crunch the numbers for the impedances, Xl is about 180 ohms at 1MHz and Xc is about 10 kilohms. If Rc moves between 3k and 60k, the inductor's impedance is small enough to be a rounding error. The inductor will still provide phase shift, but the amplitude of the output will be controlled by how much current Rc feeds into the caps. Increasing the value of Rc will reduce the amount of current that reaches the caps per unit time, so the amplitude of the wave will get smaller. Attenuation of the sinusoidal output is about all you could expect to see at that node though.

If your scope probe was connected to the bottom of Rc, you were seeing the point where attenuated input meets increased gain. ;-)



mauifan wrote:I think I understand how the crystal works qualitatively, but how does that translate quantitively?

Hopefully the information about the crystal's equivalent circuit steers you away from this question, because it isn't a useful question from a design standpoint. It's a lot like trying to calculate the exact current gain for a transistor. Yes, the equations exist, but they're so sensitive to small and hard-to-control variations that they aren't useful as general design equations.

In practical terms, the crystal's manufacturer has worked out all the complicated parts and given you the equation 'f(c) = 32768Hz when c=22pF'.
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: 10082
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Fri Mar 01, 2013 8:55 pm

mstone@yawp.com wrote:The equivalent circuit contains an inductor and a couple of capacitors, so it's a complex resonant circuit all by itself. It's the combination of a very selective bandpass filter and a very selective band-reject filter whose corner frequencies are very close together.

The important fact to take away is that the resonant and anti-resonant frequencies are intrinsic properties of the crystal itself. The load capacitance doesn't have any effect on those two values.

I had to think about this for a while, but I think it makes sense. Let me repeat what I think you are saying:

I saw that crystal equivalent before. Although physically a crystal is just a piece of quartz sandwiched between two plates, it acts like very precise components as shown in the model. Who knows what those actual values really are, but if for the sake of argument I assume that the "inductor" in a 4MHz crystal is 100uH, I would need a total capacitance of about 15pF. The manufacturer of the crystal may have constructed the crystal with a 5pF cap, so the manufacturer would say that the load capacitance is 10pF.

The 100uH inductor and 5pF cap are fixed values. (There is also a series cap with some small value that I am ignoring just to make it easier to describe.) If I add about 100pF to give me a total load of 115pF, that will change the resonant frequency Fs to about 1.5MHz -- just as I would see if I used a real inductor and a real cap. (Of course, the role of my cap is being played by my breadboard. :D ) The anti-resonant frequency Fp would shift to the right by a corresponding amount -- and thus would not be a factor per se for the purpose of creating a crystal oscillator. (It would matter if I used the crystal to filter some external signal because the crystal would switch from inductor to capacitor above Fp.)

If this is the correct understanding, I guess I was getting tripped up by the diagram itself. I was thinking that it would have a definite rigid shape for a given crystal when in fact it may be more "elastic."


mstone wrote:If your scope probe was connected to the signal labeled 'OUT', there's no way you'd ever see a square wave. That node is the output of a low-pass filter, so the closest approximation of a square wave you could get would be a gradual curve up to a fixed voltage, then a gradual curve down to another fixed voltage. To get that, you'd have to drive the filter with a square wave significantly below its corner/resonant frequency. Since you're actually driving the filter with an inverted copy of the filter's output, the input will never be that slow.

This kind of makes sense now that you mention it. A square wave is the sum of many, many odd-harmonic sine waves which are all well above the fundamental frequency.

mstone wrote:If you crunch the numbers for the impedances, Xl is about 180 ohms at 1MHz and Xc is about 10 kilohms. If Rc moves between 3k and 60k, the inductor's impedance is small enough to be a rounding error. The inductor will still provide phase shift, but the amplitude of the output will be controlled by how much current Rc feeds into the caps. Increasing the value of Rc will reduce the amount of current that reaches the caps per unit time, so the amplitude of the wave will get smaller. Attenuation of the sinusoidal output is about all you could expect to see at that node though.

I am going to have to read this again, but not sure I follow you at this moment in time. :D I calculated the impedance of the XL=Xc=1.2k at 1MHz (inductor is 180uH, load cap is 120pF). The impedance of the transistor at Rc=3k would be about 1.5k. At Rc=60k, the transistor output impedance would be about 100 ohms.

Did I at least do the calculation correct for the impedance of the transistor as seen from the 180uH inductor? :D
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Sat Mar 02, 2013 10:10 pm

mauifan wrote:I am going to have to read this again, but not sure I follow you at this moment in time. :D I calculated the impedance of the XL=Xc=1.2k at 1MHz (inductor is 180uH, load cap is 120pF). The impedance of the transistor at Rc=3k would be about 1.5k. At Rc=60k, the transistor output impedance would be about 100 ohms.

Did I at least do the calculation correct for the impedance of the transistor as seen from the 180uH inductor? :D

Alas... still not following you on this one, Mike. I can understand how increased input impedance (aka insufficient gain) can dampen an output signal, but I am not following how decreasing impedance (aka higher gain) also lowers amplitude. If the goal was to maximize power transfer, I can understand why I want to match impedances (transistor impedance matches resonant impedance), but I am just concerned with voltages.

What am I missing? How did you arrive at XL=180 ohms and Xc=10k?
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Fri Mar 08, 2013 11:33 pm

mauifan wrote:I saw that crystal equivalent before. Although physically a crystal is just a piece of quartz sandwiched between two plates, it acts like very precise components as shown in the model. Who knows what those actual values really are, but if for the sake of argument I assume that the "inductor" in a 4MHz crystal is 100uH, I would need a total capacitance of about 15pF. The manufacturer of the crystal may have constructed the crystal with a 5pF cap, so the manufacturer would say that the load capacitance is 10pF.

Sorry for the lag in replying. You've advanced to the point where the accuracy of your predictions is no longer limited by your understanding of the tools. Now it's limited by the model you're using. A crystal does things you just can't describe with a straight LC filter.

That means I need to explain the equivalent circuit model, and to do that I had to get my own understanding solid enough that I could break it down for someone else.

So.. to get started let's ignore the parallel cap and the load cap, and just concentrate on the branch that contains the resistor, inductor, and series capacitor. That's the part which represents the crystal itself. The inductor describes the crystal's inertia with respect to vibration, the capacitance describes the stiffness of the quartz, and the resistance describes energy losses in the lattice.

We can more or less ignore the resistor. It doesn't do anything complicated to the response curves. The inductor and capacitor do.

If you just look at just those two components, they make a bandpass filter. The inductor blocks high frequencies and the capacitor blocks low frequencies. The output ends up being a compromise between the fastest signals that can get through the inductor and the slowest signals that can get through the cap.

The transfer characteristics look like this:

Image

The measurements are taken at the white circle on the right. The black line shows amplitude at a given frequency, the red line shows phase lag. As you can see, the phase changes abruptly at the resonant frequency.

I'm drawn the circuit with a load resistor instead of a load cap because every new capacitor changes the shape of the curve.

Speaking of capacitors, the parallel cap represents the capacitance between the contacts on either side of the crystal. It doesn't change the frequency much, but it does change the transfer function:

Image

The amplitude response becomes flat and the phase response becomes zero for frequencies away from the RLC filter's resonant frequency. In other words, the effects of the parallel cap cancel the effects of the RLC filter everywhere except frequencies near resonance.

Near resonance, the effects of the RLC filter become too big for the parallel cap to swallow. We get an upwards spike where where frequencies pass through easily, and a downwards spike where frequencies are blocked.

Even the high point of the spike is 6db below zero, mostly because energy escapes through the resistor to GND. We plug that hole by replacing the load resistor with a load cap:

Image

Now the pulses of current that come out of the RLC filter can't escape to GND. The high and low spikes are still there, but now the high spikes produce output that's significantly larger than the input.

The load cap doesn't have much effect on the overall shape of the curve, but it has a large effect on the gain. It controls which point on the curve crosses the 0db line, thus setting the resonant frequency for the circuit as a whole.

Image

The exact point where the curve crosses the 0db line is determined by the load capacitance and the amount of inductive dominance not being cancelled out by anything else.

As far as a Pierce oscillator is concerned, the 0db crossing isn't the important bit though. That notch in the phase response is.

If you recall, we build a Pierce oscillator so it wants 120-160 degrees of phase shift from the crystal. The crystal's phase response is zero everywhere except in the notch, and there are two places that provide the exact amount of shift that we want within the notch.. on the left and one on the right:

Image

The gain on the left side is about 10db, the gain on the right side is about -10db. The stronger one is the one that will create a positive fedback loop.

The numbers are all speculative, but the overall pattern of behavior is accurate. And now, since this post has been sitting in my browser for about a week, I'm going to hit 'Submit' and get the conversation moving again.
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: 10082
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Sun Mar 10, 2013 1:53 am

mstone@yawp.com wrote:Sorry for the lag in replying.

I must admit. I was starting to wonder, but I am glad you are back. :D

mstone@yawp.com wrote:You've advanced to the point where the accuracy of your predictions is no longer limited by your understanding of the tools. Now it's limited by the model you're using. A crystal does things you just can't describe with a straight LC filter.
That means I need to explain the equivalent circuit model, and to do that I had to get my own understanding solid enough that I could break it down for someone else.

Perhaps you are correct. After reading over your response a couple of times, I think I get the general gist of what you are trying to say overall. Still a bit confused, so let me go through your response and try to clarify what I understand and what I don't. Please bear with me. My wife has accused me (often correctly) that I sometimes have trouble making a clear and concise point. :lol: :x

mstone@yawp.com wrote:So.. to get started let's ignore the parallel cap and the load cap, and just concentrate on the branch that contains the resistor, inductor, and series capacitor. That's the part which represents the crystal itself. The inductor describes the crystal's inertia with respect to vibration, the capacitance describes the stiffness of the quartz, and the resistance describes energy losses in the lattice.

Got that. No problems here.

mstone@yawp.com wrote:We can more or less ignore the resistor. It doesn't do anything complicated to the response curves. The inductor and capacitor do.

This statement confuses me a bit. In the op amp version of this thread, you indicated that Effective Series Resistance (ESR) was very important. I see this as a bit of a contradiction. I presume that you are really saying that ESR is important in terms of the gain required to obtain oscillation, but doesn't cause any phase shift?

mstone@yawp.com wrote:If you just look at just those two components, they make a bandpass filter. The inductor blocks high frequencies and the capacitor blocks low frequencies. The output ends up being a compromise between the fastest signals that can get through the inductor and the slowest signals that can get through the cap.

Concur.

mstone@yawp.com wrote:The transfer characteristics look like this:

Image

The measurements are taken at the white circle on the right. The black line shows amplitude at a given frequency, the red line shows phase lag. As you can see, the phase changes abruptly at the resonant frequency.

Concur here as well.

mstone@yawp.com wrote:I'm drawn the circuit with a load resistor instead of a load cap because every new capacitor changes the shape of the curve.

I am slightly confused because of what I think is a typo, but I think I am still with you.

mstone@yawp.com wrote:Speaking of capacitors, the parallel cap represents the capacitance between the contacts on either side of the crystal. It doesn't change the frequency much, but it does change the transfer function:

Image

Here is where I think I am starting to lose you. I get that the contacts on each side of the crystal form a cap, but transfer function???

mstone@yawp.com wrote:The amplitude response becomes flat and the phase response becomes zero for frequencies away from the RLC filter's resonant frequency. In other words, the effects of the parallel cap cancel the effects of the RLC filter everywhere except frequencies near resonance.

I think I agree with you on this point, but I am not sure I follow why you made this point. In my mind, it is well-understood that an RLC series filter will attenuate frequencies that are not close to resonance.

mstone@yawp.com wrote:Near resonance, the effects of the RLC filter become too big for the parallel cap to swallow. We get an upwards spike where where frequencies pass through easily, and a downwards spike where frequencies are blocked.

Still with you. Not sure why you stated this.

mstone@yawp.com wrote:Even the high point of the spike is 6db below zero, mostly because energy escapes through the resistor to GND. We plug that hole by replacing the load resistor with a load cap:

Image

Now the pulses of current that come out of the RLC filter can't escape to GND. The high and low spikes are still there, but now the high spikes produce output that's significantly larger than the input.

Losing you again... :(

I presume that your usage of load resistor and load cap are for instructional purposes, so I think I get what you are saying. Likewise, I think I understand how the "inductor" can create voltages that are higher than the input.

mstone@yawp.com wrote:The load cap doesn't have much effect on the overall shape of the curve, but it has a large effect on the gain. It controls which point on the curve crosses the 0db line, thus setting the resonant frequency for the circuit as a whole.

Image

The exact point where the curve crosses the 0db line is determined by the load capacitance and the amount of inductive dominance not being cancelled out by anything else.

As far as a Pierce oscillator is concerned, the 0db crossing isn't the important bit though. That notch in the phase response is.

If you recall, we build a Pierce oscillator so it wants 120-160 degrees of phase shift from the crystal. The crystal's phase response is zero everywhere except in the notch, and there are two places that provide the exact amount of shift that we want within the notch.. on the left and one on the right:

Image

The gain on the left side is about 10db, the gain on the right side is about -10db. The stronger one is the one that will create a positive fedback loop.

The numbers are all speculative, but the overall pattern of behavior is accurate. And now, since this post has been sitting in my browser for about a week, I'm going to hit 'Submit' and get the conversation moving again.

Ok... my brain just left the building. :lol: Perhaps it is because it is late and we are going to lose an hour of sleep to Daylight Saving Time tonight, but I don't think I follow you at all now.

Can we take a step back from the crystals for a moment and discuss how this works with RLC circuits? I certainly want to come back to the topic of crystals, but I am still trying to wrap my head around how amplitude [voltage] can go down when gain gets turned up beyond a certain point.

I am further confused because... well... the resonant frequency of my test circuit is about 1 MHz (180uH inductor and about 120pF total load capacitance). I am not doing anything to change that, so frequency is not really a variable -- at least not at this point in time. All I am doing is changing the value of Rc, which in turn affects gain. It makes perfect sense to me that my circuit won't oscillate if the gain is too low, but I don't really follow how the gain can be too high.

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

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Sun Mar 10, 2013 9:03 pm

That was a pretty large infodump. I'll back up to regular RLC circuits. I may need a couple days to shake loose the time though. I'm writing RFQs this week.
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: 10082
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Mon Mar 11, 2013 5:09 pm

mstone@yawp.com wrote:That was a pretty large infodump. I'll back up to regular RLC circuits. I may need a couple days to shake loose the time though. I'm writing RFQs this week.

Agree that it was a big dump. When you do come back, please try to keep in mind that less is sometimes more. In this case, I am not so sure that you need to dive into RLC circuit theory. Perhaps I am wrong and you really do need to go down that road, but I hope the answer is something simple as the equivalent of "Look for the 3rd caution sign and turn left instead of right." :D

Example (paraphrase of your answer earlier):

mstone@yamp.com wrote:You will never get a true square wave because the LC components filter out the harmonics of a square wave.
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Sun Mar 24, 2013 12:29 am

Mike? You still there? Still scratching my head wondering why gain starts dropping off with increased Rc in my RLC circuit. Thx.
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Sun Mar 24, 2013 5:43 pm

Yep.. just trying to sort out the ideas so I don't beat you over the head again.

Let's start with a single issue.. the output impedance of a common-emitter amplifier. The basic idea looks like this:

Image

Assuming the gain through the amp is A, the output will be A times the input.

When it comes to output impedance, the amp behaves like its Thevenin equivalent to the right.. a voltage source passing current through a resistor. The signal across the voltage source will the same as the amp's theoretical output, and the resistance is the same as Rc.

That differs from your estimate, which put the impedance at 1.5k for Rc=3k and .1k for Rc=60k.

Let's get settled on this point, then we can decide what comes next.
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: 10082
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by mauifan on Mon Mar 25, 2013 1:19 am

mstone@yawp.com wrote:Yep.. just trying to sort out the ideas so I don't beat you over the head again.

Let's start with a single issue.. the output impedance of a common-emitter amplifier. The basic idea looks like this:

Image

Assuming the gain through the amp is A, the output will be A times the input.

When it comes to output impedance, the amp behaves like its Thevenin equivalent to the right.. a voltage source passing current through a resistor. The signal across the voltage source will the same as the amp's theoretical output, and the resistance is the same as Rc.

That differs from your estimate, which put the impedance at 1.5k for Rc=3k and .1k for Rc=60k.

Let's get settled on this point, then we can decide what comes next.

I am both confused and following you at the same time.

I agree with you in the sense that the amp has a Thevenin equivalent circuit. but I don't see how you arrived at different impedances. The open circuit voltage is about 3V at quiescence. The short circuit current is (Vcc - Vopen) / Rc, aka 3V/Rc.
mauifan
 
Posts: 161
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

by adafruit_support_mike on Mon Mar 25, 2013 4:12 pm

I think we're running into some confusion about the term 'impedance'.

Just to benchmark that, impedance is the generalized form of resistance. It includes resistance per se (converting electrical energy to heat) and reactance (temporarily storing electrical energy in an electrical or magnetic field). All forms of impedance give voltage something to push against as it tries to make charge carriers move.

A resistor has no reactive properties, so its impedance is the same as its ordinary resistance.

The sketch above says any current that reaches the output has to travel through Rc, so the impedance looking back into the amplifier will be Rc.
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: 10082
Joined: Thu Feb 11, 2010 2:51 pm