Skip to content

Commit

Permalink
fixes #4009, switches are simulated as an open circuit when not press…
Browse files Browse the repository at this point in the history
…ed (instead of using a high resistance) to be more realistic
  • Loading branch information
failiz authored and Kjell Morgenstern committed May 17, 2023
1 parent 713e6e0 commit a7d26b2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 22 deletions.
7 changes: 2 additions & 5 deletions core/basic-toggle-switch.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
<property name="switching circuit">SPDT</property>
<property name="package">THT</property>
<property name="switch status">Released</property>
<property name="contact resistance">0.1&#937;</property>
</properties>
<description>Toggle Switch</description>
<spice>
<line>S{instanceTitle}_1 {net connector2} {net connector1} control_{instanceTitle}_1 0 generic_switch OFF</line>
<line>S{instanceTitle}_2 {net connector0} {net connector1} control_{instanceTitle}_2 0 generic_switch ON</line>
<line>V{instanceTitle}_1 control_{instanceTitle}_1 0 DC 0</line>
<line>V{instanceTitle}_2 control_{instanceTitle}_2 0 DC 5</line>
<model>.MODEL generic_switch SW(Ron=1m Roff=1Meg Vt=2.5)</model>
<line>R{instanceTitle} {net connector0} {net connector1} {contact resistance}</line>
</spice>
<views>
<iconView>
Expand Down
7 changes: 2 additions & 5 deletions core/basic-toggle-switch_pressed.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
<property name="switching circuit">SPDT</property>
<property name="package">THT</property>
<property name="switch status">Pressed</property>
<property name="contact resistance">0.1&#937;</property>
</properties>
<description>Toggle Switch</description>
<spice>
<line>S{instanceTitle}_1 {net connector2} {net connector1} control_{instanceTitle}_1 0 generic_switch OFF</line>
<line>S{instanceTitle}_2 {net connector0} {net connector1} control_{instanceTitle}_2 0 generic_switch ON</line>
<line>V{instanceTitle}_1 control_{instanceTitle}_1 0 DC 5</line>
<line>V{instanceTitle}_2 control_{instanceTitle}_2 0 DC 0</line>
<model>.MODEL generic_switch SW(Ron=1m Roff=1Meg Vt=2.5)</model>
<line>R{instanceTitle} {net connector2} {net connector1} {contact resistance}</line>
</spice>
<views>
<iconView>
Expand Down
5 changes: 2 additions & 3 deletions core/pushbutton_2_horizontal.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
<property name="Switching Circuit">SPST</property>
<property name="package">THT</property>
<property name="switch status">Released</property>
<property name="contact resistance">0.1&#937;</property>
</properties>
<taxonomy>discreteParts.switches.pushbutton</taxonomy>
<description>A generic pushbutton.</description>
<spice>
<line>S{instanceTitle} {net connector0} {net connector1} control_{instanceTitle} 0 generic_switch ON</line>
<line>V{instanceTitle} control_{instanceTitle} 0 DC 0</line>
<model>.MODEL generic_switch SW(Ron=1m Roff=1Meg Vt=2.5)</model>
<line>* Open switch {instanceTitle} between nets {net connector0} and {net connector1}</line>
</spice>
<views>
<iconView>
Expand Down
5 changes: 2 additions & 3 deletions core/pushbutton_2_horizontal_pressed.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
<property name="Switching Circuit">SPST</property>
<property name="package">THT</property>
<property name="switch status">Pressed</property>
<property name="contact resistance">0.1&#937;</property>
</properties>
<taxonomy>discreteParts.switches.pushbutton</taxonomy>
<description>A generic pushbutton.</description>
<spice>
<line>S{instanceTitle} {net connector0} {net connector1} control_{instanceTitle} 0 generic_switch ON</line>
<line>V{instanceTitle} control_{instanceTitle} 0 DC 5</line>
<model>.MODEL generic_switch SW(Ron=1m Roff=1Meg Vt=2.5)</model>
<line>R{instanceTitle} {net connector0} {net connector1} {contact resistance}</line>
</spice>
<views>
<iconView>
Expand Down
5 changes: 2 additions & 3 deletions core/pushbutton_4_horizontal.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
<property name="family">Switch</property>
<property name="package">[THT]</property>
<property name="switch status">Released</property>
<property name="contact resistance">0.1&#937;</property>
</properties>
<description>A generic pushbutton.</description>
<spice>
<line>S{instanceTitle} {net connector0} {net connector2} control_{instanceTitle} 0 generic_switch OFF</line>
<line>V{instanceTitle} control_{instanceTitle} 0 DC 0</line>
<model>.MODEL generic_switch SW(Ron=1m Roff=1Meg Vt=2.5)</model>
<line> * Open switch {instanceTitle} between nets {net connector0} and {net connector2}</line>
</spice>
<views>
<iconView>
Expand Down
5 changes: 2 additions & 3 deletions core/pushbutton_4_horizontal_pressed.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
<property name="family">Switch</property>
<property name="package">[THT]</property>
<property name="switch status">Pressed</property>
<property name="contact resistance">0.1&#937;</property>
</properties>
<description>A generic pushbutton.</description>
<spice>
<line>S{instanceTitle} {net connector0} {net connector2} control_{instanceTitle} 0 generic_switch ON</line>
<line>V{instanceTitle} control_{instanceTitle} 0 DC 5</line>
<model>.MODEL generic_switch SW(Ron=1m Roff=1Meg Vt=2.5)</model>
<line>R{instanceTitle} {net connector0} {net connector2} {contact resistance}</line>
</spice>
<views>
<iconView>
Expand Down

0 comments on commit a7d26b2

Please sign in to comment.