Version 4.1 SHEET 1 3264 1396 WIRE -368 -176 -768 -176 WIRE -272 -176 -368 -176 WIRE -128 -176 -176 -176 WIRE -80 -176 -128 -176 WIRE 112 -176 112 -224 WIRE 112 -176 0 -176 WIRE 128 -176 112 -176 WIRE 368 -176 128 -176 WIRE 512 -176 448 -176 WIRE 624 -176 512 -176 WIRE 784 -176 624 -176 WIRE 896 -176 864 -176 WIRE 1040 -176 896 -176 WIRE 1072 -176 1040 -176 WIRE 1264 -176 1072 -176 WIRE -368 -112 -368 -176 WIRE -256 -80 -256 -128 WIRE -768 -16 -768 -176 WIRE -368 -16 -368 -32 WIRE -256 -16 -256 -80 WIRE -256 -16 -368 -16 WIRE 624 -16 624 -176 WIRE -368 0 -368 -16 WIRE 128 32 128 -176 WIRE 208 32 128 32 WIRE 208 64 208 32 WIRE -768 80 -768 64 WIRE -768 80 -800 80 WIRE -368 96 -368 80 WIRE -336 96 -368 96 WIRE -368 112 -368 96 WIRE -768 128 -768 80 WIRE 512 128 512 -176 WIRE 896 128 896 -176 WIRE 1040 144 1040 -176 WIRE -544 160 -592 160 WIRE -432 160 -464 160 WIRE 208 192 208 144 WIRE 624 192 624 64 WIRE 128 208 128 32 WIRE 208 240 208 192 WIRE -768 336 -768 208 WIRE -368 336 -368 208 WIRE -368 336 -768 336 WIRE 128 336 128 272 WIRE 128 336 -368 336 WIRE 160 336 128 336 WIRE 208 336 208 304 WIRE 208 336 160 336 WIRE 512 336 512 192 WIRE 512 336 208 336 WIRE 624 336 624 256 WIRE 624 336 512 336 WIRE 896 336 896 208 WIRE 896 336 624 336 WIRE 1040 336 1040 224 WIRE 1040 336 896 336 WIRE 160 368 160 336 WIRE 608 640 528 640 WIRE 736 640 672 640 WIRE 1024 640 816 640 WIRE -176 704 -256 704 WIRE 1264 704 1264 -176 WIRE -256 720 -256 704 WIRE 768 720 672 720 WIRE 672 736 672 720 WIRE -256 816 -256 800 WIRE 432 816 16 816 WIRE 528 816 528 640 WIRE 528 816 432 816 WIRE 1024 816 1024 640 WIRE 1072 816 1024 816 WIRE 1264 816 1264 784 WIRE 1264 816 1152 816 WIRE -176 832 -176 704 WIRE -176 832 -192 832 WIRE 672 832 672 816 WIRE 768 832 768 720 WIRE 1024 848 1024 816 WIRE 1024 848 800 848 WIRE 528 864 528 816 WIRE 736 864 528 864 WIRE 1264 864 1264 816 WIRE -192 880 -192 832 WIRE -176 880 -176 832 WIRE 1120 880 800 880 WIRE 80 896 -144 896 WIRE 112 896 80 896 WIRE -592 912 -592 160 WIRE -592 912 -704 912 WIRE -208 912 -592 912 WIRE 16 928 16 816 WIRE 16 928 -144 928 WIRE 112 944 112 896 WIRE 1120 944 1120 880 WIRE -192 976 -192 944 WIRE -176 976 -176 944 WIRE -176 976 -192 976 WIRE -160 976 -160 944 WIRE -160 976 -176 976 WIRE -128 976 -160 976 WIRE -128 1056 -128 976 WIRE 112 1056 112 1024 WIRE 112 1056 -128 1056 WIRE 768 1056 768 896 WIRE 1120 1056 1120 1024 WIRE 1120 1056 768 1056 WIRE 1264 1056 1264 944 WIRE 1264 1056 1120 1056 WIRE 1120 1072 1120 1056 WIRE 112 1088 112 1056 FLAG 1072 -176 output FLAG 1120 1072 0 FLAG 112 1088 0 FLAG -704 912 PWM FLAG 160 368 0 FLAG 432 816 Verror FLAG -800 80 Vin FLAG -256 -80 gate_drive FLAG -128 -176 drain FLAG -336 96 collector FLAG 112 -224 diode FLAG 208 192 snub FLAG -256 816 0 FLAG 672 832 0 FLAG 80 896 sawtooth SYMBOL voltage -768 112 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 WINDOW 3 -307 117 Left 2 SYMATTR Value PULSE(10 11 5m 10u 10u 100m 1) SYMATTR InstName V1 SYMBOL ind 352 -192 M90 WINDOW 0 5 56 VBottom 2 WINDOW 3 36 42 VTop 2 WINDOW 39 60 56 VTop 2 SYMATTR InstName L1 SYMATTR Value 47µ SYMATTR SpiceLine Rser=1m SYMBOL cap 496 128 R0 SYMATTR InstName C1 SYMATTR Value 1m SYMBOL res 880 112 R0 SYMATTR InstName R_Load SYMATTR Value 5R SYMBOL diode 144 272 R180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D1 SYMATTR Value MBRB2545CT SYMBOL current 1040 144 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 WINDOW 3 -143 105 Left 2 SYMATTR Value PULSE(0 1 10m 0.1m 0.1m 100m 1) SYMATTR InstName I1 SYMBOL voltage 1120 928 R0 SYMATTR InstName V3 SYMATTR Value 2.5V SYMBOL res 1248 688 R0 SYMATTR InstName R3 SYMATTR Value 10k SYMBOL res 1248 848 R0 SYMATTR InstName R4 SYMATTR Value 10k SYMBOL res 1168 800 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R5 SYMATTR Value 10k SYMBOL cap 672 624 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C3 SYMATTR Value 4.7n SYMBOL res 832 624 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R6 SYMATTR Value 100k SYMBOL voltage 112 928 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 WINDOW 3 -159 106 Left 2 SYMATTR Value PULSE(1 3 0 9.8u 100n 10n 10u) SYMATTR InstName V4 SYMBOL res -784 -32 R0 SYMATTR InstName R8 SYMATTR Value 0.005R SYMBOL npn -432 112 R0 SYMATTR InstName Q1 SYMATTR Value 2N2222 SYMBOL res -384 -16 R0 SYMATTR InstName R9 SYMATTR Value 1k SYMBOL res -384 -128 R0 SYMATTR InstName R10 SYMATTR Value 1k SYMBOL res -448 144 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R11 SYMATTR Value 10k SYMBOL res -96 -192 M90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R12 SYMATTR Value 1m SYMBOL res 192 48 R0 SYMATTR InstName R13 SYMATTR Value 200R SYMBOL cap 192 240 R0 SYMATTR InstName C5 SYMATTR Value 1n SYMBOL Comparators\\LT1719 -176 848 M0 SYMATTR InstName U1 SYMBOL OpAmps\\UniversalOpAmp2 768 864 M0 WINDOW 123 -137 50 Left 2 SYMATTR InstName U2 SYMBOL voltage -256 704 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V2 SYMATTR Value 5 SYMBOL voltage 672 720 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V5 SYMATTR Value 5 SYMBOL nmos -176 -128 M270 SYMATTR InstName X1 SYMATTR Value RD3L01BAT SYMATTR Prefix X SYMBOL res 768 -192 M90 WINDOW 0 0 56 VBottom 2 WINDOW 3 38 62 VTop 2 SYMATTR InstName R_load_sense SYMATTR Value 1m SYMBOL cap 608 192 R0 SYMATTR InstName C_damp SYMATTR Value 3m SYMBOL res 608 -32 R0 SYMATTR InstName R_damp SYMATTR Value 0.2R TEXT 832 -520 Left 2 !.model IdealDiode D(Ron=1m Roff=1Meg Vfwd=.4) TEXT 840 -544 Left 2 !.tran 20m TEXT 456 -1032 Left 2 ;this circuit has a control loop inserted, so its output voltage returns to its set value after load steps \nor supply voltage steps, the simulation has inserted a step in the input voltage, and a load step.\nthe FET has been changed from N channel to p channel, this avoids the need to drive the FET gate above the supply rail to turn it on,\nhowever P channel FETs have higher on resistance than N channel FETs, so we have to use a bigger FET with bigger gate charge.\nthere is an RC "snubber" in parallel with the power diode, this is often neccessary in a real circuit, \nin this circuit it helps the simulation to run... probably by slowing the speed of switching edges.\nthere is an RC damper in parallel with the output filter capacitor, an LC filter can ring at its natural frequency of \nf= 1 / (2pie x root(LC)), the RC damper stops or damps this ringing. TEXT -336 -1312 Left 5 ;Simple buck circuit, closed loop. TEXT 1448 -440 Left 2 !* RD3L01BAT PMOSFET model\n* Model Generated by ROHM\n* All Rights Reserved\n* Commercial Use or\n* Resale Restricted\n* Date: 2021/06/02\n******************D G S\n.SUBCKT RD3L01BAT 1 2 3\nM1 11 22 3 3 MOS_P\nD1 1 3 DDS1\nR1 1 11 RTH 61.536E-3\nRG 2 22 39.82\nD14 11 22 DGD1\n.MODEL MOS_P PMOS TNOM = 25\n+ LEVEL = 3\n+ L = 2.0000E-6\n+ W = 1\n+ KP = 73.699E-6\n+ RS = 0\n+ RD = 0\n+ VTO = -2.078\n+ TOX = 2.0000E-6\n+ CGSO = 1000.0E-12\n+ CGDO = 0\n+ CBD = 1.0000E-15\n+ N = 2\n+ GAMMA = 0.8\n+ ETA = 0\n+ KAPPA = 1\n+ NFS = 14.000E+9\n+ XJ = 1.0000E-6\n+ UO = 247.91\n+ VMAX = 50.000E+3\n.MODEL DDS1 D TNOM = 25\n+ IS = 6.7392E-12\n+ N = 1.0781\n+ RS = 14.833E-3\n+ IKF = 0.9031\n+ CJO = 486.00E-12\n+ M = 0.6865\n+ VJ = 0.8694\n+ XTI = 5.9994\n+ BV = 60\n+ TT = 21.000E-9\n.MODEL RTH RES TNOM = 25\n+ TC1 = 3.8327E-3\n+ TC2 = 6.3382E-6\n.MODEL DGD1 D TNOM = 25\n+ N = 10.000E+3\n+ CJO = 140.00E-12\n+ M = 0.2625\n+ VJ = 10.955\n+ FC = 0.05\n+ T_ABS = 25\n.ENDS TEXT -800 -1008 Left 2 ;click on simmulate/settings,\nthen in the window that opens set Gmin=1E-9, and Abstol=1E-9\nclick on run\nthen click on the "Vin" net to plot it\nthen click on the "R_load_sense" resistor to plot the load current\nclick on the plot window, then on plot settings/add plot pane.\nthen click on the "Vout" net to plot it.\nclick on the plot window, then on plot settings/add plot pane.\nthen click on the "pwm_duty" net to plot it.\nclick on the plot window, then on plot settings/add plot pane.\nthen click on "Vsource" to plot it.\nyou will have to zoom the time axis to see the waveforms.\nnote that that this node goes to Vin when the switch is on, and to 0V-diode drop when its off.\nclick on the plot window, then on plot settings/add plot pane.\nthen click on "L1" to plot its current.\nclick on the plot window, then on plot settings/add plot pane.\nthen click on "D1" and "R12" to show how the inductor current switches between the diode and the FET. TEXT -808 -1064 Left 4 ;Instructions TEXT 1008 984 Left 3 ;Vref TEXT 576 560 Left 4 ;Error amp and Vref TEXT 1424 -552 Left 4 ;Spice model \nfor power FET (X1). TEXT -256 600 Left 4 ;PWM generation TEXT -272 648 Left 3 ;Consists of comparator\nand sawtooth waveform, TEXT -464 -336 Left 4 ;powerFET and \ngate drive cct. TEXT -56 -344 Left 4 ;power diode \nand RC snubber TEXT 336 -336 Left 4 ;LC filter TEXT 568 -352 Left 4 ;Damper for\nLC filter\n(stops it\nringing) TEXT 456 -1096 Left 4 ;Circuit description TEXT 1224 584 Left 4 ;Vout\npotential\ndivider TEXT -464 -1224 Left 4 ;Start off with the "instructions", to plot some waveforms.\nthen the circuit description will make more sense. TEXT 120 448 Left 5 ;Control Circuits TEXT 80 -448 Left 5 ;Power circuits TEXT 448 -744 Left 2 ;You may republish this circuit and text providing this line and the following lines are included.\nCircuit design by Keith Wallbanks.,\nOriginally released on analogsimulation.co.uk\nThis circuit is provided as is without warranty of any kind.\nThe intention of this text is to implement the MIT licence. TEXT 192 1176 Left 1 ;You may republish or reuse this circuit implementation and text providing this line and the following lines are included.\nThis circuit implementation designed by Keith Wallbanks. Originally released on analogsimulation.co.uk\nThis circuit is provided as is without warranty of any kind. This text is intended to implement the MIT licence. LINE Normal 944 672 944 672 2 LINE Normal -32 816 -32 816 2 RECTANGLE Normal -112 368 -560 -384 2 RECTANGLE Normal 256 368 -64 -384 2 RECTANGLE Normal 528 368 304 -384 2 RECTANGLE Normal 768 368 560 -384 2 RECTANGLE Normal 176 1120 -320 560 2 RECTANGLE Normal 1184 1104 432 528 2 RECTANGLE Normal 1408 1040 1200 528 2 RECTANGLE Normal 1424 1136 -384 496 1 RECTANGLE Normal 1120 400 -608 -400 1