Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switcher CAD switch

Status
Not open for further replies.

Optikon

New Member
OK, so where is an ideal switch!? I found a part called "sw" as voltage controlled switch but you gotta put a subcircuit behind it... guhh...

Did I miss it somewhere? I need an ideal switch to simulate a mechanical relay.. surely someone has used an ideal switch in this simulator.. can you point me to where you found it or a link for a good subckt? Or even post the model you use if I have to add a subckt.

Thanks!
 
Optikon said:
OK, so where is an ideal switch!? I found a part called "sw" as voltage controlled switch but you gotta put a subcircuit behind it... guhh...

Did I miss it somewhere? I need an ideal switch to simulate a mechanical relay.. surely someone has used an ideal switch in this simulator.. can you point me to where you found it or a link for a good subckt? Or even post the model you use if I have to add a subckt.

Thanks!
No subckt required. You just have to create a model for it. All this stuff is in the help file, but I'll paraphrase it here.

.model mysw sw(Ron=1m Roff=1e12 Vt=2.5)

Then place an SW element and right-click on it. In the VALUE line, replace SW with mysw. Connect a voltage source to it that transitions between 0V and 5V when you want it to switch. You obviously don't have to use 5V, as you can make Vt any value you want. If you have convergence problems, add Vh to the model, with a negative value of about 20% of Vt, e.g., Vh=-1 in the example I gave. If you make Vh positive, you will get hysteresis - which can be very useful.

I know this is a small pain in the ass, but it makes the part very flexible.
 
Ron H said:
Optikon said:
OK, so where is an ideal switch!? I found a part called "sw" as voltage controlled switch but you gotta put a subcircuit behind it... guhh...

Did I miss it somewhere? I need an ideal switch to simulate a mechanical relay.. surely someone has used an ideal switch in this simulator.. can you point me to where you found it or a link for a good subckt? Or even post the model you use if I have to add a subckt.

Thanks!
No subckt required. You just have to create a model for it. All this stuff is in the help file, but I'll paraphrase it here.

.model mysw sw(Ron=1m Roff=1e12 Vt=2.5)

Then place an SW element and right-click on it. In the VALUE line, replace SW with mysw. Connect a voltage source to it that transitions between 0V and 5V when you want it to switch. You obviously don't have to use 5V, as you can make Vt any value you want. If you have convergence problems, add Vh to the model, with a negative value of about 20% of Vt, e.g., Vh=-1 in the example I gave. If you make Vh positive, you will get hysteresis - which can be very useful.

I know this is a small pain in the ass, but it makes the part very flexible.

That's awesome thanks ron. My help file is corrupt and I'm too lazy...
a .model isnt bad.

Thanks again!
 
I dunno if I'm saying the same thing as Ron here (didn't bother to read his :lol: ).

I always just use a voltage source that is programmed to turn on after a second or two and stay on.
 
zachtheterrible said:
I dunno if I'm saying the same thing as Ron here (didn't bother to read his :lol: ).

I always just use a voltage source that is programmed to turn on after a second or two and stay on.
A voltage source is not a switch. A voltage source has near zero resistance, regardless of the voltage. A switch changes from very high resistance to very low resistance.
 
Status
Not open for further replies.

Latest threads

Back
Top