Skip to content

Commit

Permalink
Added Transformer Example
Browse files Browse the repository at this point in the history
  • Loading branch information
GauravSupal committed Mar 3, 2016
1 parent 302e0fb commit 7d128c3
Show file tree
Hide file tree
Showing 9 changed files with 579 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Examples/Transformer/Transformer.cir
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
* /home/fossee/eSim-Workspace/Transformer/Transformer.cir

* EESchema Netlist Version 1.1 (Spice format) creation date: Thu Mar 3 23:13:47 2016

* To exclude a component from the Spice Netlist add [Spice_Netlist_Enabled] user FIELD set to: N
* To reorder the component spice node sequence add [Spice_Node_Sequence] user FIELD and define sequence: 2,1,0

* Sheet Name: /
v1 Net-_R2-Pad2_ GND sine
R1 out GND 1k
R2 in Net-_R2-Pad2_ 1k
U1 in GND GND out TRANSFO
U2 in plot_v1
U3 out plot_v1

.end
28 changes: 28 additions & 0 deletions Examples/Transformer/Transformer.cir.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
* /home/fossee/esim-workspace/transformer/transformer.cir

v1 net-_r2-pad2_ gnd sine(0 10 50 0 0)
r1 out gnd 1k
r2 in net-_r2-pad2_ 1k
* u1 in gnd gnd out transfo
* u2 in plot_v1
* u3 out plot_v1
a1 (in gnd) (interNode_1 gnd) u1_primary
a2 (out gnd) (interNode_2 gnd) u1_secondary
a3 (interNode_1 interNode_2) u1_iron_core
*primary lcouple
.model u1_primary lcouple (num_turns= 310)
*iron core
.model u1_iron_core core (H_array = [-1000 -500 -375 -250 -188 -125 -63 0 63 125 188 250 375 500 1000] B_array = [-3.13e-3 -2.63e-3 -2.33e-3 -1.93e-3 -1.5e-3 -6.25e-4 -2.5e-4 0 2.5e-4 6.25e-4 1.5e-3 1.93e-3 2.33e-3 2.63e-3 3.13e-3] area = 1 length =0.01)
*secondary lcouple
.model u1_secondary lcouple (num_turns =620)
.tran 10e-03 100e-03 0e-03

* Control Statements
.control
run
print allv > plot_data_v.txt
print alli > plot_data_i.txt
plot v(in)
plot v(out)
.endc
.end
71 changes: 71 additions & 0 deletions Examples/Transformer/Transformer.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
update=22/05/2015 07:44:53
version=1
last_client=kicad
[general]
version=1
RootSch=
BoardNm=
[pcbnew]
version=1
LastNetListRead=
UseCmpFile=1
PadDrill=0.600000000000
PadDrillOvalY=0.600000000000
PadSizeH=1.500000000000
PadSizeV=1.500000000000
PcbTextSizeV=1.500000000000
PcbTextSizeH=1.500000000000
PcbTextThickness=0.300000000000
ModuleTextSizeV=1.000000000000
ModuleTextSizeH=1.000000000000
ModuleTextSizeThickness=0.150000000000
SolderMaskClearance=0.000000000000
SolderMaskMinWidth=0.000000000000
DrawSegmentWidth=0.200000000000
BoardOutlineThickness=0.100000000000
ModuleOutlineThickness=0.150000000000
[cvpcb]
version=1
NetIExt=net
[eeschema]
version=1
LibDir=
[eeschema/libraries]
LibName1=eSim_Analog
LibName2=eSim_Devices
LibName3=eSim_Digital
LibName4=eSim_Hybrid
LibName5=eSim_Miscellaneous
LibName6=eSim_Power
LibName7=eSim_Sources
LibName8=eSim_Subckt
LibName9=eSim_User
LibName10=eSim_Plot
LibName11=adc-dac
LibName12=memory
LibName13=xilinx
LibName14=microcontrollers
LibName15=dsp
LibName16=microchip
LibName17=analog_switches
LibName18=motorola
LibName19=texas
LibName20=intel
LibName21=audio
LibName22=interface
LibName23=digital-audio
LibName24=philips
LibName25=display
LibName26=cypress
LibName27=siliconi
LibName28=opto
LibName29=atmel
LibName30=contrib
LibName31=power
LibName32=device
LibName33=transistors
LibName34=conn
LibName35=linear
LibName36=regul
LibName37=74xx
LibName38=cmos4000
1 change: 1 addition & 0 deletions Examples/Transformer/Transformer.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
schematicFile Transformer.sch
191 changes: 191 additions & 0 deletions Examples/Transformer/Transformer.sch
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
EESchema Schematic File Version 2
LIBS:eSim_Analog
LIBS:eSim_Devices
LIBS:eSim_Digital
LIBS:eSim_Hybrid
LIBS:eSim_Miscellaneous
LIBS:eSim_Power
LIBS:eSim_Sources
LIBS:eSim_Subckt
LIBS:eSim_User
LIBS:eSim_Plot
LIBS:adc-dac
LIBS:memory
LIBS:xilinx
LIBS:microcontrollers
LIBS:dsp
LIBS:microchip
LIBS:analog_switches
LIBS:motorola
LIBS:texas
LIBS:intel
LIBS:audio
LIBS:interface
LIBS:digital-audio
LIBS:philips
LIBS:display
LIBS:cypress
LIBS:siliconi
LIBS:opto
LIBS:atmel
LIBS:contrib
LIBS:power
LIBS:device
LIBS:transistors
LIBS:conn
LIBS:linear
LIBS:regul
LIBS:74xx
LIBS:cmos4000
LIBS:test-cache
EELAYER 25 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L sine v1
U 1 1 56D6CB89
P 4050 3850
F 0 "v1" H 3850 3950 60 0000 C CNN
F 1 "sine" H 3850 3800 60 0000 C CNN
F 2 "R1" H 3750 3850 60 0000 C CNN
F 3 "" H 4050 3850 60 0000 C CNN
1 4050 3850
1 0 0 -1
$EndComp
Wire Wire Line
4800 3400 4800 3600
$Comp
L GND #PWR01
U 1 1 56D6CBE8
P 4050 4300
F 0 "#PWR01" H 4050 4050 50 0001 C CNN
F 1 "GND" H 4050 4150 50 0000 C CNN
F 2 "" H 4050 4300 50 0000 C CNN
F 3 "" H 4050 4300 50 0000 C CNN
1 4050 4300
1 0 0 -1
$EndComp
$Comp
L GND #PWR02
U 1 1 56D6CC00
P 4800 4000
F 0 "#PWR02" H 4800 3750 50 0001 C CNN
F 1 "GND" H 4800 3850 50 0000 C CNN
F 2 "" H 4800 4000 50 0000 C CNN
F 3 "" H 4800 4000 50 0000 C CNN
1 4800 4000
1 0 0 -1
$EndComp
$Comp
L GND #PWR03
U 1 1 56D6CC11
P 5600 4000
F 0 "#PWR03" H 5600 3750 50 0001 C CNN
F 1 "GND" H 5600 3850 50 0000 C CNN
F 2 "" H 5600 4000 50 0000 C CNN
F 3 "" H 5600 4000 50 0000 C CNN
1 5600 4000
1 0 0 -1
$EndComp
$Comp
L R R1
U 1 1 56D6CC22
P 5950 3750
F 0 "R1" H 6000 3880 50 0000 C CNN
F 1 "1k" H 6000 3800 50 0000 C CNN
F 2 "" H 6000 3730 30 0000 C CNN
F 3 "" V 6000 3800 30 0000 C CNN
1 5950 3750
0 1 1 0
$EndComp
$Comp
L GND #PWR04
U 1 1 56D6CC5D
P 6000 3950
F 0 "#PWR04" H 6000 3700 50 0001 C CNN
F 1 "GND" H 6000 3800 50 0000 C CNN
F 2 "" H 6000 3950 50 0000 C CNN
F 3 "" H 6000 3950 50 0000 C CNN
1 6000 3950
1 0 0 -1
$EndComp
Wire Wire Line
5600 3600 6000 3600
Wire Wire Line
6000 3600 6000 3650
Text GLabel 6000 3500 2 60 Input ~ 0
out
Wire Wire Line
6000 3500 5950 3500
Wire Wire Line
5950 3400 5950 3600
Connection ~ 5950 3600
Text GLabel 4600 3250 0 60 Input ~ 0
in
$Comp
L R R2
U 1 1 56D6D2F8
P 4400 3350
F 0 "R2" H 4450 3480 50 0000 C CNN
F 1 "1k" H 4450 3400 50 0000 C CNN
F 2 "" H 4450 3330 30 0000 C CNN
F 3 "" V 4450 3400 30 0000 C CNN
1 4400 3350
-1 0 0 1
$EndComp
Wire Wire Line
4200 3400 4050 3400
Wire Wire Line
4500 3400 4800 3400
Wire Wire Line
4600 3250 4700 3250
Wire Wire Line
4700 3200 4700 3400
Connection ~ 4700 3400
$Comp
L TRANSFO U1
U 1 1 56D70807
P 5200 3800
F 0 "U1" H 5200 4050 50 0000 C CNN
F 1 "TRANSFO" H 5200 3500 50 0000 C CNN
F 2 "" H 5200 3800 50 0000 C CNN
F 3 "" H 5200 3800 50 0000 C CNN
1 5200 3800
1 0 0 -1
$EndComp
$Comp
L plot_v1 U2
U 1 1 56D87780
P 4700 3400
F 0 "U2" H 4700 3900 60 0000 C CNN
F 1 "plot_v1" H 4900 3750 60 0000 C CNN
F 2 "" H 4700 3400 60 0000 C CNN
F 3 "" H 4700 3400 60 0000 C CNN
1 4700 3400
1 0 0 -1
$EndComp
$Comp
L plot_v1 U3
U 1 1 56D877C8
P 5950 3600
F 0 "U3" H 5950 4100 60 0000 C CNN
F 1 "plot_v1" H 6150 3950 60 0000 C CNN
F 2 "" H 5950 3600 60 0000 C CNN
F 3 "" H 5950 3600 60 0000 C CNN
1 5950 3600
1 0 0 -1
$EndComp
Connection ~ 4700 3250
Connection ~ 5950 3500
$EndSCHEMATC
1 change: 1 addition & 0 deletions Examples/Transformer/Transformer_Previous_Values.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<KicadtoNgspice><analysis><ac><field1 name="Lin">true</field1><field2 name="Dec">false</field2><field3 name="Oct">false</field3><field4 name="Start Frequency" /><field5 name="Stop Frequency" /><field6 name="No. of points" /><field7 name="Start Fre Combo">Hz</field7><field8 name="Stop Fre Combo">Hz</field8></ac><dc><field1 name="Source 1" /><field2 name="Start" /><field3 name="Increment" /><field4 name="Stop" /><field5 name="Operating Point">0</field5><field6 name="Start Combo">Volts or Amperes</field6><field7 name="Increment Combo">Volts or Amperes</field7><field8 name="Stop Combo">Volts or Amperes</field8><field9 name="Source 2" /><field10 name="Start" /><field11 name="Increment" /><field12 name="Stop" /><field13 name="Start Combo">Volts or Amperes</field13><field14 name="Increment Combo">Volts or Amperes</field14><field15 name="Stop Combo">Volts or Amperes</field15></dc><tran><field1 name="Start Time">0</field1><field2 name="Step Time">10</field2><field3 name="Stop Time">100</field3><field4 name="Start Combo">ms</field4><field5 name="Step Combo">ms</field5><field6 name="Stop Combo">ms</field6></tran></analysis><source><v1 name="Source type">sine<field1 name="Offset Value">0</field1><field2 name="Amplitude">10</field2><field3 name="Frequency">50</field3><field4 name="Delay Time">0</field4><field5 name="Damping Factor">0</field5></v1></source><model><u1 name="type">transfo<field1 name="Enter the H1 array " /><field2 name="Enter the primary number of turns (default=310) " /><field3 name="Enter iron core area (default=1)" /><field4 name="Enter iron core length (default=0.01)" /><field5 name="Enter the secondary number of turns (default=620)" /><field6 name="Enter the B1 array " /></u1></model><devicemodel /><subcircuit /></KicadtoNgspice>
1 change: 1 addition & 0 deletions Examples/Transformer/analysis
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.tran 10e-03 100e-03 0e-03
Loading

0 comments on commit 7d128c3

Please sign in to comment.