* Z:\home\khalils\Downloads\files\data\raw_asc\13263985d6fc_battery_charger_and_monitor.asc
* Generated by LTspice 26.0.1 for Windows.
R3 N010 CHARGE_ENABLE 47k
C1 LRADC4 0 10n
R9 BATT_MEASURE N009 100k
V3 CHARGE_ENABLE 0 PWL(0 0 1m 0 2m 3.0)
Q2 N008 N010 0 0 2N3904
R4 N003 N002 12.7
V4 BATT_MEASURE 0 PWL(0 0 5m 3 100m 3.0)
Q1 N002 N005 N001 0 2N3906
R7 N004 LRADC4 75k
R5 VBATT N003 12.7
R1 N005 N001 100k
V2 VBUS 0 5
R2 N005 N008 2.2k
V1 VBATT 0 3
R6 N006 N007 47k
D1 VBUS N001 BAT54
Q4 N007 N009 0 0 2N3904
Q3 N004 N006 VBATT 0 2N3906
R8 LRADC4 0 24k
.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
.tran 20m
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1580 680
WIRE -64 80 -96 80
WIRE 16 80 -64 80
WIRE 112 80 80 80
WIRE 288 80 112 80
WIRE 448 80 384 80
WIRE 576 80 528 80
WIRE 720 80 656 80
WIRE 752 80 720 80
WIRE 912 80 752 80
WIRE 1184 80 1008 80
WIRE 1184 96 1184 80
WIRE 112 160 112 80
WIRE 144 160 112 160
WIRE 336 160 336 144
WIRE 336 160 224 160
WIRE -96 176 -96 80
WIRE 720 192 720 80
WIRE 960 192 960 144
WIRE 1184 192 1184 176
WIRE 1232 192 1184 192
WIRE 1312 192 1232 192
WIRE 336 208 336 160
WIRE 1184 208 1184 192
WIRE 1312 208 1312 192
WIRE 960 336 960 272
WIRE 976 336 960 336
WIRE 336 384 336 288
WIRE 1088 384 1040 384
WIRE 1232 384 1168 384
WIRE 1248 384 1232 384
WIRE 1248 416 1248 384
WIRE 80 432 64 432
WIRE 144 432 80 432
WIRE 272 432 224 432
WIRE 64 448 64 432
SYMBOL cap 1296 208 R0
SYMATTR InstName C1
SYMATTR Value 10n
SYMBOL pnp 384 144 M270
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL res 944 176 R0
SYMATTR InstName R6
SYMATTR Value 47k
SYMBOL res 544 64 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R4
SYMATTR Value 12.7
SYMBOL res 320 192 R0
SYMATTR InstName R2
SYMATTR Value 2.2k
SYMBOL res 240 144 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R1
SYMATTR Value 100k
SYMBOL res 1184 368 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R9
SYMATTR Value 100k
SYMBOL pnp 1008 144 M270
SYMATTR InstName Q3
SYMATTR Value 2N3906
SYMBOL res 672 64 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R5
SYMATTR Value 12.7
SYMBOL res 1168 80 R0
SYMATTR InstName R7
SYMATTR Value 75k
SYMBOL voltage 1248 400 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V4
SYMATTR Value PWL(0 0 5m 3 100m 3.0)
SYMBOL voltage 64 432 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value PWL(0 0 1m 0 2m 3.0)
SYMBOL schottky 16 64 M90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName D1
SYMATTR Value BAT54
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL voltage 720 176 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 3
SYMBOL res 1168 192 R0
SYMATTR InstName R8
SYMATTR Value 24k
SYMBOL npn 272 384 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL npn 1040 336 M0
SYMATTR InstName Q4
SYMATTR Value 2N3904
SYMBOL res 240 416 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R3
SYMATTR Value 47k
SYMBOL voltage -96 160 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value 5
FLAG 336 480 0
FLAG 720 272 0
FLAG -96 256 0
FLAG 64 528 0
FLAG 976 432 0
FLAG 1184 288 0
FLAG 1312 272 0
FLAG 1232 192 LRADC4
FLAG 1232 384 BATT_MEASURE
FLAG 752 80 VBATT
FLAG -64 80 VBUS
FLAG 80 432 CHARGE_ENABLE
FLAG 1248 496 0
TEXT -130 556 Left 0 !.tran 20m