* SPICE netlist
V2 VCC 0 12
Q3 VCC N019 Vref 0 2N3904
R6 Vref 0 10k
C3 N019 0 100n
R7 N019 0 10k
R8 VCC N019 3k9
D1 Vd N001 LXHL-BW02 N=10
Q1 N001 N007 N013 0 2N5550
R1 N013 0 10k
R2 N007 0 100k
V1 Vd 0 80
D2 O3 N007 1N4148
V3 src_clk 0 PULSE(0 12 0 1n 1n 10m 20m)
R3 N021 N020 10k
R4 0 N021 10k
Q2 CLK N021 0 0 2N3904
R5 CLK T1 {Rrst}
C1 S2 T1 1n
D3 T1 S1 1N4148
Q4 N027 N022 S1 0 2N3906
Q5 N022 N027 O1 0 2N3904
R9 O1 0 {Rbot}
R10 N027 O1 {Rb}
R11 Vref N022 {Rvref}
R12 CLK T2 {Rrst}
C2 S3 T2 {Cn}
D4 T2 S2 1N4148
Q6 N028 N023 S2 0 2N3906
Q7 N023 N028 O2 0 2N3904
R13 O2 0 {Rbot}
R14 N028 O2 {Rb}
R15 Vref N023 {Rvref}
R16 CLK T3 {Rrst}
C4 S4 T3 {Cn}
D5 T3 S3 1N4148
Q8 N029 N024 S3 0 2N3906
Q9 N024 N029 O3 0 2N3904
R17 O3 0 {Rbot}
R18 N029 O3 {Rb}
R19 Vref N024 {Rvref}
R20 VCC CLK 2k2
R21 VCC N019 {LDR}
R23 CLK T4 {Rrst}
C5 S5 T4 {Cn}
D7 T4 S4 1N4148
Q10 N030 N025 S4 0 2N3906
Q11 N025 N030 O4 0 2N3904
R24 O4 0 {Rbot}
R25 N030 O4 {Rb}
R26 Vref N025 {Rvref}
R27 CLK T5 {Rrst}
C6 S1 T5 {Cn}
D8 T5 S5 1N4148
Q12 N031 N026 S5 0 2N3906
Q13 N026 N031 O5 0 2N3904
R28 O5 0 {Rbot}
R29 N031 O5 {Rb}
R30 Vref N026 {Rvref}
C18 N020 src_clk 22n
D26 Vd N002 LXHL-BW02 N=10
Q24 N002 N008 N014 0 2N5550
R51 N014 0 10k
R52 N008 0 14k
D27 O4 N008 1N4148
D28 Vd N003 LXHL-BW02 N=10
Q33 N003 N009 N015 0 2N5550
R71 N015 0 10k
R72 N009 0 14.3k
D29 O1 N009 1N4148
D30 Vd N004 LXHL-BW02 N=10
Q34 N004 N010 N016 0 2N5550
R73 N016 0 10k
R75 N010 0 100k
D31 O2 N010 1N4148
D36 Vd N005 LXHL-BW02 N=10
Q38 N005 N011 N017 0 2N5550
R80 N017 0 10k
R81 N011 0 100k
D37 O5 N011 1N4148
D42 Vd N006 LXHL-BW02 N=10
Q41 N006 N012 N018 0 2N5550
R86 N018 0 10k
R87 N012 0 100k
D43 O0 N012 1N4148
.tran 2
.param Cn=1n Rrst=2k2 Rbot=2k2 Rvref=10k Rb=10k
.param LDR 100Meg
.ic V(T1,S2)=0

* LTspice schematic (.asc)
Version 4
SHEET 1 3152 1312
WIRE 200 -592 200 -656
WIRE 536 -592 536 -656
WIRE -456 -576 -456 -640
WIRE -120 -576 -120 -640
WIRE 936 -576 936 -640
WIRE -808 -544 -808 -608
WIRE 200 -480 200 -528
WIRE 536 -480 536 -528
WIRE -456 -464 -456 -512
WIRE -120 -464 -120 -512
WIRE 936 -464 936 -512
WIRE -808 -432 -808 -480
WIRE 136 -432 72 -432
WIRE 472 -432 408 -432
WIRE -520 -416 -584 -416
WIRE -184 -416 -248 -416
WIRE 872 -416 808 -416
WIRE -872 -384 -936 -384
WIRE 72 -384 72 -432
WIRE 408 -384 408 -432
WIRE -584 -368 -584 -416
WIRE -248 -368 -248 -416
WIRE 808 -368 808 -416
WIRE 200 -352 200 -384
WIRE 536 -352 536 -384
WIRE -936 -336 -936 -384
WIRE -456 -336 -456 -368
WIRE -120 -336 -120 -368
WIRE 936 -336 936 -368
WIRE -808 -304 -808 -336
WIRE 1576 32 -40 32
WIRE -136 64 -280 64
WIRE 40 64 -136 64
WIRE 376 64 40 64
WIRE 696 64 376 64
WIRE 1016 64 696 64
WIRE 1336 64 1016 64
WIRE 40 96 40 64
WIRE 376 96 376 64
WIRE 696 96 696 64
WIRE 1016 96 1016 64
WIRE 1336 96 1336 64
WIRE -1128 176 -1128 128
WIRE -40 208 -40 32
WIRE -24 208 -40 208
WIRE 40 208 40 176
WIRE 56 208 40 208
WIRE 88 208 56 208
WIRE 312 208 152 208
WIRE 376 208 376 176
WIRE 392 208 376 208
WIRE 424 208 392 208
WIRE 632 208 488 208
WIRE 696 208 696 176
WIRE 712 208 696 208
WIRE 744 208 712 208
WIRE 952 208 808 208
WIRE 1016 208 1016 176
WIRE 1048 208 1016 208
WIRE 1064 208 1048 208
WIRE 1272 208 1128 208
WIRE 1336 208 1336 176
WIRE 1384 208 1336 208
WIRE 1576 208 1576 32
WIRE 1576 208 1448 208
WIRE -1432 224 -1432 208
WIRE -1320 224 -1320 208
WIRE -1320 224 -1432 224
WIRE -1240 224 -1320 224
WIRE -1192 224 -1240 224
WIRE -280 240 -280 64
WIRE 40 240 40 208
WIRE 376 240 376 208
WIRE 696 240 696 208
WIRE 1016 240 1016 208
WIRE 1336 240 1336 208
WIRE -1320 288 -1320 224
WIRE -1240 288 -1240 224
WIRE -616 288 -616 272
WIRE -584 288 -616 288
WIRE -504 288 -520 288
WIRE -392 288 -424 288
WIRE -344 288 -392 288
WIRE -616 304 -616 288
WIRE -1128 320 -1128 272
WIRE -1080 320 -1128 320
WIRE -392 320 -392 288
WIRE -24 320 -24 208
WIRE -8 320 -24 320
WIRE 40 320 40 304
WIRE 40 320 -8 320
WIRE 312 320 312 208
WIRE 328 320 312 320
WIRE 376 320 376 304
WIRE 376 320 328 320
WIRE 632 320 632 208
WIRE 648 320 632 320
WIRE 696 320 696 304
WIRE 696 320 648 320
WIRE 952 320 952 208
WIRE 968 320 952 320
WIRE 1016 320 1016 304
WIRE 1016 320 968 320
WIRE 1272 320 1272 208
WIRE 1288 320 1272 320
WIRE 1336 320 1336 304
WIRE 1336 320 1288 320
WIRE -1128 336 -1128 320
WIRE 40 336 40 320
WIRE 376 336 376 320
WIRE 696 336 696 320
WIRE 1016 336 1016 320
WIRE 1336 336 1336 320
WIRE -1240 368 -1240 352
WIRE 120 384 104 384
WIRE 136 384 120 384
WIRE 248 384 216 384
WIRE 456 384 440 384
WIRE 472 384 456 384
WIRE 584 384 552 384
WIRE 776 384 760 384
WIRE 792 384 776 384
WIRE 904 384 872 384
WIRE 1096 384 1080 384
WIRE 1112 384 1096 384
WIRE 1224 384 1192 384
WIRE 1416 384 1400 384
WIRE 1432 384 1416 384
WIRE 1544 384 1512 384
WIRE -280 400 -280 336
WIRE -1128 432 -1128 416
WIRE 120 432 120 384
WIRE 456 432 456 384
WIRE 776 432 776 384
WIRE 1096 432 1096 384
WIRE 1416 432 1416 384
WIRE 40 480 40 432
WIRE 40 480 8 480
WIRE 56 480 40 480
WIRE 376 480 376 432
WIRE 376 480 344 480
WIRE 392 480 376 480
WIRE 696 480 696 432
WIRE 696 480 664 480
WIRE 712 480 696 480
WIRE 1016 480 1016 432
WIRE 1016 480 984 480
WIRE 1032 480 1016 480
WIRE 1336 480 1336 432
WIRE 1336 480 1304 480
WIRE 1352 480 1336 480
WIRE 8 496 8 480
WIRE 344 496 344 480
WIRE 664 496 664 480
WIRE 984 496 984 480
WIRE 1304 496 1304 480
WIRE 104 576 8 576
WIRE 120 576 120 528
WIRE 120 576 104 576
WIRE 440 576 344 576
WIRE 456 576 456 528
WIRE 456 576 440 576
WIRE 760 576 664 576
WIRE 776 576 776 528
WIRE 776 576 760 576
WIRE 1080 576 984 576
WIRE 1096 576 1096 528
WIRE 1096 576 1080 576
WIRE 1400 576 1304 576
WIRE 1416 576 1416 528
WIRE 1416 576 1400 576
FLAG -1432 368 VCC
FLAG -1432 448 0
FLAG -1128 128 VCC
FLAG -1128 432 0
FLAG -1320 368 0
FLAG -1320 128 VCC
FLAG -1240 368 0
FLAG -1080 320 Vref
FLAG 72 -304 0
FLAG 200 -272 0
FLAG 200 -656 Vd
FLAG -1576 448 0
FLAG -1576 368 Vd
FLAG 8 -432 O3
FLAG -616 384 0
FLAG -392 400 0
FLAG -280 400 0
FLAG -280 64 CLK
FLAG 8 656 0
FLAG 248 384 Vref
FLAG 344 656 0
FLAG 584 384 Vref
FLAG 664 656 0
FLAG 904 384 Vref
FLAG -8 320 S1
FLAG 328 320 S2
FLAG 648 320 S3
FLAG 104 576 O1
FLAG 440 576 O2
FLAG 760 576 O3
FLAG 56 208 T1
FLAG 392 208 T2
FLAG 712 208 T3
FLAG -136 -16 VCC
FLAG -1432 128 VCC
FLAG 984 656 0
FLAG 1224 384 Vref
FLAG 1080 576 O4
FLAG 1304 656 0
FLAG 1544 384 Vref
FLAG 1400 576 O5
FLAG -616 272 src_clk
FLAG 968 320 S4
FLAG 1288 320 S5
FLAG 1048 208 T4
FLAG 1384 208 T5
FLAG 408 -304 0
FLAG 536 -272 0
FLAG 536 -656 Vd
FLAG 344 -432 O4
FLAG -584 -288 0
FLAG -456 -256 0
FLAG -456 -640 Vd
FLAG -648 -416 O1
FLAG -248 -288 0
FLAG -120 -256 0
FLAG -120 -640 Vd
FLAG -312 -416 O2
FLAG 808 -288 0
FLAG 936 -256 0
FLAG 936 -640 Vd
FLAG 744 -416 O5
FLAG -936 -256 0
FLAG -808 -224 0
FLAG -808 -608 Vd
FLAG -1000 -384 O0
SYMBOL voltage -1432 352 R0
SYMATTR InstName V2
SYMATTR Value 12
SYMBOL npn -1192 176 R0
SYMATTR InstName Q3
SYMATTR Value 2N3904
SYMBOL res -1144 320 R0
SYMATTR InstName R6
SYMATTR Value 10k
SYMBOL cap -1256 288 R0
SYMATTR InstName C3
SYMATTR Value 100n
SYMBOL res -1336 272 R0
SYMATTR InstName R7
SYMATTR Value 10k
SYMBOL res -1336 112 R0
SYMATTR InstName R8
SYMATTR Value 3k9
SYMBOL LED 184 -592 R0
SYMATTR InstName D1
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL npn 136 -480 R0
SYMATTR InstName Q1
SYMATTR Value 2N5550
SYMBOL res 184 -368 R0
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL res 56 -400 R0
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL voltage -1576 352 R0
SYMATTR InstName V1
SYMATTR Value 80
SYMBOL diode 8 -416 R270
SYMATTR InstName D2
SYMATTR Value 1N4148
SYMBOL voltage -616 288 R0
SYMATTR Value PULSE(0 12 0 1n 1n 10m 20m)
SYMATTR InstName V3
SYMBOL res -408 272 R90
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL res -376 416 R180
SYMATTR InstName R4
SYMATTR Value 10k
SYMBOL npn -344 240 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL res 24 80 R0
SYMATTR InstName R5
SYMATTR Value {Rrst}
SYMBOL cap 152 192 R90
SYMATTR InstName C1
SYMATTR Value 1n
SYMBOL diode 24 240 R0
SYMATTR InstName D3
SYMATTR Value 1N4148
SYMBOL pnp 104 432 R180
SYMATTR InstName Q4
SYMATTR Value 2N3906
SYMBOL npn 56 432 R0
SYMATTR InstName Q5
SYMATTR Value 2N3904
SYMBOL res -8 560 R0
SYMATTR InstName R9
SYMATTR Value {Rbot}
SYMBOL res -8 480 R0
SYMATTR InstName R10
SYMATTR Value {Rb}
SYMBOL res 232 368 R90
SYMATTR InstName R11
SYMATTR Value {Rvref}
SYMBOL res 360 80 R0
SYMATTR InstName R12
SYMATTR Value {Rrst}
SYMBOL cap 488 192 R90
SYMATTR InstName C2
SYMATTR Value {Cn}
SYMBOL diode 360 240 R0
SYMATTR InstName D4
SYMATTR Value 1N4148
SYMBOL pnp 440 432 R180
SYMATTR InstName Q6
SYMATTR Value 2N3906
SYMBOL npn 392 432 R0
SYMATTR InstName Q7
SYMATTR Value 2N3904
SYMBOL res 328 560 R0
SYMATTR InstName R13
SYMATTR Value {Rbot}
SYMBOL res 328 480 R0
SYMATTR InstName R14
SYMATTR Value {Rb}
SYMBOL res 568 368 R90
SYMATTR InstName R15
SYMATTR Value {Rvref}
SYMBOL res 680 80 R0
SYMATTR InstName R16
SYMATTR Value {Rrst}
SYMBOL cap 808 192 R90
SYMATTR InstName C4
SYMATTR Value {Cn}
SYMBOL diode 680 240 R0
SYMATTR InstName D5
SYMATTR Value 1N4148
SYMBOL pnp 760 432 R180
SYMATTR InstName Q8
SYMATTR Value 2N3906
SYMBOL npn 712 432 R0
SYMATTR InstName Q9
SYMATTR Value 2N3904
SYMBOL res 648 560 R0
SYMATTR InstName R17
SYMATTR Value {Rbot}
SYMBOL res 648 480 R0
SYMATTR InstName R18
SYMATTR Value {Rb}
SYMBOL res 888 368 R90
SYMATTR InstName R19
SYMATTR Value {Rvref}
SYMBOL res -152 -32 R0
SYMATTR InstName R20
SYMATTR Value 2k2
SYMBOL res -1448 112 R0
SYMATTR InstName R21
SYMATTR Value {LDR}
SYMBOL res 1000 80 R0
SYMATTR InstName R23
SYMATTR Value {Rrst}
SYMBOL cap 1128 192 R90
SYMATTR InstName C5
SYMATTR Value {Cn}
SYMBOL diode 1000 240 R0
SYMATTR InstName D7
SYMATTR Value 1N4148
SYMBOL pnp 1080 432 R180
SYMATTR InstName Q10
SYMATTR Value 2N3906
SYMBOL npn 1032 432 R0
SYMATTR InstName Q11
SYMATTR Value 2N3904
SYMBOL res 968 560 R0
SYMATTR InstName R24
SYMATTR Value {Rbot}
SYMBOL res 968 480 R0
SYMATTR InstName R25
SYMATTR Value {Rb}
SYMBOL res 1208 368 R90
SYMATTR InstName R26
SYMATTR Value {Rvref}
SYMBOL res 1320 80 R0
SYMATTR InstName R27
SYMATTR Value {Rrst}
SYMBOL cap 1448 192 R90
SYMATTR InstName C6
SYMATTR Value {Cn}
SYMBOL diode 1320 240 R0
SYMATTR InstName D8
SYMATTR Value 1N4148
SYMBOL pnp 1400 432 R180
SYMATTR InstName Q12
SYMATTR Value 2N3906
SYMBOL npn 1352 432 R0
SYMATTR InstName Q13
SYMATTR Value 2N3904
SYMBOL res 1288 560 R0
SYMATTR InstName R28
SYMATTR Value {Rbot}
SYMBOL res 1288 480 R0
SYMATTR InstName R29
SYMATTR Value {Rb}
SYMBOL res 1528 368 R90
SYMATTR InstName R30
SYMATTR Value {Rvref}
SYMBOL cap -520 272 R90
SYMATTR InstName C18
SYMATTR Value 22n
SYMBOL LED 520 -592 R0
SYMATTR InstName D26
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL npn 472 -480 R0
SYMATTR InstName Q24
SYMATTR Value 2N5550
SYMBOL res 520 -368 R0
SYMATTR InstName R51
SYMATTR Value 10k
SYMBOL res 392 -400 R0
SYMATTR InstName R52
SYMATTR Value 14k
SYMBOL diode 344 -416 R270
SYMATTR InstName D27
SYMATTR Value 1N4148
SYMBOL LED -472 -576 R0
SYMATTR InstName D28
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL npn -520 -464 R0
SYMATTR InstName Q33
SYMATTR Value 2N5550
SYMBOL res -472 -352 R0
SYMATTR InstName R71
SYMATTR Value 10k
SYMBOL res -600 -384 R0
SYMATTR InstName R72
SYMATTR Value 14.3k
SYMBOL diode -648 -400 R270
SYMATTR InstName D29
SYMATTR Value 1N4148
SYMBOL LED -136 -576 R0
SYMATTR InstName D30
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL npn -184 -464 R0
SYMATTR InstName Q34
SYMATTR Value 2N5550
SYMBOL res -136 -352 R0
SYMATTR InstName R73
SYMATTR Value 10k
SYMBOL res -264 -384 R0
SYMATTR InstName R75
SYMATTR Value 100k
SYMBOL diode -312 -400 R270
SYMATTR InstName D31
SYMATTR Value 1N4148
SYMBOL LED 920 -576 R0
SYMATTR InstName D36
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL npn 872 -464 R0
SYMATTR InstName Q38
SYMATTR Value 2N5550
SYMBOL res 920 -352 R0
SYMATTR InstName R80
SYMATTR Value 10k
SYMBOL res 792 -384 R0
SYMATTR InstName R81
SYMATTR Value 100k
SYMBOL diode 744 -400 R270
SYMATTR InstName D37
SYMATTR Value 1N4148
SYMBOL LED -824 -544 R0
SYMATTR InstName D42
SYMATTR Value LXHL-BW02
SYMATTR Description Diode
SYMATTR Type diode
SYMATTR Value2 N=10
SYMBOL npn -872 -432 R0
SYMATTR InstName Q41
SYMATTR Value 2N5550
SYMBOL res -824 -320 R0
SYMATTR InstName R86
SYMATTR Value 10k
SYMBOL res -952 -352 R0
SYMATTR InstName R87
SYMATTR Value 100k
SYMBOL diode -1000 -368 R270
SYMATTR InstName D43
SYMATTR Value 1N4148