Maker Pro
Maker Pro

Variation on the 5v -> 12v newbie question...

J

Jonathan Kirwan

The time has come for that, IMHO.

I have a set of them, by now. But I can include the one that is based
on your schematic (uses the Zetex model and a 10 ohm, 200mH relay) as
a starting point. Would that be okay? (See bottom of post.)
"Criterion" means some rule for deciding something.
What I'm asking is: How do you decide where to place
those cursors before you read off their time difference?
In another post, I mentioned the 99% to 37% fall time
and the 1% to 63% rise time. The criteria for how one
would measure those are evident. (I suppose I should
mention that they relate to current changes, not voltage.)
Your criteria remain a complete mystery. What precisely
happens between the start of your "rise time" and the end
of it? Repeat the question for your "decay time".

I used the same measuring rules for both directions. I will leave it
to you to look at when you load up the LTSpice schematic. I think you
will be able to see that the fall time is at least ... longer ...
regardless of your standard chosen.
Ok, I misunderstood you.

No problem. It seemed that way, which is why I posted a more detailed
description of my thinking.

Jon

P.S. Note that the last two TEXT lines describe the two models I
included, one for the diode, the other for the PNP transistor. I'm
not sure how my email posting program will wrap these lines versus how
LTSpice wants them. But you should be able to edit them in,
correctly, with only a small bother at most.



Version 4
SHEET 1 880 680
WIRE -512 -720 -512 -736
WIRE -512 -608 -512 -640
WIRE -416 -736 -512 -736
WIRE -288 -480 -288 -512
WIRE -288 -352 -288 -400
WIRE -272 -48 -448 -48
WIRE -272 -48 -272 -256
WIRE -224 -256 -272 -256
WIRE -192 -736 -336 -736
WIRE -160 -496 -160 -528
WIRE -160 -352 -160 -416
WIRE -160 -304 -160 -352
WIRE -160 -160 -160 -208
WIRE -160 -48 -160 -80
WIRE 0 -240 0 -288
WIRE 0 -128 0 -176
WIRE 16 -352 -160 -352
WIRE 80 -400 80 -432
WIRE 80 -288 0 -288
WIRE 80 -288 80 -304
WIRE 80 -272 80 -288
WIRE 80 -128 80 -192
FLAG 80 -432 +12V
FLAG -160 -528 +12V
FLAG -288 -352 0
FLAG -288 -512 +12V
FLAG 80 -128 0
FLAG -448 -48 OC_SENSOR_OUTPUT
FLAG -160 -48 0
FLAG -512 -608 0
FLAG -192 -736 OC_SENSOR_OUTPUT
FLAG 0 -128 0
SYMBOL pnp 16 -304 M180
SYMATTR InstName Q1
SYMATTR Value ZTX790A
SYMBOL res -176 -512 R0
SYMATTR InstName R1
SYMATTR Value 1000
SYMBOL npn -224 -304 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL res -176 -176 R0
SYMATTR InstName R2
SYMATTR Value 130
SYMBOL voltage -288 -496 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value {Vbb}
SYMBOL voltage -512 -736 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 500u 20n 20n 100m 200m)
SYMBOL res -320 -752 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R3
SYMATTR Value 120
SYMBOL ind 64 -288 R0
SYMATTR InstName L1
SYMATTR Value 200m
SYMATTR SpiceLine Rser=10
SYMBOL diode 16 -176 R180
WINDOW 0 24 72 Left 0
WINDOW 3 24 0 Left 0
SYMATTR InstName D1
SYMATTR Value 1N4002
TEXT -882 -96 Left 0 !.tran 1
TEXT -880 -640 Left 0 !.param ILoad=1A
TEXT -880 -704 Left 0 !.param Vbb=12V
TEXT -880 -672 Left 0 !.param Vcc=5V
TEXT 128 -160 Left 0 ;BUZZER
TEXT -896 -736 Left 0 ;PRIMARY SPECIFICATIONS
TEXT -896 -576 Left 0 ;DESIGN ESTIMATIONS
TEXT -880 -512 Left 0 !.param Q2Vce=0.2V Q2Vbe=0.85V Q2beta=30
TEXT -880 -544 Left 0 !.param Q1Vbe=0.75V Q1beta=200
TEXT -896 -416 Left 0 ;DERIVATIVE CALCULATIONS
TEXT -880 -224 Left 0 !.param RLoad=(Vbb-Q2Vce)/ILoad
TEXT -880 -384 Left 0 !.param Q2Ic=ILoad Q2Ib=ILoad/Q2beta
TEXT -880 -480 Left 0 !.param IR2=0.02*Q2Ib
TEXT -880 -352 Left 0 !.param Q1Ic=Q2Ib+IR2 Q1Ib=Q1Ic/Q1beta
TEXT -880 -320 Left 0 !.param Q1Ie=Q1Ic+Q1Ib
TEXT -896 -256 Left 0 ;RESISTOR VALUES
TEXT -880 -192 Left 0 !.param R2=Q2Vbe/IR2
TEXT -880 -160 Left 0 !.param R1=(Vcc-Q1Vbe)/Q1Ie
TEXT -880 112 Left 0 !.MODEL ZTX790A PNP(IS=1.09684E-12 NF=1.0102
BF=650 IKF=1.7 VAF=23.5\n+ISE=9.88593E-14 NE=1.47256 NR=1.00391 BR=270
IKR=0.2 VAR=30\n+ISC=5.4933E-14 NC=1.07427 RB=0.055 RE=0.049 RC=0.078
CJC=96E-12\n+MJC=0.495 VJC=0.67 CJE=275E-12 TF=0.75E-9 TR=10.8E-9)
TEXT -880 16 Left 0 !.MODEL 1N4002 D(IS=14.11E-9 N=1.984 RS=33.89E-3
IKF=94.81 XTI=3\n+ EG=1.110 CJO=51.17E-12 M=.2762 VJ=.3905 FC=.5
ISR=100.0E-12\n+ NR=2 BV=100.1 IBV=10 TT=4.761E-6)
 
L

Larry Brasfield

Jonathan Kirwan said:
I have a set of them, by now. But I can include the one that is based
on your schematic (uses the Zetex model and a 10 ohm, 200mH relay) as
a starting point. Would that be okay? (See bottom of post.)

Sure, if it works.
I used the same measuring rules for both directions.

You appear determined to be mysterious about them.
I will leave it
to you to look at when you load up the LTSpice schematic. I think you
will be able to see that the fall time is at least ... longer ...
regardless of your standard chosen.

(LTSpice schematic and related notes cut.)

I ran your simulation with these results:
current rise time 0% to 90% = 44.25 mS
current fall time 100% to 10% = 36.33 mS
current rise time 1% to 63% = 19.21 mS
current fall time 99% to 37% = 17.35 mS
(The cycle time is not adequate to let the on current
settle to the steady state, being only about 10 L/R.
This has reduced the expected 1% to 63% rise time
from the expected 19.8 mS to the value seen above.)
To me, it appears that the fall time is uniformly shorter.
I will leave it to you to figure out why your method for
measuring rise and fall time leads to inexplicable results.
 
J

Jonathan Kirwan

<snip of other material, until later>
(LTSpice schematic and related notes cut.)

I ran your simulation with these results:
current rise time 0% to 90% = 44.25 mS
current fall time 100% to 10% = 36.33 mS
current rise time 1% to 63% = 19.21 mS
current fall time 99% to 37% = 17.35 mS
(The cycle time is not adequate to let the on current
settle to the steady state, being only about 10 L/R.
This has reduced the expected 1% to 63% rise time
from the expected 19.8 mS to the value seen above.)
To me, it appears that the fall time is uniformly shorter.
I will leave it to you to figure out why your method for
measuring rise and fall time leads to inexplicable results.

To the issue mentioned above, looking at the curve for I(L1), at about
0.2s on my .tran display, I see it just start to rise. (You are right
about not providing enough time, but I don't think this is material to
the discussion. It does rise to about 1.17A and must ramp down from
that point and is able to completely go back to zero, so the situation
should still be worth discussing.) I used your figure of 63% from the
earlier post and this is about .737A. I get about 19.72ms for the
time, as close as I can make it out zooming out the display. At 0.3s,
the solenoid looses its supply and the current ramps down. 37% is
..433A. I see this take place 18.1ms later. Looking back over my
notes, I see where I'd confused two pairs of numbers taken with
different values for the solenoid. My mistake! Thanks.

I'm curious to see if you found the oscillation in the simulation and
might address yourself to that.

Jon
 
L

Larry Brasfield

(I, Brasfield, did not write the above line.)
....
To the issue mentioned above, looking at the curve for I(L1), at about
0.2s on my .tran display, I see it just start to rise. (You are right
about not providing enough time, but I don't think this is material to
the discussion.

It is only material in that it explains the deviation in rise time
from what would be predicted using the component values.

[snip]
I'm curious to see if you found the oscillation in the simulation and
might address yourself to that.

My first post in this thread on June 26 addressed that.
With the addition of a few elements to simulate the effect
of eddy current losses in the solenoid magnetic structure,
your simulation shows behavior at diode turn-off that is
much closer to what can be observed with real solenoids.

In this simulation, (included below), there is a small amount
of ringing, barely visible without zooming in on it. Without
considerably more work, I cannot be sure that those added
elements accurately model the layered single turns of steel
that are present in most real solenoids, acting as parasitic
secondaries that absorb energy at higher frequencies. To
get that close would require looking at some actual parts.

Version 4
SHEET 1 2628 680
WIRE -512 -720 -512 -736
WIRE -512 -608 -512 -640
WIRE -416 -736 -512 -736
WIRE -288 -480 -288 -512
WIRE -288 -352 -288 -400
WIRE -272 -48 -448 -48
WIRE -272 -48 -272 -256
WIRE -224 -256 -272 -256
WIRE -192 -736 -336 -736
WIRE -160 -496 -160 -528
WIRE -160 -352 -160 -416
WIRE -160 -304 -160 -352
WIRE -160 -160 -160 -208
WIRE -160 -48 -160 -80
WIRE 0 -240 0 -288
WIRE 0 -128 0 -176
WIRE 16 -352 -160 -352
WIRE 80 -400 80 -432
WIRE 80 -288 0 -288
WIRE 80 -288 80 -304
WIRE 80 -272 80 -288
WIRE 80 -128 80 -192
WIRE 352 -256 336 -256
WIRE 352 -224 352 -256
WIRE 352 -64 336 -64
WIRE 352 -32 352 -64
WIRE 368 -336 336 -336
WIRE 368 -256 352 -256
WIRE 368 -144 336 -144
WIRE 368 -64 352 -64
FLAG 80 -432 +12V
FLAG -160 -528 +12V
FLAG -288 -352 0
FLAG -288 -512 +12V
FLAG 80 -128 0
FLAG -448 -48 OC_SENSOR_OUTPUT
FLAG -160 -48 0
FLAG -512 -608 0
FLAG -192 -736 OC_SENSOR_OUTPUT
FLAG 0 -128 0
FLAG 352 -224 0
FLAG 352 -32 0
SYMBOL pnp 16 -304 M180
SYMATTR InstName Q1
SYMATTR Value ZTX790A
SYMBOL res -176 -512 R0
SYMATTR InstName R1
SYMATTR Value 1000
SYMBOL npn -224 -304 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL res -176 -176 R0
SYMATTR InstName R2
SYMATTR Value 130
SYMBOL voltage -288 -496 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value {Vbb}
SYMBOL voltage -512 -736 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 500u 20n 20n 100m 200m)
SYMBOL res -320 -752 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R3
SYMATTR Value 120
SYMBOL ind2 64 -288 R0
SYMATTR InstName L1
SYMATTR Value {Ls}
SYMATTR SpiceLine Rser=10
SYMATTR Type ind
SYMBOL diode 16 -176 R180
WINDOW 0 24 72 Left 0
WINDOW 3 24 0 Left 0
SYMATTR InstName D1
SYMATTR Value 1N4002
SYMBOL ind2 352 -240 R180
WINDOW 0 36 80 Left 0
WINDOW 3 36 40 Left 0
SYMATTR InstName L2
SYMATTR Value {Ls/(Nts**2)}
SYMATTR Type ind
SYMBOL ind2 352 -48 R180
WINDOW 0 36 80 Left 0
WINDOW 3 36 40 Left 0
SYMATTR InstName L3
SYMATTR Value {Ls/(4*Nts**2)}
SYMATTR Type ind
SYMBOL res 352 -352 R0
SYMATTR InstName R4
SYMATTR Value 10m
SYMBOL res 352 -160 R0
SYMATTR InstName R5
SYMATTR Value 5m
TEXT -882 -96 Left 0 !.tran 0 210m 0 1u
TEXT -880 -640 Left 0 !.param ILoad=1A
TEXT -880 -704 Left 0 !.param Vbb=12V
TEXT -880 -672 Left 0 !.param Vcc=5V
TEXT 128 -160 Left 0 ;BUZZER
TEXT -896 -736 Left 0 ;PRIMARY SPECIFICATIONS
TEXT -896 -576 Left 0 ;DESIGN ESTIMATIONS
TEXT -880 -512 Left 0 !.param Q2Vce=0.2V Q2Vbe=0.85V Q2beta=30
TEXT -880 -544 Left 0 !.param Q1Vbe=0.75V Q1beta=200
TEXT -896 -416 Left 0 ;DERIVATIVE CALCULATIONS
TEXT -880 -224 Left 0 !.param RLoad=(Vbb-Q2Vce)/ILoad
TEXT -880 -384 Left 0 !.param Q2Ic=ILoad Q2Ib=ILoad/Q2beta
TEXT -880 -480 Left 0 !.param IR2=0.02*Q2Ib
TEXT -880 -352 Left 0 !.param Q1Ic=Q2Ib+IR2 Q1Ib=Q1Ic/Q1beta
TEXT -880 -320 Left 0 !.param Q1Ie=Q1Ic+Q1Ib
TEXT -896 -256 Left 0 ;RESISTOR VALUES
TEXT -880 -192 Left 0 !.param R2=Q2Vbe/IR2
TEXT -880 -160 Left 0 !.param R1=(Vcc-Q1Vbe)/Q1Ie
TEXT -880 112 Left 0 !.MODEL ZTX790A PNP(IS=1.09684E-12 NF=1.0102 BF=650 IKF=1.7 VAF=23.5 ISE=9.88593E-14 NE=1.47256 NR=1.00391
BR=270 IKR=0.2 VAR=30 ISC=5.4933E-14 NC=1.07427 RB=0.055 RE=0.049 RC=0.078 CJC=96E-12 MJC=0.495 VJC=0.67 CJE=275E-12 TF=0.75E-9
TR=10.8E-9)
TEXT -880 16 Left 0 !.MODEL 1N4002 D(IS=14.11E-9 N=1.984 RS=33.89E-3 IKF=94.81 XTI=3 EG=1.110 CJO=51.17E-12 M=.2762 VJ=.3905
FC=.5 ISR=100.0E-12 NR=2 BV=100.1 IBV=10 TT=4.761E-6)
TEXT 264 -368 Left 0 !K12 L1 L2 0.5
TEXT 248 -184 Left 0 !K23 L2 L3 0.5
TEXT 144 -424 Left 0 !.param Nts=100, Ls=200m
 
W

west

Ban said:
Yes, The transistor needs to be PNP (NTE12), because the solenoids are
grounded. And you need another NPN like 2N3906 to make a level translator.

12V PNP
o-----o------ -----------o
| \ v |
| --- |
| ___ | |
'-|___|-o |
10k | |
.-. |
| |560 |
| |0.5W |
'-' |
| 1N4001 |
INPUT | .---o
___ |/ | |_
o-|___|-o---| NPN - )|
4k7 | |> ^ )|
.-. | | ._)|
| | | '---o
10k| | | |
'-' | ===
| | GND
=== ===
GND GND
(created by AACircuit v1.28 beta 10/06/04 www.tech-chat.de)
View/font fixed

Hello Ban,
I believe the 3906 is a PNP and the 3904 is the NPN.
Cordially,
west
 
B

Ban

west said:
Hello Ban,
I believe the 3906 is a PNP and the 3904 is the NPN.
Cordially,
west

Yes, I always mess them up. Also the drawing is messed up. The emitter of
the PNP should be at the input voltage. ASCII kills me! I use mainly
European part numbers, BC546(NPN) BC556(PNP) or BC337(NPN) and BC327(PNP)
for higher current.
 
Top