Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
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
?
?
? |
Re: Using Op Amp as comparator
On Fri, May 2, 2025 at 01:55 PM, Macrohenry wrote:
Which op-amp did you use?
?
LTspice's "opamp" is an unbounded ideal op-amp.? In the absence of feedback, its outputs could become indefinitely large, either positive or negative.? Perhaps they reach only 1 MegV because of the input signal amplitude combined with the finite voltage gain.
?
Please read the information that comes up with LTspice's UniversalOpAmp1 when you select it.? It says this:
It seems it is behaving exactly as expected.? It has nothing to limit its output voltage range, so it reaches a value determined by the input differential voltage and the open-loop voltage gain.
?
UniversalOpAmp1 is not a good choice.? I regret that Analog Devices left it there as a choice.? If I remember correctly, UniversalOpAmp2 was the only one that had been listed in the parts selector, and it was a better choice.? The others could be selected as an override, but #2 was the better one to start with.
?
Use a better one!? Such as UniversalOpAmp2.
?
Seems like it is not working.? Maybe you did something wrong. ?
Andy |
Re: Using Op Amp as comparator
In message <[email protected]>, Macrohenry via groups.io <macrohenry@...> writes
When I use the Universal Op Amp or Universal Op Amp 1 as aUniversal Opamp and Opamp 1 don't respect the power rails so the O/P will scale appropriately to large voltages . Try Universal Opamp 2 The macromodels use voltage controlled current sources etc. Some manufacturers do this sort of thing with their models leading to some odd behaviours at times. Brian -- Brian Howie |
Re: Using Op Amp as comparator
Your description sounds confusing. You say 6V 1000Hz Sine wave, suggesting to me that you are running a ".AC"? analysis which is a "small signal" AC analysis, so you wont get an "output" which is a 1000Hz square wave, the op-amp will approximate the output to be "0" would it not?? or 3V... If you want to simulate a "comparator" function and show it switching at 3V, then you can use a transient (.TR) analysis to do it at a specific speed, eg 1 or 2 cycles of a "sine wave" or a triangluar wave, Or you can see the precise DC (.DC) response using a input voltage varying from say 2.5 to 3.5 or bigger and the opamp output should change as it crosses the 3V reference level...?
?
?????
?
? |