Reply by ehsjr December 7, 20202020-12-07
On 12/6/2020 9:36 PM, Rick C wrote:
> Working on a gadget that uses a 12 volt motor (10 amp peak) and misc electronics running on lower voltages. It is powered from an external PSU like a laptop supply, but 12 volts. There is also a sealed lead acid battery for backup when the power fails. > > This design uses pairs of pFETs to route the power from the 12 volts input when present, or the battery when the line is not present. There is also a means of shutting down all power. > > Initially when designing this there was a problem with shoot through from the battery at a slightly higher voltage than the line power initially. Then I added the capacitors present on the motor circuit which helped. But that made large surge currents in the capacitors when the power is shut on or off. > > I'm hoping someone can make some suggestions. I've run out of ideas on how the time the turn on of one switch and turn off of the other while also bringing up the power slowly to reduce the inrush of the capacitors. > > Here is the LTspice schematics. I didn't use anything not in the LTspice library. > > Thanks, > > Rick
Put a resistor in series between the power input and the capacitors to limit the current. Sense the voltage on the caps - feed it to a comparator to drive a relay or mosfet (your choice) that shorts out the resistor when the voltage rises to whatever value you choose. You can use the same approach to disconnect the load until nominal voltage is reached, if necessary. Ed
Reply by Rick C December 6, 20202020-12-06
Working on a gadget that uses a 12 volt motor (10 amp peak) and misc electr=
onics running on lower voltages.  It is powered from an external PSU like a=
 laptop supply, but 12 volts.  There is also a sealed lead acid battery for=
 backup when the power fails. =20

This design uses pairs of pFETs to route the power from the 12 volts input =
when present, or the battery when the line is not present.  There is also a=
 means of shutting down all power. =20

Initially when designing this there was a problem with shoot through from t=
he battery at a slightly higher voltage than the line power initially.  The=
n I added the capacitors present on the motor circuit which helped.  But th=
at made large surge currents in the capacitors when the power is shut on or=
 off. =20

I'm hoping someone can make some suggestions.  I've run out of ideas on how=
 the time the turn on of one switch and turn off of the other while also br=
inging up the power slowly to reduce the inrush of the capacitors. =20

Here is the LTspice schematics.  I didn't use anything not in the LTspice l=
ibrary.=20

Thanks,=20

Rick

Version 4
SHEET 1 1752 916
WIRE 288 -608 272 -608
WIRE -608 -576 -672 -576
WIRE -352 -576 -608 -576
WIRE -96 -576 -352 -576
WIRE 32 -576 0 -576
WIRE 64 -576 32 -576
WIRE 96 -576 64 -576
WIRE 240 -576 192 -576
WIRE 272 -576 272 -608
WIRE 272 -576 240 -576
WIRE 336 -576 272 -576
WIRE 416 -576 336 -576
WIRE 544 -576 512 -576
WIRE 576 -576 544 -576
WIRE 608 -576 576 -576
WIRE 816 -576 704 -576
WIRE 32 -544 32 -576
WIRE 240 -544 240 -576
WIRE 336 -544 336 -576
WIRE 544 -544 544 -576
WIRE 816 -512 800 -512
WIRE -688 -496 -704 -496
WIRE 800 -480 800 -512
WIRE -704 -464 -704 -496
WIRE 240 -464 240 -480
WIRE 336 -464 336 -480
WIRE -608 -432 -608 -576
WIRE -352 -432 -352 -576
WIRE -80 -432 -96 -432
WIRE -16 -432 -16 -528
WIRE -16 -432 -80 -432
WIRE 16 -432 -16 -432
WIRE 32 -432 32 -464
WIRE 32 -432 16 -432
WIRE 112 -432 112 -528
WIRE 112 -432 32 -432
WIRE 432 -432 416 -432
WIRE 496 -432 496 -528
WIRE 496 -432 432 -432
WIRE 544 -432 544 -464
WIRE 544 -432 496 -432
WIRE 624 -432 624 -528
WIRE 624 -432 544 -432
WIRE 416 -400 416 -432
WIRE 592 -384 576 -384
WIRE 720 -384 704 -384
WIRE 800 -384 800 -400
WIRE -704 -368 -704 -384
WIRE 16 -368 16 -432
WIRE 592 -352 592 -384
WIRE 720 -352 720 -384
WIRE 416 -288 416 -320
WIRE 464 -288 416 -288
WIRE 480 -288 464 -288
WIRE -608 -272 -608 -352
WIRE -512 -272 -608 -272
WIRE -352 -272 -352 -352
WIRE -352 -272 -432 -272
WIRE -304 -272 -352 -272
WIRE -256 -272 -304 -272
WIRE -224 -272 -256 -272
WIRE -80 -272 -144 -272
WIRE 16 -272 16 -288
WIRE 64 -272 16 -272
WIRE 80 -272 64 -272
WIRE 16 -256 16 -272
WIRE 416 -256 416 -288
WIRE 592 -256 592 -288
WIRE 720 -256 720 -288
WIRE 720 -256 592 -256
WIRE 736 -256 720 -256
WIRE -352 -240 -352 -272
WIRE -256 -240 -256 -272
WIRE 656 -192 608 -192
WIRE -80 -176 -80 -272
WIRE -32 -176 -80 -176
WIRE 224 -176 192 -176
WIRE 368 -176 224 -176
WIRE 608 -176 608 -192
WIRE -432 -144 -464 -144
WIRE -352 -144 -352 -160
WIRE -80 -144 -80 -176
WIRE -432 -128 -432 -144
WIRE -464 -112 -464 -144
WIRE 224 -112 224 -176
WIRE 256 -112 224 -112
WIRE 368 -112 336 -112
WIRE -608 -96 -608 -272
WIRE -560 -96 -608 -96
WIRE -496 -96 -560 -96
WIRE 368 -96 368 -112
WIRE 496 -96 480 -96
WIRE 560 -96 496 -96
WIRE -320 -80 -432 -80
WIRE -256 -80 -256 -160
WIRE -256 -80 -320 -80
WIRE -608 -64 -608 -96
WIRE -496 -64 -544 -64
WIRE -80 -64 -80 -80
WIRE 608 -64 608 -80
WIRE 16 -48 16 -160
WIRE 112 -48 16 -48
WIRE 368 -48 112 -48
WIRE 416 -48 416 -160
WIRE 416 -48 368 -48
WIRE -464 0 -464 -48
WIRE -400 0 -464 0
WIRE -352 0 -400 0
WIRE -240 0 -288 0
WIRE -224 0 -240 0
WIRE 368 0 368 -48
WIRE 32 16 -32 16
WIRE 144 16 112 16
WIRE 688 16 656 16
WIRE 848 16 768 16
WIRE -608 32 -608 16
WIRE 848 32 848 16
WIRE -128 48 -176 48
WIRE -96 48 -128 48
WIRE -32 48 -32 16
WIRE -176 64 -176 48
WIRE -96 64 -96 48
WIRE -80 64 -96 64
WIRE 480 80 416 80
WIRE 544 80 480 80
WIRE 560 80 544 80
WIRE -544 96 -544 -64
WIRE -512 96 -544 96
WIRE -400 96 -432 96
WIRE -80 112 -96 112
WIRE -96 128 -96 112
WIRE 848 128 848 112
WIRE 224 144 208 144
WIRE 336 144 304 144
WIRE 368 144 368 96
WIRE 368 144 336 144
WIRE 432 144 416 144
WIRE 544 144 544 80
WIRE 544 144 496 144
WIRE -176 160 -176 144
WIRE -32 160 -32 128
WIRE 208 160 208 144
WIRE 416 160 416 144
FLAG -432 -128 0
FLAG -608 32 0
FLAG -672 -576 Vin
IOPIN -672 -576 In
FLAG -560 -96 Vth
FLAG 432 -432 VbatOn_n
FLAG -80 -432 VinOn_n
FLAG 288 -608 V_main
IOPIN 288 -608 Out
FLAG 64 -576 VinSS
FLAG 576 -576 VbatSS
FLAG 816 -576 Vbatt
IOPIN 816 -576 In
FLAG -704 -368 0
FLAG -688 -496 Vin
IOPIN -688 -496 In
FLAG 800 -384 0
FLAG 816 -512 Vbatt
IOPIN 816 -512 Out
FLAG -400 96 Vref
IOPIN -400 96 In
FLAG -240 0 Vin
FLAG -32 160 0
FLAG 144 16 V_main
IOPIN 144 16 In
FLAG -304 -272 VinOn
FLAG 656 -192 PwrFail_n
IOPIN 656 -192 Out
FLAG 464 -288 Vbatdrv
FLAG 64 -272 Vindrv
FLAG 208 160 0
FLAG 480 80 PwrOn_g
FLAG 112 -48 SoftStart
FLAG 704 -384 Vbatt
IOPIN 704 -384 In
FLAG 576 -384 Vin
IOPIN 576 -384 In
FLAG 736 -256 V12_always
IOPIN 736 -256 Out
FLAG 560 80 PwrOn
IOPIN 560 80 In
FLAG 240 -464 0
FLAG 336 -464 0
FLAG 656 16 PwrOn
IOPIN 656 16 Out
FLAG 848 128 0
FLAG 416 160 0
FLAG 192 -176 Vref
IOPIN 192 -176 Out
FLAG 336 144 Vreg
FLAG 608 -64 0
FLAG -80 -64 0
FLAG 368 -96 0
FLAG -320 -80 Vcmp
FLAG -400 0 U1pwr
FLAG -544 -64 V4Ref
FLAG 496 -96 Vcmp
FLAG 848 16 PwrOnDrv
FLAG -352 -144 0
FLAG -80 -272 Vinon_g
FLAG -176 160 0
FLAG -128 48 LoadOn
FLAG -96 128 0
FLAG -32 16 LdGnd
SYMBOL nmos 368 -256 R0
SYMATTR InstName M7
SYMATTR Value 2N7002
SYMBOL res -624 -80 R0
WINDOW 0 -11 40 Right 2
WINDOW 3 -11 65 Right 2
SYMATTR InstName R7
SYMATTR Value 27K
SYMBOL res -624 -448 R0
SYMATTR InstName R8
SYMATTR Value 47K
SYMBOL res -368 -448 R0
SYMATTR InstName R10
SYMATTR Value 10K
SYMBOL res 16 -560 R0
SYMATTR InstName R11
SYMATTR Value 2K
SYMBOL res -416 -288 R90
WINDOW 0 2 93 VBottom 2
WINDOW 3 1 29 VBottom 2
SYMATTR InstName R12
SYMATTR Value 330K
SYMBOL voltage 800 -496 R0
WINDOW 123 0 0 Left 0
WINDOW 39 10 98 Left 2
WINDOW 3 -324 -53 Invisible 2
SYMATTR SpiceLine Rser=3D0.1
SYMATTR Value PULSE(10 13 0.1s 0.1s 0.3s 0.45s)
SYMATTR InstName Batt
SYMBOL voltage -704 -480 R0
WINDOW 123 0 0 Left 0
WINDOW 39 -20 -49 Left 2
WINDOW 3 -8 153 Invisible 2
SYMATTR SpiceLine Rser=3D0.05
SYMATTR Value PULSE(0 12.5 0.2s 0.1s 0.1s 0.3s)
SYMATTR InstName In
SYMBOL res 128 0 R90
WINDOW 0 48 45 VLeft 2
WINDOW 3 48 67 VRight 2
SYMATTR InstName LOAD
SYMATTR Value 2
SYMBOL res 400 -416 R0
SYMATTR InstName R14
SYMATTR Value 47
SYMBOL res 528 -560 R0
SYMATTR InstName R16
SYMATTR Value 2K
SYMBOL res 0 -384 R0
WINDOW 3 35 66 Left 2
SYMATTR InstName R15
SYMATTR Value 47
SYMBOL schottky 704 -352 R0
SYMATTR InstName D1
SYMATTR Value MBRS140
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL schottky 576 -352 R0
SYMATTR InstName D2
SYMATTR Value MBRS140
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL schottky -288 -16 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D3
SYMATTR Value MBRS140
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -416 80 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 1Meg
SYMBOL res 784 0 R90
WINDOW 0 -12 72 VRight 2
WINDOW 3 -12 57 VLeft 2
SYMATTR InstName R2
SYMATTR Value 1Meg
SYMBOL pmos -96 -528 R270
WINDOW 0 88 16 VRight 2
WINDOW 3 65 -18 VRight 2
SYMATTR InstName M1
SYMATTR Value AOD4185
SYMBOL pmos 192 -528 M270
WINDOW 0 87 62 VLeft 2
WINDOW 3 66 75 VLeft 2
SYMATTR InstName M2
SYMATTR Value AOD4185
SYMBOL pmos 416 -528 R270
WINDOW 0 88 38 VRight 2
WINDOW 3 65 -21 VRight 2
SYMATTR InstName M3
SYMATTR Value AOD4185
SYMBOL pmos 704 -528 M270
WINDOW 0 83 66 VLeft 2
WINDOW 3 63 74 VLeft 2
SYMATTR InstName M4
SYMATTR Value AOD4185
SYMBOL nmos -32 -256 R0
SYMATTR InstName M5
SYMATTR Value 2N7002
SYMBOL nmos 416 0 M0
WINDOW 0 62 34 Left 2
WINDOW 3 61 8 Left 2
SYMATTR InstName M8
SYMATTR Value 2N7002
SYMBOL Comparators\\LTC1841 -464 -80 M180
WINDOW 0 -10 49 Right 2
WINDOW 3 28 -15 Left 2
SYMATTR InstName U1
SYMBOL polcap 224 -544 R0
WINDOW 3 24 56 Left 2
SYMATTR Value 1000=C2=B5
SYMATTR InstName C1
SYMATTR Description Capacitor
SYMATTR Type cap
SYMATTR SpiceLine V=3D35 Irms=3D1.95 Rser=3D0.03 Lser=3D0 mfg=3D"Panasonic"=
 pn=3D"ECA1VFQ102L" type=3D"Al electrolytic"
SYMBOL polcap 320 -544 R0
WINDOW 3 24 56 Left 2
SYMATTR Value 1000=C2=B5
SYMATTR InstName C2
SYMATTR Description Capacitor
SYMATTR Type cap
SYMATTR SpiceLine V=3D35 Irms=3D1.95 Rser=3D0.03 Lser=3D0 mfg=3D"Panasonic"=
 pn=3D"ECA1VFQ102L" type=3D"Al electrolytic"
SYMBOL voltage 848 16 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -16 101 Invisible 2
WINDOW 0 -25 84 Right 2
SYMATTR Value PULSE(3.3V 0V 0.4S 1us 1us 99.998ms 0.5s)
SYMATTR InstName PwrOn
SYMBOL cap 496 128 R90
WINDOW 0 -11 41 VRight 2
WINDOW 3 -12 29 VLeft 2
SYMATTR InstName C3
SYMATTR Value 22nF
SYMBOL res 320 128 R90
WINDOW 0 -13 75 VRight 2
WINDOW 3 -13 56 VLeft 2
SYMATTR InstName R3
SYMATTR Value 330
SYMBOL nmos 560 -176 R0
SYMATTR InstName M9
SYMATTR Value 2N7002
SYMBOL res -272 -256 R0
SYMATTR InstName R4
SYMATTR Value 3.6K
SYMBOL cap -96 -144 R0
SYMATTR InstName C5
SYMATTR Value 150nF
SYMBOL voltage 240 -112 R270
WINDOW 123 0 0 Left 0
WINDOW 39 -20 -49 Left 2
WINDOW 3 37 76 VRight 2
WINDOW 0 37 38 VLeft 2
SYMATTR Value 4V
SYMATTR InstName Vref
SYMBOL res -368 -256 R0
SYMATTR InstName R5
SYMATTR Value 10K
SYMBOL res -128 -288 R90
WINDOW 0 -12 72 VRight 2
WINDOW 3 -12 57 VLeft 2
SYMATTR InstName R6
SYMATTR Value 100K
SYMBOL voltage -176 48 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -16 101 Invisible 2
WINDOW 0 -25 84 Right 2
SYMATTR Value PWL(0 -1 50ms -1 50.001ms 1 370ms 1 370.001ms -1 550ms -1 550=
.001ms 1 950ms 1 950.001ms -1)
SYMATTR InstName LoadOn
SYMBOL sw -32 144 M180
WINDOW 3 12 96 Left 2
SYMATTR InstName S1
TEXT 160 -384 Left 3 !.tran 1sec
TEXT -552 -544 Left 2 ;Nominal range\n11.4 < Vin < 12.6
TEXT -600 -224 Left 2 ;11.2V rising,\n10.6V falling
TEXT 656 -160 Left 3 ;To Control Board
TEXT 560 160 Left 3 ;From Control Board
TEXT -664 -608 Left 2 !.model SW sw(Ron=3D0.001 Roff=3D10Meg vt=3D0.5)