From baff27af55516dc0ee3dd52f163cac395552dd8e Mon Sep 17 00:00:00 2001 From: davor Date: Sun, 3 Jun 2018 18:00:21 +0200 Subject: [PATCH] spice: actual level of FTDI_nSLEEP is 2.5V replace correct schottky diode model --- spice/powersection-v17.spice | 18 ++++++++++-------- spice/powersection-v188.spice | 20 +++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/spice/powersection-v17.spice b/spice/powersection-v17.spice index 49f2f2f..8e9011e 100644 --- a/spice/powersection-v17.spice +++ b/spice/powersection-v17.spice @@ -29,7 +29,7 @@ Rwk wake_pulse wake_base 1k * FTDI_nSLEEP signal every 10 seconds, start after 2.3s * start rise fall duration period -VFTDI FTDI_nSLEEP 0 PULSE(0V 3.3V 2.2s 10ms 10ms 0.5s 10s DC=0V) +VFTDI FTDI_nSLEEP 0 PULSE(0V 2.5V 2.2s 10ms 10ms 0.5s 10s DC=0V) * RTC internal NPN transisfor for open collector output Qwk WAKEUPn wake_base 0 BC847 @@ -75,7 +75,7 @@ R5 SHUT 0 4.7MEG D14 SHUT P3V3 N4148 * diode for shutdown to only pull down, never up -D15 SHUTDOWN SHUT BAT42 +D15 SHUTDOWN SHUT BAT54W * Pull down resistor R13 SHUTDOWN 0 15k @@ -85,8 +85,8 @@ D16 WAKEUPn pwrbtn N4148 SPWR pwrbtn 0 pwrbtn_pulse 0 SWITCH OFF * ftdi no-sleep network -R10 FTDI_nSLEEP FTDI_nSUSPEND 220 -D12 FTDI_nSUSPEND PWREN N4148 +R10 FTDI_nSLEEP FTDI_nSUSPEND 150 +D12 FTDI_nSUSPEND PWREN BAT54W * The load (slow) @@ -101,13 +101,15 @@ CL P3V3 0 1000uF .MODEL SWITCH SW (VT=1V, VH=0.5V, RON=0.01, ROFF=100MEG) .MODEL N4148 D (CJO=0.2pF) -.MODEL BAT42 D (VJ=0.25) +.MODEL BAT54W D ( ++IS=1.4092e-08 RS=0.78137 N=0.960292 EG=0.706829 ++XTI=0.5 BV=30 IBV=0.00001 CJO=1.28873e-11 ++VJ=0.604739 M=0.445477 FC=0.5 TT=0 ++KF=0 AF=1) .MODEL BC847 NPN (BF=150) .MODEL BC857 PNP (BF=150) .MODEL N7002 NMOS (LEVEL=1, VTO=2.5, KP=40, RS=0.033, RD=0.034) * todo -* [ ] BAT42 schottky diode model doesn't simulate wanted 0.25V drop -* the BAT42 model seems to have 0.7V drop -* [ ] delay: switch power 3.3V doesn't start immediately +* [x] delay: switch power 3.3V doesn't start immediately simulated with Rsmps=10 ohm * [ ] control signals should be derived from P3V3 line diff --git a/spice/powersection-v188.spice b/spice/powersection-v188.spice index 6b14003..c13664c 100644 --- a/spice/powersection-v188.spice +++ b/spice/powersection-v188.spice @@ -29,7 +29,7 @@ Rwk wake_pulse wake_base 1k * FTDI_nSLEEP signal every 10 seconds, start after 2.3s * start rise fall duration period -VFTDI FTDI_nSLEEP 0 PULSE(0V 3.3V 2.2s 10ms 10ms 0.5s 10s DC=0V) +VFTDI FTDI_nSLEEP 0 PULSE(0V 2.5V 2.2s 10ms 10ms 0.5s 10s DC=0V) * RTC internal NPN transisfor for open collector output Qwk WAKEUPn wake_base 0 BC847 @@ -65,7 +65,7 @@ R2 PWREN 0 18k * small mosfet M1 drain SHUT 0 0 N7002 * drain resistor -R8 drain PWREN 680 +R8 drain PWREN 1.2k * mosfet gate slowdown resistor C14 SHUT 0 220nF * mosfet gate discharge (default OFF) resistor @@ -75,7 +75,7 @@ R5 SHUT 0 2.2MEG D14 SHUT P3V3 N4148 * diode for shutdown to only pull down, never up -D15 SHUTDOWN SHUT BAT42 +D15 SHUTDOWN SHUT BAT54W * Pull down resistor R13 SHUTDOWN 0 15k @@ -85,8 +85,8 @@ D16 WAKEUPn pwrbtn N4148 SPWR pwrbtn 0 pwrbtn_pulse 0 SWITCH OFF * ftdi no-sleep network -R10 FTDI_nSLEEP FTDI_nSUSPEND 220 -D12 FTDI_nSUSPEND PWREN N4148 +R10 FTDI_nSLEEP FTDI_nSUSPEND 150 +D12 FTDI_nSUSPEND PWREN BAT54W * The load (slow) @@ -101,7 +101,11 @@ CL P3V3 0 1000uF .MODEL SWITCH SW (VT=1V, VH=0.5V, RON=0.01, ROFF=100MEG) .MODEL N4148 D (CJO=0.2pF) -.MODEL BAT42 D (VJ=0.25) +.MODEL BAT54W D ( ++IS=1.4092e-08 RS=0.78137 N=0.960292 EG=0.706829 ++XTI=0.5 BV=30 IBV=0.00001 CJO=1.28873e-11 ++VJ=0.604739 M=0.445477 FC=0.5 TT=0 ++KF=0 AF=1) *Typ RED GaAs LED: Vf=1.7V Vr=4V If=40mA trr=3uS .MODEL LED_RED D (IS=93.2P RS=42M N=3.73 BV=4 IBV=10U + CJO=2.97P VJ=.75 M=.333 TT=4.32U) @@ -116,7 +120,5 @@ CL P3V3 0 1000uF .MODEL N7002 NMOS (LEVEL=1, VTO=2.5, KP=40, RS=0.033, RD=0.034) * todo -* [ ] BAT42 schottky diode model doesn't simulate wanted 0.25V drop -* the BAT42 model seems to have 0.7V drop -* [ ] delay: switch power 3.3V doesn't start immediately +* [x] delay: switch power 3.3V doesn't start immediately simulated with Rsmps=10 ohm * [ ] control signals should be derived from P3V3 line