aboutsummaryrefslogtreecommitdiff
path: root/ac2dc_linear.sp
diff options
context:
space:
mode:
Diffstat (limited to 'ac2dc_linear.sp')
-rw-r--r--ac2dc_linear.sp29
1 files changed, 29 insertions, 0 deletions
diff --git a/ac2dc_linear.sp b/ac2dc_linear.sp
new file mode 100644
index 0000000..bc6954b
--- /dev/null
+++ b/ac2dc_linear.sp
@@ -0,0 +1,29 @@
+AC-DC Linear Regulator
+
+.inc ./lib/generic.lib
+.inc ./lib/regulators.lib
+
+* Transformation
+Vac acp1 acp2 sin(0 155.6 50)
+Xt acp1 acp2 acs1 acs2 TRANSFORMER Lout=1.19
+
+* Rectification
+Xr acs1 acs2 in gnd RECTIFIER
+
+* Filtering
+C1 in gnd 100u
+C2 in gnd 100u
+C3 in gnd 10u
+
+* Regulation
+Xrv in gnd out LM7805
+Rl out gnd 100
+
+.control
+set filetype ascii
+tran 100us 35ms
+shell mkdir -p results
+wrdata results/voltages.raw v(acs1,acs2) v(in) v(out)
+shell gnuplot ac2dc_linear.gnuplot
+.endc
+.end
Feel free to download, copy and edit any repo