Version 4 SHEET 1 2868 916 WIRE 2128 -496 2048 -496 WIRE 2160 -496 2128 -496 WIRE 2048 -480 2048 -496 WIRE 2048 -384 2048 -400 WIRE 2128 -336 2128 -496 WIRE 784 -256 544 -256 WIRE 832 -256 784 -256 WIRE 912 -256 832 -256 WIRE 1072 -256 992 -256 WIRE 1120 -256 1072 -256 WIRE 1216 -256 1120 -256 WIRE 1392 -256 1296 -256 WIRE 1456 -256 1392 -256 WIRE 1568 -256 1456 -256 WIRE 1712 -256 1648 -256 WIRE 1792 -256 1712 -256 WIRE 1968 -256 1872 -256 WIRE 2016 -256 1968 -256 WIRE 2272 -256 2128 -256 WIRE 2128 -240 2128 -256 WIRE 1968 -208 1968 -256 WIRE 832 -192 832 -256 WIRE 1392 -192 1392 -256 WIRE 1856 -192 1856 -208 WIRE 1888 -192 1856 -192 WIRE 1808 -176 1808 -208 WIRE 2128 -144 2128 -160 WIRE 544 -128 544 -256 WIRE 1968 -96 1968 -144 WIRE 1392 -64 1392 -128 WIRE 832 -48 832 -112 WIRE 912 -48 832 -48 WIRE 1072 -48 1072 -256 WIRE 1072 -48 992 -48 WIRE 832 16 832 -48 WIRE 1328 64 1152 64 WIRE 1440 64 1328 64 WIRE 1536 64 1440 64 WIRE 1776 64 1744 64 WIRE 1536 80 1536 64 WIRE 1744 80 1744 64 WIRE 1152 96 1152 64 WIRE 1328 96 1328 64 WIRE 544 160 544 -48 WIRE 832 160 832 96 WIRE 832 160 544 160 WIRE 1536 176 1536 160 WIRE 1744 176 1744 160 WIRE 832 192 832 160 WIRE 1152 240 1152 176 WIRE 1328 240 1328 176 WIRE 1152 272 1152 240 WIRE 1328 272 1328 240 WIRE 1152 352 1152 336 WIRE 1328 352 1328 336 WIRE 1152 400 1152 352 WIRE 1328 400 1328 352 WIRE 1328 512 1328 480 WIRE 1392 512 1328 512 WIRE 1680 512 1392 512 WIRE 1680 528 1680 512 WIRE 1152 544 1152 480 WIRE 1392 544 1152 544 WIRE 1536 544 1392 544 WIRE 1536 560 1536 544 WIRE 1680 624 1680 608 WIRE 1536 656 1536 640 FLAG 1392 -64 0 FLAG 832 192 0 FLAG 784 -256 vin FLAG 1120 -256 v1 FLAG 2016 -256 vsh FLAG 2128 -144 0 FLAG 2272 -256 adc_word FLAG 2048 -384 0 FLAG 2160 -496 vrefin FLAG 1968 -96 0 FLAG 1456 -256 vadc FLAG 1536 176 0 FLAG 1440 64 vcc FLAG 1152 240 vled1 FLAG 1152 352 vd1 FLAG 1536 656 0 FLAG 1392 544 D12 FLAG 1712 -256 vmux FLAG 1808 -176 0 FLAG 1888 -192 v_sh FLAG 1744 176 0 FLAG 1776 64 v_sh FLAG 1680 624 0 FLAG 1392 512 D13 FLAG 1328 240 vled2 FLAG 1328 352 vd2 SYMBOL res 1312 -272 R90 WINDOW 0 -9 56 VBottom 2 WINDOW 3 64 57 VBottom 2 SYMATTR InstName RP1 SYMATTR Value 200k SYMBOL cap 1376 -192 R0 WINDOW 0 -54 17 Left 2 WINDOW 3 -87 48 Left 2 SYMATTR InstName CP1 SYMATTR Value 0.15µF SYMBOL res 816 -208 R0 WINDOW 0 -39 42 Left 2 WINDOW 3 -65 71 Left 2 SYMATTR InstName R1 SYMATTR Value {R1} SYMBOL res 816 0 R0 WINDOW 0 -44 42 Left 2 WINDOW 3 -64 71 Left 2 SYMATTR InstName R2 SYMATTR Value {R2} SYMBOL voltage 544 -144 R0 WINDOW 0 41 29 Left 2 WINDOW 3 17 100 Left 2 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName VIN SYMATTR Value PWL(0us 0V 1us 1.5V) SYMBOL bv 2128 -256 R0 WINDOW 0 33 27 Left 2 WINDOW 3 -83 158 Left 2 SYMATTR InstName B_ADC SYMATTR Value V= int( v(vsh)/v(vrefin) * (2**N) ) SYMBOL voltage 2048 -496 M0 WINDOW 0 48 43 Left 2 WINDOW 3 46 72 Left 2 SYMATTR InstName VREF SYMATTR Value {Vref} SYMBOL cap 1952 -208 R0 WINDOW 0 42 19 Left 2 WINDOW 3 44 50 Left 2 SYMATTR InstName Csh SYMATTR Value 20pF SYMBOL csw 992 -256 M270 WINDOW 0 32 40 VTop 2 WINDOW 3 -61 42 VBottom 2 WINDOW 123 -61 41 VTop 2 SYMATTR InstName W_SW1 SYMATTR Value VLED1 SYMATTR Value2 MOS SYMBOL voltage 1536 64 R0 WINDOW 39 0 0 Left 2 WINDOW 0 -97 61 Left 2 WINDOW 3 -81 96 Left 2 SYMATTR InstName VCC SYMATTR Value 5V SYMATTR Value2 AC 0V SYMBOL res 1136 80 R0 WINDOW 0 47 44 Left 2 WINDOW 3 46 75 Left 2 SYMATTR InstName R3 SYMATTR Value 1k SYMBOL diode 1136 272 R0 WINDOW 0 28 2 Left 2 WINDOW 3 30 78 Left 2 SYMATTR InstName DLED1 SYMATTR Value DLED SYMBOL voltage 1152 384 R0 WINDOW 0 38 37 Left 2 WINDOW 3 43 65 Left 2 SYMATTR InstName VLED1 SYMATTR Value 0V SYMBOL voltage 1536 544 R0 WINDOW 0 -107 29 Left 2 WINDOW 3 -73 80 Left 2 SYMATTR InstName V_D12 SYMATTR Value 0V SYMBOL res 1664 -272 R90 WINDOW 0 -9 56 VBottom 2 WINDOW 3 64 57 VBottom 2 SYMATTR InstName Rmux SYMATTR Value 10k SYMBOL sw 1776 -256 R270 WINDOW 0 46 -8 VRight 2 WINDOW 3 43 77 VRight 2 SYMATTR InstName S_SH SYMATTR Value SH SYMBOL voltage 1744 64 R0 WINDOW 39 0 0 Left 2 WINDOW 0 58 67 Left 2 WINDOW 3 58 99 Left 2 SYMATTR InstName V_SH SYMATTR Value PULSE(0V 5V 300ms 10us 10us 1ms 400ms) SYMATTR Value2 AC 0V SYMBOL voltage 1680 512 R0 WINDOW 0 -113 29 Left 2 WINDOW 3 -70 86 Left 2 SYMATTR InstName V_D13 SYMATTR Value 5V SYMBOL res 1312 80 R0 WINDOW 0 50 41 Left 2 WINDOW 3 47 73 Left 2 SYMATTR InstName R4 SYMATTR Value 1k SYMBOL diode 1312 272 R0 WINDOW 0 36 4 Left 2 WINDOW 3 31 75 Left 2 SYMATTR InstName DLED2 SYMATTR Value DLED SYMBOL voltage 1328 384 R0 WINDOW 0 35 32 Left 2 WINDOW 3 40 64 Left 2 SYMATTR InstName VLED2 SYMATTR Value 0V SYMBOL csw 992 -48 M270 WINDOW 0 32 40 VTop 2 WINDOW 3 -61 42 VBottom 2 WINDOW 123 -61 41 VTop 2 SYMATTR InstName W_SW2 SYMATTR Value VLED2 SYMATTR Value2 MOS TEXT 1000 -856 Left 2 ;DVM1 Level 2 TEXT 560 -272 Left 2 ;V+ TEXT 568 144 Left 2 ;V- TEXT 1024 -824 Left 2 !.tran 0.4s TEXT 1424 -760 Left 2 !.param N=10 Vref=5.0V TEXT 840 -448 Left 2 ;Vrange D12 D13\n----------------------------\nLow 0V 5V\nHigh 5V 0V TEXT 2184 -360 Left 2 ;ADC TEXT 1424 -600 Left 2 !.model SH VSWITCH(Ron=10k Roff=1e16 von=4V voff=1V) TEXT 1424 -664 Left 2 !.model DLED D( IS={Is} ) TEXT 1424 -560 Left 2 !.model MOS ISWITCH(Ron=2 Roff=1e16 ion=3mA ioff=1mA) TEXT 1520 -272 Left 2 ;A0 TEXT 1424 -704 Left 2 !.param Vd = 1.1V Id=0.003 Is=Id/2.718**(Vd/0.0259) TEXT 1344 -760 Left 2 ;ADC TEXT 1344 -704 Left 2 ;LED TEXT 1296 -600 Left 2 ;SWITCH TEXT 1424 -800 Left 2 !.param R1=800k R2=200k TEXT 1296 -800 Left 2 ;DIVIDER LINE Normal 1520 -336 1472 -192 1 LINE Normal 2256 -336 1520 -336 1 LINE Normal 2256 -48 2256 -336 1 LINE Normal 1520 -48 2256 -48 1 LINE Normal 1472 -192 1520 -48 1 LINE Normal 1200 304 1168 304 LINE Normal 1184 320 1200 304 LINE Normal 1232 320 1184 320 LINE Normal 1216 304 1232 320 LINE Normal 1216 336 1216 304 LINE Normal 1232 320 1216 336 LINE Normal 1376 304 1344 304 LINE Normal 1360 320 1376 304 LINE Normal 1408 320 1360 320 LINE Normal 1392 304 1408 320 LINE Normal 1392 336 1392 304 LINE Normal 1408 320 1392 336