* Z:\home\khalils\Downloads\files\data\raw_asc\4ab38cb67678_Voltmeter_with_range_select_simplified.asc
* Generated by LTspice 26.0.1 for Windows.
* Vin to microcontroller pin to select v range
* To ADC channel
* Library below included based on ModelFile attribute of instance XU1 (C:\users\khalils\AppData\Local\LTspice\lib\sym\Comparators\LT1716.asy)
;tran 0 5 0 1
R3 N004 N007 2Meg
Rmicroin1 N002 0 100Meg
XU1 N012 N010 N005 0 N002 LT1716 ;pnba In+)In-)V+)V-)OUT
M2 N007 N011 N013 N013 2N7002
R7 N007 0 287k
R10 N004 N008 100k
M1 N003 N009 N004 N004 Si7489DP
R17 N010 0 100k
R4 N009 0 100k
D2 0 N011 BZX84B10VLY
Vmicro N005 0 5V
R5 N013 0 100Meg
R9 N004 N011 1Meg
R8 N002 N001 100k
R2 N006 0 25k
D3 N009 N004 BZX84B10VLY
R15 N012 0 200k
V1 N003 0 400
R6 N008 N012 1.4Meg
R1 N004 N006 2Meg
R18 N005 N010 6.2k
D1 0 N008 KDZV36B
Q1 N011 N001 0 0 NPN
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.dc V1 0 400 1
.lib LT1716.sub
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 2632 1252
WIRE 1136 -176 640 -176
WIRE 1760 -176 1216 -176
WIRE -288 -48 -480 -48
WIRE -64 -48 -192 -48
WIRE 288 -48 -64 -48
WIRE 528 -48 288 -48
WIRE 736 -48 528 -48
WIRE 992 -48 736 -48
WIRE 288 -16 288 -48
WIRE 528 -16 528 -48
WIRE 736 0 736 -48
WIRE -64 32 -64 -48
WIRE 992 48 992 -48
WIRE 2064 112 1616 112
WIRE 2288 112 2064 112
WIRE -480 128 -480 -48
WIRE 288 128 288 64
WIRE 528 128 528 64
WIRE 864 128 528 128
WIRE 2064 144 2064 112
WIRE 992 160 992 128
WIRE 1440 160 992 160
WIRE -208 176 -208 0
WIRE -64 176 -64 96
WIRE -64 176 -208 176
WIRE 864 176 864 128
WIRE 1856 176 1536 176
WIRE 1616 224 1616 112
WIRE 2288 224 2288 112
WIRE 992 240 992 160
WIRE 1536 240 1536 176
WIRE 1584 240 1536 240
WIRE -64 256 -64 176
WIRE 736 256 736 80
WIRE 800 256 736 256
WIRE 816 256 800 256
WIRE 1760 256 1760 -176
WIRE 1760 256 1648 256
WIRE 1856 256 1856 176
WIRE 2064 256 2064 224
WIRE 2064 256 1856 256
WIRE 528 272 528 128
WIRE 1440 272 1440 240
WIRE 1584 272 1440 272
WIRE 1440 304 1440 272
WIRE 1760 304 1760 256
WIRE 2064 304 2064 256
WIRE 736 320 736 256
WIRE 800 336 800 256
WIRE 864 352 864 272
WIRE 640 368 640 -176
WIRE 672 368 640 368
WIRE -480 432 -480 208
WIRE -64 432 -64 336
WIRE -64 432 -480 432
WIRE 288 432 288 208
WIRE 288 432 -64 432
WIRE 528 432 528 352
WIRE 528 432 288 432
WIRE 736 432 736 416
WIRE 736 432 528 432
WIRE 800 432 800 400
WIRE 800 432 736 432
WIRE 864 432 800 432
WIRE 992 432 992 304
WIRE 992 432 864 432
WIRE 1440 432 1440 384
WIRE 1616 432 1616 288
WIRE 1616 432 1440 432
WIRE 1760 432 1760 384
WIRE 1760 432 1616 432
WIRE 1936 432 1760 432
WIRE 2064 432 2064 384
WIRE 2064 432 1936 432
WIRE 2288 432 2288 304
WIRE 2288 432 2064 432
WIRE 288 448 288 432
LINE Normal 688 96 144 96 2
SYMBOL Comparators\\LT1716 1616 256 R0
SYMATTR InstName U1
SYMBOL res 512 256 R0
SYMATTR InstName R7
SYMATTR Value 287k
SYMBOL res 272 -32 R0
SYMATTR InstName R1
SYMATTR Value 2Meg
SYMBOL res -80 240 R0
SYMATTR InstName R4
SYMATTR Value 100k
SYMBOL res 512 -32 R0
SYMATTR InstName R3
SYMATTR Value 2Meg
SYMBOL zener 816 400 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMATTR Value BZX84B10VLY
SYMBOL voltage -480 112 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 400
SYMBOL res 2048 288 R0
SYMATTR InstName R17
SYMATTR Value 100k
SYMBOL res 976 32 R0
SYMATTR InstName R10
SYMATTR Value 100k
SYMBOL res 1424 144 R0
SYMATTR InstName R6
SYMATTR Value 1.4Meg
SYMBOL npn 672 320 R0
SYMATTR InstName Q1
SYMBOL voltage 2288 208 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Vmicro
SYMATTR Value 5V
SYMBOL zener -48 96 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D3
SYMATTR Value BZX84B10VLY
SYMBOL res 2048 128 R0
SYMATTR InstName R18
SYMATTR Value 6.2k
SYMBOL res 1744 288 R0
SYMATTR InstName Rmicroin1
SYMATTR Value 100Meg
SYMBOL pmos -288 0 R270
SYMATTR InstName M1
SYMATTR Value Si7489DP
SYMBOL res 848 336 R0
SYMATTR InstName R5
SYMATTR Value 100Meg
SYMBOL res 1232 -192 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R8
SYMATTR Value 100k
SYMBOL res 272 112 R0
SYMATTR InstName R2
SYMATTR Value 25k
SYMBOL res 720 -16 R0
SYMATTR InstName R9
SYMATTR Value 1Meg
SYMBOL res 1424 288 R0
SYMATTR InstName R15
SYMATTR Value 200k
SYMBOL zener 1008 304 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D1
SYMATTR Value KDZV36B
SYMBOL nmos 816 176 R0
SYMATTR InstName M2
SYMATTR Value 2N7002
FLAG 288 448 0
FLAG 1936 432 0
TEXT -32 472 Left 2 !;tran 0 5 0 1
TEXT 1080 128 Left 2 ;Vin to microcontroller pin to select v range
TEXT 328 104 Left 2 ;To ADC channel
TEXT -704 168 Left 2 !.dc V1 0 400 1