¿ªÔÆÌåÓý

Date

Re: Square wave vco

 

It is from Circuit Maker or latter Altium:
chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://wiki.bu.ost.ch/infoportal/_media/hardware/altium_designer/tr0113_simulation_models_and_analyses_reference.pdf

page 250


Re: Square wave vco

 

Thanks.
I need square wave vco for PLL tests. Currently I am using:
V=u(sin(2*pi*(fc*time+df*idt(V(m)))))
It can be dome in many ways wit B sources, although I am not sure how to add FM:

?

Triangle wave with period 1/fc:

V=fc* idtmod(1,0,1/fc)

?

Square wave with period 1/fc:

V=u(fc* idtmod(1,0,1/fc) - 0.5)

?

Staircase with period 1/fc:

V= floor(time*fc)


But as I remember in the good old Circuit Maker there was square/triangle vco, latter adopted by Altium.
I thought I could use it with LTSpice.


Re: Square wave vco

 

On Tue, May 14, 2024 at 07:56 PM, <bb_petrov@...> wrote:

Too few nodes: A1 %vd(1,2) %vd(3,4) ASQRVCO
Just curious: I know such error messages from XSPICE. Are you
mistakingly invoking ngspice (or KiCAD) somewhere in the chain?

-marcel


Re: Square wave vco

 

¿ªÔÆÌåÓý

I'm struggling to understand what you are trying to do with:

.MODEL ASQRVCO...

AFAIK, you can only define .models as being these types of LTspice primitives:

C, R, L, D, SW, CSW, URC, LTRA, NPN, PNP, NJF, PJF, NMOS, PMOS, NMF, PMF, NIGBT, PIGBT, VDMOS

See: Help > LTspice XVII > LTspice? > Dot Commands > .MODEL

--
Regards,
Tony


On 15/05/2024 10:20, John Woodgate wrote:

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: Square wave vco

 

Of course the model is in a circuit
* C:\Users\BoyanP\Documents\srt_marine\EP1_HH_eval\PLL\sim\pll_avg_mod\Draft3.asc
V1 N001 0 SINE(2.5 2.5 100)
XU1 N001 0 N002 0 SQRVCO 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
.tran 130m
.lib C:\Users\BoyanP\Documents\LTspiceXVII\lib\sym\AutoGenerated\sqrvco.sub
.backanno
.end
Just a voltage source and autogenerated symbol.


Re: Square wave vco

 

¿ªÔÆÌåÓý

It won't run my itself. It needs to be included in a schematic with specifications of parameters (the symbols in { }).

On 2024-05-15 07:56, bb_petrov via groups.io wrote:
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.
--
OOO - Own Opinions Only
Best wishes
John Woodgate, Rayleigh, Essex UK
Keep trying

Virus-free.


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