Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/dpv/AudioAmpDPV.m4

raw
1 .PS
2 # AudioAmp MTP8P10
3 #RE Graf "Amplifier Circuits"
4 cct_init
5 cct_init(svg_font(sans-serif,9bp__,1bp__))
6
7 define(`MTP8P10',`[
8 Q: mosfet(,`$1',dMdPyEDSQdBO,)
9 S: Q.tr_xy(-9, 0); line from Q.tr_xy(-2, 0) to S
10 D: Q.tr_xy( 7, 0); line from Q.tr_xy(2, 0) to D
11 G: Q.G
12 C: circle rad 5*dimen_/10 at Q.tr_xy(0,1) ]')
13
14 define(`MTM25N10',`[
15 Q: mosfet(,`$1',dMuPyEDSQuBO,)
16 S: Q.tr_xy(-5, 0); line from Q.tr_xy(-2, 0) to S
17 D: Q.tr_xy( 5, 0); line from Q.tr_xy(2, 0) to D
18 G: Q.G
19 C: circle rad 5*dimen_/10 at Q.tr_xy(0,1) ]')
20
21 del = dimen_/4
22 down_
23 Q7: MTP8P10(R); "Q7" at Q7.C.sw below rjust
24 Q8: MTP8P10(R) with .w at Q7.e+(del,0); "Q8" at Q8.C.sw below rjust
25 foreach_(`XX',`patsubst(XX,`\.'): dot(at XX)',Q8.D,Q8.S,Q7.D,Q7.S)
26 Q9: MTP8P10(R) with .w at Q8.e+(del,0); "Q9" at Q9.C.sw below rjust
27 line from Q9.D to Q7.D; line from Q8.G to (Q8.G.x,Q8.S.y-del); Q8G: dot
28 line from Q9.G to (Q9.G,Q8G) then to (Q7.G,Q8G) then to Q7.G; dot
29 line from Q7.S up_ del*0
30 {`"3 X MTP8P10"' at Q8D.s below}
31 Rail1: dot
32 reversed(`diode',up_ 2*del); reversed(`diode',up_ 2*del from Here+(0,-del))
33 {"D3" at last [].se ljust "D4" ljust}
34 P45: dot
35 dot(at P45-(dimen_*2.2,0)); line to (Here,Rail1)
36 R10: resistor(down_ to (Here,Q7.G)); rlabel(,"R10" rjust "100"); dot
37 { line to Q7.G }
38 R11: resistor(down_ R10.len); rlabel(,"R11" rjust "330")
39 Q5: bi_tr(up_ dimen_*0.6,,,E) with .C at R11.end
40 rlabel(,"Q5" ljust "D40D7")
41 R12: resistor(down_ R11.len from Q5.E); llabel(,"R12" ljust "10"); dot
42 R13: resistor(down_ R11.len); llabel(,"R13" ljust "10")
43 Q6: bi_tr(down_ dimen_*0.6,R,P,E) with .E at R13.end
44 llabel(,"Q6" ljust "D41D7")
45 line left_ 2*del from Q5.B
46 Q3: bi_tr(up_ dimen_*0.6,,,E) with .C at Here
47 "Q3" ljust at Q3.nw+(-del,del*1.2) "D40D7" ljust
48 Q4: bi_tr(up_ dimen_*0.6+2*del,,,E) with .E at (Q3.E,Q6.B)
49 "Q4" ljust at Q4.A1.ne+(0,del*3/4) "D40D7" ljust
50 Q4C: dot(at (0.5 between Q3.E and (Q4.C-(0,del))))
51 line from Q4.B left_ del/2; continue to (Here,Q4C) then to Q4C
52 line from Q4.C to Q3.E
53 dot(at Q4.E)
54 up_
55 Q10: MTM25N10 with .D at (Q7.D,Q6.C-(0,3/2*del))
56 { "Q10" at Q10.e above ljust `"MTM25N10"' ljust }
57 line from Q10.D to Q7.D
58 line from Q6.C down_ del
59 Gnd: Here
60 { line right_ dimen_ from R12.end then down_ (R12.end.y-Gnd.y); dot }
61 R14: resistor(from Gnd down_ to (Gnd,Q10.G)); rlabel(,"R14" rjust "330"); dot
62 line to Q10.G
63 line down_ 3*del from Q10.S
64 Rail2: dot
65 diode(down_ 2*del); diode(down_ 2*del from Here+(0,del))
66 {"D5" at 2nd last [].se ljust "D6" ljust}
67 PM45: dot
68 R15: resistor(from R14.end to (R14,Rail2)); rlabel(,"R15" rjust "100")
69 line to (Here,PM45); dot
70 Q3B: dot(at Q3.B+(-3*del,0))
71 {line to (Here.x,Rail1.y-R10.len)
72 R7: resistor(up_ to (Here,Rail1)); llabel(,"R7"rjust "4.7`'svg_thinsp`'k"); dot }
73 line to (Here,Q3.E)
74 R8: potentiometer(down_ Q3.E.y-Q6.B.y,,,-3/2*del) with .Start at Here
75 llabel(,"R8" ljust "1`'svg_thinsp`'k")
76 dot(at R8.End+(0,del)); line to (R8.T1,Here) then to R8.T1
77 line from R8.End to (R8.End,Q4.E); dot; line to (Here.x,Rail2.y+R15.len)
78 R9: resistor(down_ to (Here,Rail2)); rlabel(,"R9" rjust "4.7`'svg_thinsp`'k"); dot
79 line from Q6.B to (R8.End.x-3*del,Q6.B.y) then up Q3.B.y-R12.len-Q6.B.y
80 C2: reversed(`capacitor',down_ to (Here,Q3.B),C); llabel(,"C2" ljust "0.1")
81 dot; dot(at (C2.x-2*del,Rail2.y))
82 R6: resistor(up_ R9.len); llabel(,"R6" rjust "2.2`'svg_thinsp`'k"); dot
83 D2: diode(up_ to (Here,Gnd),Z); llabel(,"D2" rjust "15`'svg_thinsp`'V"); dot
84 dot(at Here+(2*del,0))
85 C3: capacitor(down_ D2.len,C); llabel(,"C3" ljust "0.01"); line to D2.start
86 line from R6.top to D2.s-(3*del,0); down_
87 Q2: bi_tr(,,P,E) with .B at Here; "Q2" at Q2.w rjust
88 R4: resistor(down_ from Q2.C to (Q2.C,Rail2)); rlabel(,"R4" rjust "1`'svg_thinsp`'k")
89 {line right_ to Rail2}
90 U1: opamp(,,,,P) with .C at (Here,C2.top); "U1" at U1.C
91 "4" at (U1.V2,U1.S) ljust "MC1741SC" ljust
92 "7" at U1.V1 ljust; "6" at U1.E ljust above
93 line from U1.V2 to Q2.E
94 line from U1.In1 left_ del
95 IT: dot
96 R1: resistor(left_ R10.len)
97 { "R1" at last [].sw +(0,-del) ljust "10`'svg_thinsp`'k" ljust }
98 Input: dot(,,1); "INPUT" at (Input.w,2nd last [].n) above ljust
99 line from U1.In2 to (IT,U1.In2)
100 R2: resistor(down_ to (Here,Gnd)); rlabel(,"R2" rjust "10`'svg_thinsp`'k"); dot
101 dot(at (Input,Gnd),,1); line to (Q9.e,Here) chop dotrad_ chop 0; dot(,,1)
102 { "GROUND" above rjust }
103 line from D2.top to (D2.x,U1.Out.y+del); dot
104 D1: diode(up_ D2.len-del/2,Z); llabel(,"D1" rjust "15`'svg_thinsp`'V"); dot
105 { line right_ 2*del
106 C1: capacitor(down_ D1.len,C); llabel(,"C1" ljust "0.01")
107 line to D1.s }
108 line from U1.Out to Q3.B
109 line from U1.V1 up_ to (U1.V1.x,D1.top.y-(Q2.E.y-Q2.B.y))
110 Q1: bi_tr(,R,,E) with .E at Here; "Q1" at Q1.w rjust
111 line from Q1.B to D1.top
112 line to (Here,R7.bot)
113 R5: resistor(up_ to (Here,Rail1)); llabel(,"R5" rjust "2.2`'svg_thinsp`'k"); dot
114 line from Q1.C to (Q1.C,R5.start)
115 R3: resistor(up_ to (Here,Rail1)); llabel(,"R3" rjust "1`'svg_thinsp`'k")
116 line to Q9.S
117 line from (Input,PM45) to (Q9.e,PM45); "-45`'svg_thinsp`'V" above rjust
118 line from (Input,P45) to (Q9.e,P45); "+45`'svg_thinsp`'V" above rjust
119 dot(at (Q8.D,R12.bot)); {RL: resistor(to (Here,Gnd)); rlabel(,"R LOAD"); dot}
120 dot(at (Q7.D,Here)); {line to (Q9.e,Here); dot(,,1) }
121 R16: resistor(left_ Q7.D.x-Q7.G.x+del);
122 {"R16" at last [].s+(0,-del) "100`'svg_thinsp`'k"}
123 { dot(at R16.end+(0,2*del)); C4: capacitor(to (R16.start,Here))
124 { "C4" "3.3`'svg_thinsp`'pF" at last [].n+(0,del)}; dot }
125 line to (Here,Rail1+(0,del)) then to (IT,Rail1+(0,del)) then to IT
126
127 command "</g>"
128 .PE