| 1 |
.PS |
| 2 |
# ClassDAmp.m4 |
| 3 |
# Adapted and redrawn from Maxim Engineering Journal Vol. Fifty-Nine: |
| 4 |
# https://pdfserv.maximintegrated.com/en/ej/EJ59.pdf |
| 5 |
log_init |
| 6 |
|
| 7 |
define(`String',`[ |
| 8 |
Q1: mosfet(down_ dimen_*5/4,R,TFSDdPyQdB) |
| 9 |
dot(at Q1.S) |
| 10 |
{ line up_ dimen_/4 |
| 11 |
dot(,,1); "ifsvg(`svg_it(V)svg_sub(DD)',`$V_{\hbox{\scriptsize DD}}$')" \ |
| 12 |
at last [].e ljust } |
| 13 |
line left_ dimen_*2/3 |
| 14 |
SW: switch(left_ dimen_,`$1',D); ifelse(`$1',,`rlabel(,SW1)',`llabel(,SW2)') |
| 15 |
Q2: mosfet(up_ dimen_*5/4,,TFSDPyQuB) with .D at Q1.D |
| 16 |
ground(at Q2.S,T,S) |
| 17 |
Out: dot(at Q1.D) |
| 18 |
line from Q1.G to Q2.G chop -lthick/2 |
| 19 |
G: dot(at last line.c) |
| 20 |
dot(at (SW.end,Here)); { line to SW.end } |
| 21 |
line from G left_ dimen_*2.5 |
| 22 |
Rc: resistor(left_ dimen_) |
| 23 |
T: dot; right_ |
| 24 |
Comp: opamp(,,,,ifelse(`$1',R,,R)) with .Out at Here |
| 25 |
[line left_ dimen_/12 then down_ dimen_/4 then left_ dimen_/12] \ |
| 26 |
with .e at Comp.C |
| 27 |
]') |
| 28 |
|
| 29 |
S1: String |
| 30 |
S2: String(R) with .Q1.S at S1.Q2.D+(0,-3/2*elen_) |
| 31 |
I1: line left_ dimen_/2 from S1.Comp.In1 |
| 32 |
sinusoid(dimen_/4,twopi_/(dimen_/2),-pi_/2,0,dimen_/2) \ |
| 33 |
with .Start at I1.end-(textoffset,0) |
| 34 |
I2: line left_ dimen_/2 from S2.Comp.In2 |
| 35 |
sinusoid(dimen_/4,twopi_/(dimen_/2),pi_/2,0,dimen_/2) \ |
| 36 |
with .Start at I2.end-(textoffset,0) |
| 37 |
line from S1.Comp.In2 left I1.len |
| 38 |
continue to (Here,S2.Comp.In1) then to S2.Comp.In1 |
| 39 |
dot(at 1/2 between I1.end and I2.end) |
| 40 |
line left_ dimen_/2; move left_ textoffset then down_ dimen_/4 |
| 41 |
line up dimen_/2 then down dimen_/2 left_ dimen_/4 \ |
| 42 |
for_(1,3,1,`then up dimen_/2 then down dimen_/2 left_ dimen_/4 \') |
| 43 |
|
| 44 |
right_ |
| 45 |
N: NOR_gate with .Out at (1/2 between S1.Rc.start and S2.Rc.start) |
| 46 |
line from S1.T to (S1.T,N.In1) then to N.In1 |
| 47 |
line from S2.T to (S2.T,N.In2) then to N.In2 |
| 48 |
NO: dot(at N.Out+(dimen_/12,0)) |
| 49 |
resistor(right_ dimen_ from N.Out) |
| 50 |
rlabel(,iflatex(R_{\hbox{\scriptsize On}},ifsvg(svg_it(R)`'svg_sub(On)))) |
| 51 |
dot |
| 52 |
{ line up_ dimen_/2; diode(to (NO,Here),Z); line to NO } |
| 53 |
{ capacitor(down_ dimen_); ground(,T,S) |
| 54 |
llabel(iflatex(C_{\hbox{\scriptsize On}},ifsvg(svg_it(R)`'svg_sub(On)))) } |
| 55 |
line dashed to (S1.SW,Here) |
| 56 |
arrow <-> dashed from S1.SW to S2.SW chop dimen_/4 |
| 57 |
|
| 58 |
line right_ dimen_ from S1.Out "Out-" above |
| 59 |
line down_ (Here.y-S2.Out.y)/2-dimen_; ifsvg({move right_ 3*textht}) |
| 60 |
inductor(down_ dimen_) |
| 61 |
llabel(,iflatex(L_{\hbox{\scriptsize E}},ifsvg(L`'svg_sub(E)))) |
| 62 |
resistor(down_ dimen_) |
| 63 |
llabel(,iflatex(R_{\hbox{\scriptsize E}},ifsvg(R`'svg_sub(E)))) |
| 64 |
line to (Here,S2.Out) then to S2.Out "Out+" above |
| 65 |
|
| 66 |
.PE |