Crystal Oscillator Question (Transistor Based Amp)

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mauifan
 
Posts: 174
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by mauifan »

[email protected] wrote:Right again, but let me restate what you've said to emphasize a point:

The output (the voltage swing at the top of the cap) will be slightly larger than the original input (the signal h that we fed into the transistor).

Extrapolate the effects of that happening in a feedback loop.
I am not sure that this is the correct wording... but it increases the amplitude of the signal at the transistor's collector, A*h(t).

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by adafruit_support_mike »

Yep. And that produces an even larger voltage swing at the top of the capacitor, which produces an even larger voltage swing from the amplifier, and so on. Each time the signal cycles back through the feedback loop, it gets larger and larger.

Numerically, if the input is h and the output is h*(1+d), sending h*(1+d) through the loop will produce h*(1+d)^2. The next pass will produce h*(1+d)^3, then h*(1+d)^4, etc. The signal grows exponentially as it loops through the circuit.

What would the circuit's long-term behavior be if we reduced the gain slightly below its happy-equilibrium level?

User avatar
mauifan
 
Posts: 174
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by mauifan »

[email protected] wrote:Yep. And that produces an even larger voltage swing at the top of the capacitor, which produces an even larger voltage swing from the amplifier, and so on. Each time the signal cycles back through the feedback loop, it gets larger and larger.

Numerically, if the input is h and the output is h*(1+d), sending h*(1+d) through the loop will produce h*(1+d)^2. The next pass will produce h*(1+d)^3, then h*(1+d)^4, etc. The signal grows exponentially as it loops through the circuit.

What would the circuit's long-term behavior be if we reduced the gain slightly below its happy-equilibrium level?
Still not sure where you are going with this, but the signal growth should max out at some point. I would think that it would eventually become a square wave, but as you reminded me several posts ago, that won't happen because the LC portion of the circuit filters out the harmonics. So it seems to me that there should be a point A' (that's "A prime") above which the gain no longer matters -- the signal should max out at some amplitude no matter what the gain setting is. (Again... this is not what I see on my scope. The amplitude starts to decrease.)

If gain goes below happy-equilibrium, the voltage h(t) drops, which means that the transistor's collector voltage is slightly less. If the gain goes too low, the output Ah(t) flatlines.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by adafruit_support_mike »

We're walking through the process of treating one piece of circuit behavior as a knob that can be turned up or down without having to worry about all the interactions between components.

There are two such knobs in this circuit: the gain, and the rate of current flow between the transistor's collector and the top of the cap. If we turn the gain knob up, the signal increases exponentially. If we turn the gain knob down, the signal decays exponentially. Stable oscillation occurs when the knob is set to exactly the right level.

My ultimate goal is to discuss the interaction between the gain knob and the current knob, but for now let's consider the current knob in isolation to nail down the basics. Let's trim the gain knob to whatever level produces stable oscillation, and move our attention to the current knob.

- What's the long-term effect of increasing the rate of current flow between the collector and the cap?

- What's the long-term effect of decreasing the rate of current flow between the collector and the cap?

User avatar
mauifan
 
Posts: 174
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by mauifan »

[email protected] wrote:We're walking through the process of treating one piece of circuit behavior as a knob that can be turned up or down without having to worry about all the interactions between components.

There are two such knobs in this circuit: the gain, and the rate of current flow between the transistor's collector and the top of the cap. If we turn the gain knob up, the signal increases exponentially. If we turn the gain knob down, the signal decays exponentially. Stable oscillation occurs when the knob is set to exactly the right level.

My ultimate goal is to discuss the interaction between the gain knob and the current knob, but for now let's consider the current knob in isolation to nail down the basics. Let's trim the gain knob to whatever level produces stable oscillation, and move our attention to the current knob.
Alas... I am still struggling to follow you here. In my mind, there is only ONE "knob" -- and that's the gain potentiometer Rc which controls both voltage and current. The larger the value of Rc, the larger the voltage gain at the transistor's collector. While I understand that the gain has to be at or above a certain value for the circuit to oscillate, I don't see anything in the gain equation (A = -Rc/Re) which suggests that the magnitude of A starts going down after a certain point.

That said, the only thing that I can think of to possibly reconcile theory with my experimental results goes back to our earlier discussion of the transistor's Thevenin equivalent circuit, which basically stated that the transistor was a voltage source with "internal resistance (impedance)" equal to Rc. If Rc is very large, it makes sense that the Thevenin equivalent transistor would not be able to source much current... and the collector voltage would start to drop.

And if this is true, it must mean that I want to maximize power transfer from the transistor to the LC circuit, which occurs when the impedances match, i.e. Zlc = Rc. (Note: I am not saying that it has to be exact, but it should be in the ballpark.)

Yes? No?
[email protected] wrote:- What's the long-term effect of increasing the rate of current flow between the collector and the cap?

- What's the long-term effect of decreasing the rate of current flow between the collector and the cap?
To answer your question, more current through a cap tends to mean less voltage drop (lower impedance) across the cap. Conversely, less current tends to mean more voltage drop (higher impedance). :?:

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by adafruit_support_mike »

mauifan wrote:Alas... I am still struggling to follow you here. In my mind, there is only ONE "knob" -- and that's the gain potentiometer Rc which controls both voltage and current.
You're thinking in terms of components of a physical circuit. The line of questions I'm using is building an abstraction that will help you acquire insight about what the pot does. At this stage in the argument, skipping ahead to relate the abstractions to actual components is counterproductive because it pulls in a big pile of details that confuse by sheer bookkeeping overhead.

For now, ignore the components, and think about the critical relationships in the feedback loop. One is the gain from the amplifier's input to ist output. The other is the attenuation from the amp's output to the top of the cap. For the circuit to remain stable, they have to be inverses of each other.. if the gain is A, the attenuation has to be 1/A.

You know the right answers to the abstract questions, so let me ask the one that ties everything together:

What happens to the signal at the top of the cap if you turn the gain knob up and the current-to-the-capacitor knob down?

User avatar
mauifan
 
Posts: 174
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by mauifan »

adafruit_support_mike wrote:You're thinking in terms of components of a physical circuit. The line of questions I'm using is building an abstraction that will help you acquire insight about what the pot does. At this stage in the argument, skipping ahead to relate the abstractions to actual components is counterproductive because it pulls in a big pile of details that confuse by sheer bookkeeping overhead.

For now, ignore the components, and think about the critical relationships in the feedback loop. One is the gain from the amplifier's input to ist output. The other is the attenuation from the amp's output to the top of the cap. For the circuit to remain stable, they have to be inverses of each other.. if the gain is A, the attenuation has to be 1/A.

You know the right answers to the abstract questions, so let me ask the one that ties everything together:

What happens to the signal at the top of the cap if you turn the gain knob up and the current-to-the-capacitor knob down?
Very well, then. I shall temporarily divorce myself from reality. Won't be the first time. :lol:

Voltage across cap goes up?

Reasoning:
1) If the gain goes up, the voltage at the transistor's collector goes up. The inductor and cap are fixed (with fixed impedances), so the voltage drops across each of these should increase proportionally.

2) I am not sure I have this right (in part because the divorce hasn't been finalized yet :lol:), but decreased current means less voltage drop through the inductor. Mentally, I picture a pull-up resistor instead of an inductor: No current through the pull-up resistor means no voltage drop through that resistor, so there is more voltage to drop through the cap.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by adafruit_support_mike »

Nope. Let me rename the second knob 'attenuation' to move the idea even farther away from the components.

The first half of the feedback loop is controlled by the 'gain' knob. Its output is A times greater than its input. The second half of the feedback loop is controlled by the 'attenuation' knob. Its output is 1/A smaller than its input.

So.. if the circuit sits in equilibrium when the gain is set to A and the attenuation is set to 1/A, what happens if I set the gain to A+d and the attenuation to 1/(A+d)?

User avatar
mauifan
 
Posts: 174
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by mauifan »

adafruit_support_mike wrote:So.. if the circuit sits in equilibrium when the gain is set to A and the attenuation is set to 1/A, what happens if I set the gain to A+d and the attenuation to 1/(A+d)?
If gain A' = A+d increases, then attenuation decreases to 1/A'. :?:
So again... voltage should rise??? :?:
Or on second thought... you said that A was at happy equilibrium, so increasing the value of A' means that there is a proportional decrease in attenuation.

Forgive me for being "dense," but I suspect that this may be one of those frustrating instances when I am just not making the connection. To me, the word "attenuation" means something like "reduction" in signal. So "less attenuation across the cap" means that there isn't as much voltage drop across the cap, which means higher voltage across at the input, which means higher voltage at the output, etc.

For what it is worth, I still think that this is some kind of max power transfer problem... though I can't explain why. For the fun of it, I put an ammeter between Vcc and Rc and measured the current. As I would expect, I measured little current at "near zero" gain. As I increased the gain, I saw an increase in both current and voltage swing until I hit that gain "sweet spot." As I increased gain beyond that point, voltage swing and current started to tail off. Observationally, it seems like there is a value of Rc that starts to "overwhelm" the gain and the voltage swing starts to drop off like a max power thing.

Of course, the part I can't quite explain is that max power occurs when impedances match... which makes no sense since the measured resistance of the inductor I have is >5 ohms, the impedance of the LC circuit is close to zero, and the "sweet spot" value of Rc is around 20k.

User avatar
mauifan
 
Posts: 174
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by mauifan »

Still confused, so I figured that I might go back to the math. Here is a slightly cleaned up version of my original chicken scratch.
My calculations
My calculations
chicken_scratch_0001.jpg (65.54 KiB) Viewed 747 times
Unfortunately, I am still confused. :?

The circuit under the "Filter Stage" represents the LC filter section in my other diagram. R represents the internal resistance of the inductor Ri (which I measured to be less than 5 ohms). I think it also includes the Thevenin equivalent resistance of the amplifier (previously established as Rc), but I am not certain since it screws up the math (assuming that I didn't make any mistakes). Also note that Vout and Vin are labeled differently than as one might normally expect. This is because Vout of the amp feeds into the filter stage and its output feeds back to the amplifier.

So... going back to Mike's most recent question, the math shows that increasing the value of R decreases the "gain" (which in terms of the filter stage is Vin/Vout). If R includes Rc, it kinda/sorta intuitively makes sense to me that there is a "magical" value of Rc that maximizes the value of Vout.

But if I substitute the right side equation into the left side equation, I get "nonsense" -- especially for the situation when Rc>>Ri. :?: :?:

User avatar
mauifan
 
Posts: 174
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by mauifan »

Revised chicken scratch that attempts to relate the voltage across the cap (Vf in this diagram) to the amplifier's input voltage Vin. (I noticed that the Vin points on my previous chicken scratch were not the same due to the DC blocking cap.) This shows that increasing the value of R reduces the filter stage "gain" Gf. Still don't think I have this right... don't see anything in the derived formula to suggest that Vf will decrease with increased Rc. :?
My revised calculations
My revised calculations
chicken_scratch_0002.jpg (48.47 KiB) Viewed 743 times

User avatar
mauifan
 
Posts: 174
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by mauifan »

adafruit_support_mike wrote:Nope. Let me rename the second knob 'attenuation' to move the idea even farther away from the components.

The first half of the feedback loop is controlled by the 'gain' knob. Its output is A times greater than its input. The second half of the feedback loop is controlled by the 'attenuation' knob. Its output is 1/A smaller than its input.

So.. if the circuit sits in equilibrium when the gain is set to A and the attenuation is set to 1/A, what happens if I set the gain to A+d and the attenuation to 1/(A+d)?
Sorry for the multiple posts. I am still trying to work this out in my head... and on paper.

If you add "d" to gain A, the attenuation gets smaller -- assuming that A and d are positive numbers.
If d is a negative number, attenuation increases.

Still not sure where you are going with this. If gain is A and attenuation is 1/A, increasing the value of A will result in a higher gain and a proportionally lower attenuation (as mentioned above).

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by adafruit_support_mike »

Remember how I said skipping ahead and trying to relate the present discussion to actual components leads to unnecessary confusion? Not just idle conversation. ;-)

The confusion you're experiencing is exactly why I hesitated to use the word 'attenuation' in the eariler versions. Let's try it this way:

Image

and here's a graphical representation of the problem I'm asking you to solve:

Image

My goal for this, putting it frankly, is to dislodge this idea you're chasing about a single resistance that produces the maximum output signal, because the 10% of it that's right is pulling your attention away from the 90% of it that's wrong. You need the information in this model to understand the nature of the part that's wrong.

You aren't at fault for anything.. feedback loops are inherently confusing, especially when they oscillate.. but we have to cut away the confusing parts to make the core ideas easier to see, then add complexities back in until we have the complete circuit.

So.. breaking the core ideas down into the simplest terms I can, cutting the feedback loop and reducing this to a simple input-output signal path, what output will the two systems above produce?

Hint: the answer is "100mV" in both cases.

User avatar
mauifan
 
Posts: 174
Joined: Sun Aug 12, 2012 11:13 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by mauifan »

Ok. When you put this in terms of black boxes that disconnect the feedback, I follow you. I agree that the answer to both "questions" is 100mV.

To put your two questions into words, you are basically taking an input i, multiplying it by some number X=A in Stage 1, and reducing it by Y=1/A in Stage 2 to get your original i.

If you change the value of A (or rather X as per your last post), it means that you have to change Y to maintain the ratio X*Y = 1.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Crystal Oscillator Question (Transistor Based Amp)

Post by adafruit_support_mike »

Exactly.

Now.. I'm going to use a technique called 'unrolling the loop' to bring the concept of feedback into the picture.

Taking the 'X=10;Y=10%' example as our base circuit, imagine having two copies that are electrically identical. Connect the input of the second to the output of the first. If we feed the same 100mV sine wave into the first input, what do we get from the second output?

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”