Skip to content

Commit

Permalink
added spice field to the transformer and added transformer to the SIM…
Browse files Browse the repository at this point in the history
… bin
  • Loading branch information
failiz committed Dec 7, 2023
1 parent 993cece commit 575a785
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
7 changes: 7 additions & 0 deletions bins/more/sim.fzb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
</iconView>
</views>
</instance>
<instance modelIndex="8" moduleIdRef="SparkFun-PowerIC-TRANSFORMER-PTH" path="sparkfun-poweric-transformer-pth.fzp">
<views>
<iconView layer="icon">
<geometry x="-1" y="-1" z="-1"/>
</iconView>
</views>
</instance>
<instance modelIndex="9" moduleIdRef="3254CBFC44diode" path="diode_1N4001_300mil.fzp">
<views>
<iconView layer="icon">
Expand Down
24 changes: 22 additions & 2 deletions core/sparkfun-poweric-transformer-pth.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,36 @@
<label>U</label>
<author>www.fritzing.org</author>
<description>Small transformers</description>
<title>TRANSFORMER</title>
<title>Transformer</title>
<tags>
<tag>PTH</tag>
<tag>TRANSFORMER</tag>
<tag>Transformer</tag>
</tags>
<properties>
<property name="package">transformer</property>
<property name="family">sparkfun Transformer</property>
<property name="variant">pth</property>
<property name="input inductance">10H</property>
<property name="output inductance">40H</property>
<property name="input resistance">1&#937;</property>
<property name="output resistance">1&#937;</property>
</properties>
<spice>
<line>x{instanceTitle} {net connector0} {net connector1} {net connector3} {net connector2} basic_transformer Lin={input inductance} Lout={output inductance} Rin={input resistance} Rout={output resistance}</line>
<model>.subckt basic_transformer in1 in2 out1 out2 Lin=100u Lout=100u Rin=1 Rout=1
* inductances
Li in1 intin {Lin}
Lo out1 intou {Lout}
* coupling factors
K1 Li Lo 1
* series resistances
Ri intin in2 {Rin}
Ro intou out2 {Rout}
* resistor to guarantee a DC path
Rdc in1 out1 1Meg
.ends basic_transformer
</model>
</spice>
<views>
<breadboardView>
<layers image="breadboard/sparkfun-poweric_transformer_breadboard.svg">
Expand Down
26 changes: 23 additions & 3 deletions core/sparkfun-poweric-transformer-smd.fzp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,37 @@
<label>U</label>
<author>www.fritzing.org</author>
<description>Small transformers</description>
<title>TRANSFORMER</title>
<title>Transformer</title>
<tags>
<tag>TRANSFORMER_SMD</tag>
<tag>TRANSFORMER</tag>
<tag>Transformer_SMD</tag>
<tag>Transformer</tag>
<tag>SMD</tag>
</tags>
<properties>
<property name="package">transformer_smd</property>
<property name="family">sparkfun Transformer</property>
<property name="variant">smd</property>
<property name="input inductance">10H</property>
<property name="output inductance">40H</property>
<property name="input resistance">1&#937;</property>
<property name="output resistance">1&#937;</property>
</properties>
<spice>
<line>x{instanceTitle} {net connector0} {net connector1} {net connector3} {net connector2} basic_transformer Lin={input inductance} Lout={output inductance} Rin={input resistance} Rout={output resistance}</line>
<model>.subckt basic_transformer in1 in2 out1 out2 Lin=100u Lout=100u Rin=1 Rout=1
* inductances
Li in1 intin {Lin}
Lo out1 intou {Lout}
* coupling factors
K1 Li Lo 1
* series resistances
Ri intin in2 {Rin}
Ro intou out2 {Rout}
* resistor to guarantee a DC path
Rdc in1 out1 1Meg
.ends basic_transformer
</model>
</spice>
<views>
<breadboardView>
<layers image="breadboard/sparkfun-poweric_transformer_smd_breadboard.svg">
Expand Down

0 comments on commit 575a785

Please sign in to comment.