Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: Crystal oscillator oscillation startup
On Sat, May 3, 2025 at 05:45 AM, Cheng Fei Phung wrote:
That is a huge change!
?
The fact that you moved the ground is insignificant.? It just shifts the voltages.? But you are no longer powering the "VN" net with a voltage source that had the polarity wrong, and that is a significant change.
?
Not having studied the IEEE article, I wasn't sure but I suspected that the purpose of the "Output voltage regulator" section (and your M32) was to derive a regulated DC voltage on node VN.? And it looks like that is finally working now, in this schematic.? The earlier schematics you uploaded had that wrong, both by driving VN with a separate voltage source and by giving it the wrong polarity.
?
However, I would not expect much difference in circuit performance at this stage.? The oscillator is the part of the circuit way over on the left, and everything else in the schematic is superfluous, except for the DC biasing voltages on nodes "g_a" and "g_b".? The output amplifier is just an output buffer and you could have omitted it because it is not part of the oscillator.? It adds a little load on the "Q1" net but I think that could be mostly ignored.
?
What do you hope to achieve by sweeping the supply voltage, V_1?? Does it give you any significant information about the operation of the circuit?? In the end it does, after everything is working.? It tells you about things like supply voltage "pull".? But until the circuit oscillates, I think sweeping V_1 does not give you any useful information.
?
I think I might be more interested in sweeping the DC voltage at the input of the oscillator's amplifier (node "M1_gate") and examining what is the transfer function and signal gain of M1.? That gain is what makes the oscillator oscillate - or perhaps why it does not oscillate.? Perhaps you should be looking there.
?
That's good - but why have you not considered much of the advice you were given?? It seems to me that you are not very interested in trying to get your circuit right.? Do I read that incorrectly? ?
Andy
?
? |
Re: Crystal oscillator oscillation startup
@Tony
See ck_osc_positive_supply.asc , I had actually checked the operating points conditions for each transistors according to circuit requirements. I am now interpreting the underlying theory, I will get back to you next week with details. |
Re: Crystal oscillator oscillation startup
¿ªÔÆÌåÓýOn 03/05/2025 03:02, Cheng Fei Phung
via groups.io wrote:
Did you check the DC conditions on your circuit? Is it biassed correctly? What gain do you get from each inverter? Make one step at a time. To help you (and anyone else following) along the way, I have made some testjigs to validate the characteristics of both P and N devices, including both the normal and inverted N configurations (they are identical, so the devices are symmetrical). See 180nm_Testjigs.zip --
Regards, Tony |
Re: LTspice24 windows version run on macOS
#Mac
Dennis, thank you much for this detailed install guide!
?
My Wine application wound up being installed in /opt/homebrew/bin/ instead of /usr/local/bin/, but that might be because of how I installed brew. |
Re: Using Op Amp as comparator
SUCCESS. Big thanks again.? Changing the MAX9095 power supply to 6 VDC did the trick.? Note the extra parts for hysteresis, per the datasheet.
?
Thanks for the suggestions.? I've heard the suggestion about how to deal with decimals before, but I guess I have a kind of dyslexia where I make fewer mistakes when I can actually see the number of zeros.? I'll try to remember that's not optimum for those who are helping me.
?
Here's the asc file: /g/LTspice/files/z_groups.io/Files-sorted-by-message-number/msg_ZZZZZZ/Macrohenry/comparator_test.asc |
Re: Crystal oscillator oscillation startup
You (Cheng Fei Phung) seem to be grasping at straws with pretty minimal understanding. In your situation, I would disconnect the "crystal" and feed a small transient 1.1MHz signal (say a hundred mV ppk or less) through a small capacitor (few 10s of pF). Verify that the amplifier has the expected operating point and has some actual gain at that frequency. Use a reasonable maximum time step (less than 50ns) and let the simulation run more than a few cycles (10 uS or longer). ?
?
Once you have an operating amplifier, THEN hook the simulated crystal.
?
You might actually learn something if you observe the results fully and carefully! AND you convey those observations back to the list, in good detail. Hint: that report might include a full spice circuit with all the supporting models that either fails to operate or operates with some degree of success.
?
Jim
Oregon Research Electronics
?
?
|
Re: Crystal oscillator oscillation startup
On Fri, May 2, 2025 at 09:02 PM, Cheng Fei Phung wrote:
I see you added a simple RLC series resonant circuit to represent a crystal.? Do you know that it is an appropriate model?? Does this oscillator circuit depend on series resonance, or parallel?? (I don't know; I am just asking.)? Are the electrical characteristics OK to model the motional parameters of the crystal? ?
Glancing at the IEEE article, it looks like they used a much more complex electrical model for the crystal, with not one or two but three series resonant RLC circuits in parallel with each other, plus three additional capacitors.? Your equivalent circuit is much simpler.? Is the simpler model adequate?
?
The .tran statement on your schematic is ".tran 0 10 0 100u startup", so it calls for a Maximum Timestep of 100 us.? With a timestep of 100 us, it can simulate signals with frequencies up to about 5 kHz.? But your crystal model's series resonance is around 1.1 MHz.? To simulate a circuit oscillating at 1.1 MHz requires a timiestep that is smaller than 500 ns.? There is a chance that you made the Maximum Timestep so large that LTspice is incapable of seeing any sort of oscillation around 1 MHz.
?
This is where simulations can become very difficult.? With a timestep smaller than 500 ns, it can take a very long time to simulate 10 seconds or 1000 seconds.
?
Your N channel transistors are still upside-down, and the Bulk pins of many of the transistors are likely connected wrongly.? Also you have zero values for PS, PD, AS, and AD, which is technically incorrect, but I don't know how much difference it makes.? As you probably know already, I1 should not be there, but LTspice removes it.
?
I suspect that your DC voltages are not right.? The negative supply voltage for the first three stages (node V1) is at -1.5 V which might be right.? But the regulated voltage for the output amplifier (node VN) is +1.5 V.? Is that right?? I think it powers the output amplifier with the wrong polarity.? Are you powering that section correctly?
?
There is no DC path from node Q1 to ground, which extends to nodes N004 and N005.? LTspice tells you that the nodes float, and it "corrects" for it by adding GFLOAT to one of the nodes.? I think this won't affect the performance of this circuit, but I'm not sure.? GFLOAT will lower the Q of the resonant circuit a little.
?
Note I have not read the IEEE article.
?
Andy
? |
Re: Crystal oscillator oscillation startup
@Andy
?
still do not show any oscillatory phenomenon after adding RLC between Q1 and Q2.
?
See?ck_osc.asc for the latest asc file |
Re: Using Op Amp as comparator
¿ªÔÆÌåÓýI met one of those, so I used the 'bullet'
character ? as the decimal point in my report. On 2025-05-02 23:48, Andy I via
groups.io wrote:
On the other hand, there are others who insist on omitting a leading "0" when there is one, thus encouraging people to write ".002", to the dismay of others who have greater sense.) --
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Using Op Amp as comparator
On Fri, May 2, 2025 at 05:29 PM, Macrohenry wrote:
I recommend not using numbers like ".002".? Leading decimal points are easily missed.? To my old eyes, it looked like you wrote "002" - until I squinted.
?
Instead, use one of these:
?
Some companies who have documentation standards even insist that people never use numbers such as ".002".
?
(On the other hand, there are others who insist on omitting a leading "0" when there is one, thus encouraging people to write ".002", to the dismay of others who have greater sense.)
?
Andy
?
|
Re: Using Op Amp as comparator
On Fri, May 2, 2025 at 05:25 PM, Macrohenry wrote:
(1)? You do not need to add a library file.? It is included when you use its symbol.
?
(2)? I just tried it, and it works great for me!
?
So, what did you do wrong, that makes your simulation fail?? Since you didn't show us (by uploading your *.ASC schematic), we can't tell.
?
I would caution you, that if you used the same +/- 12 V power supplies with it, that is likely to be a problem, and might be the problem.? That part is rated for an Absolute Maximum voltage of Vdd-Vss = 6 V, and applying Vdd-Vss = 24 V greatly exceeds that and probably "lets out the magic smoke" and the chip vaporizes.? Many SPICE simulations would work even with that, but this one might not because it is so far beyond spec.
?
Also, you must remember to include an output pull-up resistor.? The MAX9095 has open-drain outputs.? They do not pull themselves high; they only actively pull low.
?
Always read the datasheet.
?
Andy
?
|
Re: Using Op Amp as comparator
¿ªÔÆÌåÓýThe 9095 is a quad. Are you using all four
units or what? Why not upload your .ASC, so we can see what you
are doing? On 2025-05-02 22:50, Macrohenry via
groups.io wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Using Op Amp as comparator
SUCCESS!? Thanks, guys, I got it working with Universal Op Amp 2.?? It's working as it should.
?
I'm using simple transient analysis.?? The whole circuit consist of? one op amp and three voltage sources:? Supply is += 12V, Sine is 6 V 1000 Hz, reference is 3 VDC.? Simple and clean as I know how to make things.
?
As hoped and expected, Universal Op Amp 2 outputs a square wave triggered at the intersections of the sine wave and DC reference voltage. Square wave is 0-12 V when the op amp negative power supply is grounded, and it's -12 to +12 V when the op amp negative power supply is -12 V.??
?
However, substituting the MAX9095 for Universal Op Amp 2 still outputs a straight line, regardless of what the negative power terminal is connected to.? I chose the MAX9095 from the comparator list.? That makes me think I shouldn't need to include a library.? Is that what might be missing? |
Re: Vin vs. Load - YX logarithmic plot
¿ªÔÆÌåÓýI find that in many cases, the plotted
variable does reach very small values, which are of no
significance or interest, but Autorange accommodates them, as it
should, having no 'knowledge' of which values are significant.
The same occasionally applies to initial very large values, such
as inrush current. On 2025-05-02 21:18, Bell, Dave via
groups.io wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Vin vs. Load - YX logarithmic plot
¿ªÔÆÌåÓý¡°If I immediately right-click in the plot pane and select "Autorange Y-axis", it usually fixes that problem¡± Begging the question of why that *¾±²õ²Ô¡¯³Ù* the Automatic default! ? ? From: [email protected] <[email protected]>
On Behalf Of Andy I via groups.io
Sent: Friday, May 02, 2025 10:51 AM To: [email protected] Subject: EXTERNAL: Re: [LTspice] Vin vs. Load - YX logarithmic plot ? On Fri, May 2, 2025 at 10:30 AM, <rick_church@...> wrote:
I want to add this note:? Usually when I change the Y-axis from linear to log, LTspice scales the Y-axis so that it?covers too much range (too many decades), making it a less useful plot.? If I immediately right-click in the plot pane and select "Autorange Y-axis", it usually fixes that problem. ? If the Y-axis waveform includes negative values, then it might still be scaled with too much range to be helpful.? In that case, right-click on the Y-axis and set a new value for the Bottom, so that the displayed plot does not cover so wide a range. ? Andy ? |
Re: Possible g;itch in stepping parameters
On Fri, May 2, 2025 at 11:34 AM, <mhx@...> wrote:
E_ABMGATE ? ?YINT 0 VALUE { { IF(V(A) > { VTHRESH } ?& V(B) > { VTHRESH },{ VDD },{ VSS } ) } }The above illustrates why '{{' instead of '{' could matter, ... For the life of me, I can not understand the purpose of "{{", no matter how hard I try.
?
I get it if the formula was something like this: "... { { thing1 } + thing2 } ...".
?
I do not understand when the formula uses: "... { { thing1 } } ...".
?
What that seems to be saying is this:
Huh?? What is the meaning of { 4.72 }?? Since 4.72 is already a number and is guaranteed to be a number and only a number, there is no purpose of trying to evaluate it a second time as if it were an expression and find its numerical value.? You already have it.? In fact it's kind of an error to try.? (Like pointer redirection applied too many times?)
?
Can someone explain to me the meaning or purpose of "{ { thing1 } }", as it relates to LTspice?
?
Re: text substitution - that is something I much prefer to avoid.? It is too much of a grey area, a "can of worms".? As I understand it, the .text directive did text substitution, but nothing else actually did.? But I might be wrong about it.
?
Andy
?
? |
Re: .savestate directive no longer works
On Thu, May 1, 2025 at 02:52 PM, bwolfe58 wrote:
Now, when I try to run any transient simulation I get this error "argument not found" This is a good catch. From the posting in EZ, I was able to reproduce the problem. It appears that if you have "Generate Expanded Listing" ON and you use .savestate, you will see this error message in the log, but there is no real error in simulation. In fact, the generate expanded listing from a standard netlist also produces a file simply containing just the text: "argument not found". That is the error¡ª the expanded listing doesn't produce anything; whereas, simulation and .savestate work properly.
?
This has been fixed and should appear in a future release (24.1.9). For now, if you do want an expanded listing, don't use savestate, and vice versa.
?
--
Michael Stokowski LTspice Team Analog Devices Inc. |
Re: Possible g;itch in stepping parameters
On Fri, May 2, 2025 at 02:02 PM, <mhx@...> wrote:
I think it is clear - to me at least - that it is the intention, and the only thing that makes sense.? If you started withis evaluated as if it had been written as (aa + bb) & V(B)How can your be sure that that was the intention?
with or without curly braces anywhere in there, it seems clear that you want to get the logical AND of something called VTHRESH and the boolean version of voltage V(B).? ?Whether or not VTHRESH has an expression behind it, that should make no difference.? You can not evaluate the AND operation until you know what VTHRESH is, and that means evaluating its formula and turning it into a numerical value.? It makes no sense whatsoever to apply the AND operation to only a portion of what makes up VTHRESH.
?
Therefore, there is an implicit order of operations like this:
no matter whether you wrote VTHRESH or {VTHRESH} and no matter if there was a formula that defines VTHRESH.? The AND operation can only be applied to VTHRESH, not to ESH while omitting VTHR.? ?:-)
?
Andy
?
?
? |