¿ªÔÆÌåÓý

Date

Square wave vco

 

Hello, I need little help, please. I am trying to run old square wave vco model:
*Voltage Controlled Square Wave Oscillator?
*LOW ? = Peak output low value?
*HIGH ?= Peak output high value *CYCLE = Duty cycle ?
*RISE ?= Rise time *FALL ?= Fall time?
*C1 ? ?= Input control voltage point 1?
*C2 ? ?= Input control voltage point 2?
*C3 ? ?= Input control voltage point 3?
*C4 ? ?= Input control voltage point 4?
*C5 ? ?= Input control voltage point 5?
*F1 ? ?= Output frequency point 1?
*F2 ? ?= Output frequency point 2?
*F3 ? ?= Output frequency point 3?
*F4 ? ?= Output frequency point 4?
*F5 ? ?= Output frequency point 5?
* Connections:?
* ? ? ? ? ? ? ?In+?
* ? ? ? ? ? ? ?| In-?
* ? ? ? ? ? ? ?| | Out+?
* ? ? ? ? ? ? ?| | | Out-?
* ? ? ? ? ? ? ?| | | |?
.SUBCKT SQRVCO 1 2 3 4 PARAMS: C1=0 C2=1 C3=2 C4=3 C5=4 F1=0 F2=1k ?
+ F3=2k F4=3k F5=4k LOW=0 HIGH=5 CYCLE=0.5 RISE=1u FALL=1u?
A1 %vd(1,2) %vd(3,4) ASQRVCO?
.MODEL ASQRVCO square(cntl_array=[{C1} {C2} {C3} {C4} {C5}]?
+ freq_array=[{F1} {F2} {F3} {F4} {F5}] out_low={LOW}?
+ out_high={HIGH} duty_cycle={CYCLE} rise_time={RISE} fall_time={FALL})?
.ENDS SQRVCO

The error is:
Too few nodes: A1 %vd(1,2) %vd(3,4) ASQRVCO?
What I am doing wrong?
Thank you.


Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 

On Tue, May 14, 2024 at 03:53 PM, Tony Casey wrote:
...The first thing to do, is open the symbol in the symbol editor. Then, press ctrl-A, to open the Attribute Editor.
At the bottom, is the "ModelFile" Attribute. It will have the full path to the model file in it's current location. Delete that.
Then, save the edited symbol somewhere else - wherever it's used, is a good start. (Later, you might figure out a system for keeping custom symbols.)
In schematics where you place the new symbol, you should add a ".lib modelfile.sub" directive, where "modelfile.sub" is its actual name.
Keeping symbols and models with the schematics that use them is the best way of assuring portability.
?
--
Regards,
Tony?
?
Hi Tony, I am not sure how one would keep symbols with schematics.

To place them, they come from the Autogenerated folder or some other folder in the .lib top folder (which is not changeable)?
I agree, that making a folder for a project and then keeping everything related in there would be best but I have no idea how that can be achieved.

Regards
Bernt



Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 

I am trouble with this right at this moment.

I am not sure where to put the .lib files. On the previous install, it seemed to be wanting them in the .lib main folder.
And, the next issue now on a new install of v17, it is looking for them in the Autogenerated folder.

The error message is:
Could not open
'%HOMEPATH%\Documents\LtSpiceXVII\lib\sym\Autogenerated\INA826.lib



On this new install however, it puts the libs into c:\\username\AppData\Local\LTspice\lib\lib\Autogenerated

Are all the previously created symbols now useless unless each one is edited manually between machines?

I am also stumped that the default lib top folder is not selectable for LTSpice. That seems crazy.

Best regards
Bernt




Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 

¿ªÔÆÌåÓý

And be sure that the llibrary/model/subcircuit file is in the same directory [folder] as the schematic file.

Donald.

On 2024-05-14 18:53, John Woodgate wrote:

In that path, delete all except the filename and its extension.

On 2024-05-14 23:11, Berntd via groups.io wrote:
Hello,

The problem: Moving .asc schematics with Autogenerated symbols between different computers stops them working.
The .lib files are not in the same path and can not be located
It appears the symbol files store an absolute patch for the .lib file but this path depends on the computer username and the LTXSpice installation.

I tried to convert them to relative paths manually by could not get that to work.
What would be the correct way to fix this problem?

Best regards
Bernt
--
OOO - Own Opinions Only
Best wishes
John Woodgate, Rayleigh, Essex UK
Keep trying

Virus-free.


Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 

¿ªÔÆÌåÓý

In that path, delete all except the filename and its extension.

On 2024-05-14 23:11, Berntd via groups.io wrote:
Hello,

The problem: Moving .asc schematics with Autogenerated symbols between different computers stops them working.
The .lib files are not in the same path and can not be located
It appears the symbol files store an absolute patch for the .lib file but this path depends on the computer username and the LTXSpice installation.

I tried to convert them to relative paths manually by could not get that to work.
What would be the correct way to fix this problem?

Best regards
Bernt
--
OOO - Own Opinions Only
Best wishes
John Woodgate, Rayleigh, Essex UK
Keep trying

Virus-free.


Re: Best or easy way to make Autogenerated LTSpice symbols portable?

 

Sadly, many people are lured into autogenerating symbols. We've highlighted the drawbacks here frequently.
The first question is: do you need a new symbol? In many cases, the answer is "no". LTspice provides many "standard" symbols for common part types. Use them.
However, faced with existing auto-generated symbols, how can we make them portable?
The first thing to do, is open the symbol in the symbol editor. Then, press ctrl-A, to open the Attribute Editor.
At the bottom, is the "ModelFile" Attribute. It will have the full path to the model file in it's current location. Delete that.
Then, save the edited symbol somewhere else - wherever it's used, is a good start. (Later, you might figure out a system for keeping custom symbols.)
In schematics where you place the new symbol, you should add a ".lib modelfile.sub" directive, where "modelfile.sub" is its actual name.
Keeping symbols and models with the schematics that use them is the best way of assuring portability.

--
Regards,
Tony?

On 15 May 2024 00:11, "Berntd via groups.io" <berntau@...> wrote:
Hello,

The problem: Moving .asc schematics with Autogenerated symbols between different computers stops them working.
The .lib files are not in the same path and can not be located
It appears the symbol files store an absolute patch for the .lib file but this path depends on the computer username and the LTXSpice installation.

I tried to convert them to relative paths manually by could not get that to work.
What would be the correct way to fix this problem?

Best regards
Bernt


Best or easy way to make Autogenerated LTSpice symbols portable?

 

Hello,

The problem: Moving .asc schematics with Autogenerated symbols between different computers stops them working.
The .lib files are not in the same path and can not be located
It appears the symbol files store an absolute patch for the .lib file but this path depends on the computer username and the LTXSpice installation.

I tried to convert them to relative paths manually by could not get that to work.
What would be the correct way to fix this problem?

Best regards
Bernt


Re: Simulation problem concerning the use of the same variable twice in a formula

 

Hi Andy,

Thank you for your thorough review of my file. Your comments also helped me understand the problem. I will be able to finish my thesis now!?

Elien


Re: Error with SW()

 

¿ªÔÆÌåÓý

Almost exactly what I wrote, Andy.

I don¡¯t think I have ever edited a SW¡¯s Value field that way; I just edit the displayed ¡°SW¡±, but that¡¯s really the same thing¡­

?

From: [email protected] <[email protected]> On Behalf Of Andy I
Sent: Tuesday, May 14, 2024 5:52 AM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] Error with SW()

?

Al,

Open and read the Help page for voltage-controlled Switch elements.

Switches MUST use a .MODEL statement, which is a separate line on your schematic.? And the element itself is identified with the NAME of that .model, not any of its parameters.

Add this line to your schematic:

.model MySW SW(Ron=1k0 Roff=10meg Vt=1.65 Vh=100m Lser=1u Vser=0)

Then right-click on the symbol, and change its Value attribute to "MySW" (and nothing else).

I am pretty sure that is exactly what? Dave wrote, too.

Since Vser defaults to 0, you can omit it.

Andy


Re: Error with SW()

 

Sheeza vorke swimmingly
Thanx much Andy / peeps


On Tue, May 14, 2024 at 8:52?AM Andy I via <AI.egrps+io=[email protected]> wrote:
Al,

Open and read the Help page for voltage-controlled Switch elements.

Switches MUST use a .MODEL statement, which is a separate line on your schematic.? And the element itself is identified with the NAME of that .model, not any of its parameters.

Add this line to your schematic:

.model MySW SW(Ron=1k0 Roff=10meg Vt=1.65 Vh=100m Lser=1u Vser=0)

Then right-click on the symbol, and change its Value attribute to "MySW" (and nothing else).

I am pretty sure that is exactly what? Dave wrote, too.

Since Vser defaults to 0, you can omit it.

Andy



--
AC2CL

I do not think there is any thrill that
can go through the human heart like that felt by the inventor as
he sees some creation of the brain unfolding to success...
Such emotions make a man forget food, sleep, friends, love, everything.

- Nikola Tesla


Re: Import LTspice simbol model of UCC5304 problem

 

Hello Andy , sorry for misunderstanding. I will try to make my self more clearly
Yhe resistor is an rf transistor ,according figure 12 in the datasheet it needs to be Vds=45V and Ids=15A so the equivalent rds=3Ohm.

I need to bias two such transistors so 3||3=1.5 equivalent load.
As described in the photo below,The floating voltage opens M1 mosfet ,the current from M1 goes into two CGHV1A250F GAN M4 and M5 transistors(which i dont have their spice model) so i used 3||3=1.5.

M4 and M5 will be used to amplify RF signal.


If i put GND to the VSS of UCC5304 then i will have GND on the drain of my M4 and M5 then i would not be able to open them.

This is the LTSPICE riddle , how can i put VSS=GND? it will totally disable my options to open M4 and M5 later.

Maybe i am missign something in the logic of connecting the UCC5304 to the M1 ?
Thanks.



/g/LTspice/photo/294810/3782678?p=Created%2C%2C%2C20%2C2%2C0%2C0


Re: Import LTspice simbol model of UCC5304 problem

 

john23 wrote, "how can i solve this LTspice riddle?"

What is the riddle?

In real life, the UCC5304's VSS pin should connect to the same "return" voltage that is for the MOSFET, which is probably also the bottom end of the 1.5 ohm resistor.? That is one way you can make sure that your UCC5304 drives a voltage to the MOSFET gate that the MOSFET can understand.

In SPICE simulations, the UCC5304's VCC pin needs to have a DC path to SPICE ground.? You can get that by grounding its VCC pin, or its VDD pin, or even its VOUT pin.? Or by grounding one of those pins through a resistor.

Since your MOSFET power source (V4 or V5) is connected to SPICE ground, then you should also connect the UCC5304's VCC pin to SPICE ground, and its VDD power source should be referenced to the same ground (which it already is).

Why did you name the MOSFET's Source pin "vss"?? That does not look right, but I guess that is one way you could do it.

Andy


Re: Import LTspice simbol model of UCC5304 problem

 

Hello Andy,In real life i use the ucc5304 to do a floating voltage for SQ3426EV

In real life i cannot put Vss into ground, Its a floating? voltage between out and Vss.
the floating voltage goes into the gate and source of the mosfet (datasheet shown below).

the current which goes into the open mosfter afterwards flows into two rf transistors (which is represented as 1.5Ohms load)

If i put Vss=GND my load rf transistor could not be biased. Its drain will be gnd and could not be opened.
As shown in the LTspice photo below.
how can i solve this LTspice riddle?
Thanks.

/g/LTspice/photo/294810/3782670?p=Created%2C%2C%2C20%2C2%2C0%2C0


https://www.mouser.co.il/ProductDetail/Vishay-Semiconductors/SQ3426EV-T1_GE3?qs=Vcr9%2FL0R50i4QZtXcIuK7w%3D%3D&utm_id=20109199406&gad_source=1&gclid=CjwKCAjwl4yyBhAgEiwADSEjeNqw_5bdryZSNkak5BxSZxU9qIlhYUA6_d1VYtls3HSHEQ6KBMpRqRoCvIQQAvD_BwE

?


Re: Error with SW()

 

Hi Peeps
Many thanx for the help
I ll give em a try later today


On Tue, May 14, 2024 at 9:01?AM Andy I via <AI.egrps+io=[email protected]> wrote:

[Edited Message Follows]

Al,

I uploaded a fixed schematic for you.

Edit:? Which I forgot to say is named PecoFerd2_AI.asc, in the Temp folder.

Andy



--
AC2CL

I do not think there is any thrill that
can go through the human heart like that felt by the inventor as
he sees some creation of the brain unfolding to success...
Such emotions make a man forget food, sleep, friends, love, everything.

- Nikola Tesla


Re: Error with SW()

 
Edited

Al,

I uploaded a fixed schematic for you.

Edit:? Which I forgot to say is named PecoFerd2_AI.asc, in the Temp folder.

Andy


Re: Error with SW()

 

Al,

Also remember, file uploads should go into the "Temp" directory only.

I've fixed that for you (moved it into "Temp").

Andy


Re: Error with SW()

 

Al,

Open and read the Help page for voltage-controlled Switch elements.

Switches MUST use a .MODEL statement, which is a separate line on your schematic.? And the element itself is identified with the NAME of that .model, not any of its parameters.

Add this line to your schematic:

.model MySW SW(Ron=1k0 Roff=10meg Vt=1.65 Vh=100m Lser=1u Vser=0)

Then right-click on the symbol, and change its Value attribute to "MySW" (and nothing else).

I am pretty sure that is exactly what? Dave wrote, too.

Since Vser defaults to 0, you can omit it.

Andy


Re: Error with SW()

 

¿ªÔÆÌåÓý

Al, I don¡¯t think you can paste th4e model definition into the instance you create.

Make a separate definition, using the op tool:

.model MySW SW(Ron=1k0 Roff=10meg Vt=1.65 Vh=100m Lser=1u Vser=0)

Change the switch¡¯s name to MySW

?

Run

?

Dave

?

From: [email protected] <[email protected]> On Behalf Of Al Dutcher
Sent: Tuesday, May 14, 2024 5:04 AM
To: [email protected]
Subject: EXTERNAL: [LTspice] Error with SW()

?

Maybe i found a bug, or
what am i doing wrong?
.asc is uploaded

LTspice 24.0.9 for Windows
Circuit: * C:\users\alzie\My Documents\LTspice\Ori\PecoFerd2.asc
Start Time: Tue May 14 08:01:13 2024
Error on line 4 : s1 n003 n002 n001 0 sw(ron=1k0 roff=10meg vt=1.65 vh=100m lser=1u vser=0)
? ? ?Unable to find definition of model "sw"
solver = Normal
Maximum thread count: 8
tnom = 27
temp = 27
method = modified trap
.OP point found by inspection.
Total elapsed time: 2.341 seconds.


Error with SW()

 

Maybe i found a bug, or
what am i doing wrong?
.asc is uploaded

LTspice 24.0.9 for Windows
Circuit: * C:\users\alzie\My Documents\LTspice\Ori\PecoFerd2.asc
Start Time: Tue May 14 08:01:13 2024
Error on line 4 : s1 n003 n002 n001 0 sw(ron=1k0 roff=10meg vt=1.65 vh=100m lser=1u vser=0)
? ? ?Unable to find definition of model "sw"
solver = Normal
Maximum thread count: 8
tnom = 27
temp = 27
method = modified trap
.OP point found by inspection.
Total elapsed time: 2.341 seconds.


Re: Simulation problem concerning the use of the same variable twice in a formula

 

Elien,

I uploaded a modified version of your schematic, "Parallel_gains_R_AI.zip", in the Temp folder.? It fixes the formula for the resistor RLout_c.

I also made a few other changes:

I edited every inductor to set their series resistance Rser to 0, making them ideal.? The default Rser (before doing that) is 1 mOhm, which might alter your results a little.

I changed number multipliers from engineering notation to common 1-letter abbreviations, e.g., k, u, n.? I think it is more readable.

I shortened the formula for RLout_c.

Please note this:? Some of the numbers you used have extreme resolution, as many as 32 digits.? As you may know, double-precision numbers as used in the simulator have only 15 to 17 digits of resolution, so most of those digits in your numbers are meaningless.? I suggest it might be wise to simplify numbers such as 48730063831763729805207428564385 to 48730063831763720000000000000000 or 4.873006383176372e+31, so that they do not deceive others by their meaningless numerical resolution.

Because your circuit is linear, it might benefit from .AC analysis rather than .TRAN.? It would simulate much faster, and the calculations made easier.

Andy