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.

Switch is not working in LTspice?

Status
Not open for further replies.

Flyback

Well-Known Member
Hi,
Do you know why the switch S3 in the attached LTspice sim is not working?

Ive been doing switches like this for 10yrs plus, and never had one like this not work.
 

Attachments

  • half bridge GDT_full _A0750_ORIGINAL_test.asc
    24.7 KB · Views: 263
Works ok for me.
 
1. There's no benefit to grounding the "com" pin on the logic devices.
2. The is no -0. There is just 0.
3. The switch control should be 0v or 1v.
3. The switch model statement should be:
.MODEL SW SW(RON=1m vt=0.0 vh=-0.5)
so it will switch at 0.5v and the minus in "vh=-0.5" specifies a smooth transition between off and on impedences
 
Thanks.....the S3 switch is still not working for me......i just put another switch in there, S4, as attached and that does work., as attached...I also added your kindly supplied data for switch model statement.
I am wondering if its my computer or something.

I deleted the whole switch S3 and its voltage thing aswell.....and re-did it, but S3 still doesnt work.
 

Attachments

  • S3 still not working.asc
    25.6 KB · Views: 251
Thanks.....the S3 switch is still not working for me......i just put another switch in there, S4, as attached and that does work., as attached...I also added your kindly supplied data for switch model statement.
I am wondering if its my computer or something.

I deleted the whole switch S3 and its voltage thing aswell.....and re-did it, but S3 still doesnt work.

S3 is working. You didn't remove the com connections on the logic devices. They are not needed.

I've made other adjustments:
1. Added a set of common parameters for all logic devices.
I've set these to reflect CD4000 since the voltage level is 12v.
and added the params to all logic devices.

2. I've placed a rectangle around the areas where I made changes

3. tau (instead of trise/tfall), along with tripdt, params are better to use for convergence purposes and provide smoother logic transitions.

4. I removed "Hopeless" because of convergence issues.
 

Attachments

  • S3 still not working-1.zip
    5.5 KB · Views: 265
Massive thankyou eTech...your sim is great!...ive stored it away in my files.
You have showed me exactly why it wasnt working!...thanks!!

...what i found was that it depends on the setting of the resistance value in the .model statement......when i set it to 1 instead of 1m...the switch works....it must be something to do with the logic gate downstream of the switch.
Thankyou for showing me the way!
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top