Relay drive time delay - Source

Started by Unlikekurt, September 30, 2020, 09:29:19 AM

Previous topic - Next topic

Unlikekurt

Hello,

I'm driving a relay with an NPN transistor sourcing current.  I'd like to set up a time delay for the relay and am having trouble figuring that out.  Through searching the web I have found methods of using an NPN in a sinking configuration with an ON delay, but not sourcing.
I'd also be open to using a PNP.  But again, in source configuration.  Any help would be great.

Thanks

anotherjim

In power switching, the terminolgy changes and this becomes a high-side driver. The problem is that the NPN base must be more positive than the emitter to switch on but you usually need the emitter to get close to the supply voltage but without special measures, you can't drive the base more positive than the supply. So, you won't find many examples with NPN. Also a bigger problem with N-channel MOSFET's which are used for high-side, but with some kind of charge pump to make a more positive gate drive which is easy to do on a chip die.

It'll be far easier to change to a PNP which is then only the NPN low-side driver turned upside down for high-side.


antonis

Just what Jim said..  :icon_wink:

Of course, you can over-voltage PS and take care for excessive voltage by a drop on a Collector resistor..
e.g. for a 12V/200mA relay, you can power BJT with 15V with a Collector resistor of 15R/1W..
You might play a bit with Base resistor value to get BJT in active region (i.e. VCE= 3V) in case you don't wish a Collector resistor..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Unlikekurt

#3
Jim/Antonis,

That's what I'd like to do; high side switch with a PNP.  But with a slow turn-on delay.  I'm having difficulty figuring out how to configure the slow-charge part with the RC network.  I'm using a PN2907A and my B+ is roughly 30V.
If need be, I'm also open to adding a NPN to drive the PNP if that makes it easier.  But still high side switching.

Thanks

antonis

Quote from: Unlikekurt on October 01, 2020, 08:53:23 AM
I'm having difficulty figuring out how to configure the slow-charge part with the RC network.

What is the delay time you have in mind..??
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

anotherjim


In principle this is the slow to turn-on. This is high side with NPN but for LED's you don't need the emitter to hit the supply.
In fact it also will be slow(ish) to turn-off, but we'd need to know what's driving it to figure out a fast turn-off

If you have 30v supply, the control can reach 30v and the relay voltage was 28v, then will probably be happy with something like this NPN scheme. For lower relay volts you could add an appropriate Zener diode across C1 and it would then also act as a voltage regulator for the coil. Don't forget the flyback protection diode across the coil!

Unlikekurt

A delay somewhere between 1 and 4 seconds; I would ultimately want to tailor that on the breadboard.  The coil current will be around 12mA at 24v.  So I'll use an appropriate limiting resistor there - and yes a flyback diode.

Looking at Jim's schem using an NPN.  Is it R1 and C1 that set up the delay? 
And R3 and R2 are a divider to set up the bias?

If there is a way to do the high side with just a PNP I'd also be interested to see how as a matter of intrigue.

Thanks

anotherjim

R1 and C1 are the basic delay. For PNP, C1 will go to the positive supply instead of 0v. Control will be opposite a 0v input to turn-on. Also for PNP, R2 will let C1 charge more/longer before the PNP turns full on. R3 would help the timing cap fully discharge with simple on/off button control.

antonis

IMHO, it should be a bit tricky for R3 value to be compromised between n-p-n Base voltage (R3/(R1+R2+R3) and fast discharge time (almost no delay when S1 open)..
Always dependent on C1 value, of course..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Unlikekurt

Antonis, is R3 essentially there to set the off time up by giving C1 a path to discharge to ground?  I'm finding the discharge to be quite quick regardless of the value of R3; even if omitted.  It is confusing me with respect to setting up R3 along with R2.  I initially had R2 at 5.6K, arbitrarily looking to set up the base for about 5mA of current and then selecting R1/C1 for the delay i'm looking to achieve (currently at 33K/100uF).  But when I get to looking at R3, i'm not quite sure what directly i'm supposed to take it.

anotherjim

It's going to discharge via the transistor base. It doesn't have to discharge completely before the relay drops away. And we have to be clear on what is controlling it. A simple SPST switch as drawn disconnects the input and leaves discharge to happen via the load, a control that switches the input to the opposite supply rail (SPDT?) can add another discharge path. Incomplete discharge of the timing cap will mean the first operation after power comes on takes longer than following operations.
I forgot to mention that in the NPN switch, R3 being variable means you can set the maximum relay voltage since it forms a voltage divider with R2 and the NPN emitter will follow that.

Unlikekurt

#11
Jim,

The 30V rail is controlling it.  It's delaying on power up.  With that in mind, I do understand that the power supply's filter caps themselves are certainly going to influence this in some manner.  Yes the discharge of C1 is still desired to stop that quick "next turn on".
Perhaps having a larger R1 and smaller C1 would be helpful?  In that the cap would be smaller and discharge faster and the larger resistor might result in less immediate influence of the main filter caps.  Of course, adjusting for similar RC timing of course.

Ok, so I think I can see how R3 might be useful to me then.  But I'm not exactly sure how to set that up.  If C1 Anode is sitting at 30V and I want the load to see 24V, I then would want the Base to be 24.7V, roughly speaking, yes?  And if we're going for about 5mA or so at the base.
30V - 24.7V = 5.3Vdrop
5.3V / .005A = 1.06K (let's call it 1K)

Then set R3 to 4.66K or 4.7K or so?
Or am I missing something entirely; because I have a feeling I am.   The Load!  The load is in parallel with R3.

So, 24.7V/.005A = 4940R
4.66K = (4940*R3)/(4940+R3)
82.2K ??

Or am I now also ignoring the current that R3 is going to be pulling?  24.7V/82200=.0003A.
Realistically, does that .3mA even matter here?  But for the sake of academics ... wait, I think that wasn't included back in the 4.66K, no?



antonis

Quote from: Unlikekurt on October 02, 2020, 12:15:07 PM
If C1 Anode is sitting at 30V and I want the load to see 24V, I then would want the Base to be 24.7V, roughly speaking, yes? 

Roughly speaking, no.. :icon_wink:
C1 anode never reaches 30V due to voltage drop across R1 due to current flowing initially through R2 & R3 (after a time estimated by C1 exponential charging curve) and finally through R2 & R3//Relay..

So, for 24V on Emitter -> 24.7V on Base -> C1Voltage * (R3//Relay resistance) / (R2 + R3//Relay resistance)
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Unlikekurt

dang!  i thought i was there.
so i was ignoring the relay coil resistance then; considering that IS what the transistor is driving after all.  im second guessing R2 now; how to pick if i know i need some base current, lets say 5ma and the coil current is 16ma, but we also know that R3 is going to have some current draw as well.  but we dont know what R3 will be until we pick R2 so how does one account for that?  is it just that it will be negligible current so ignore it?
with respect to your formula is that solving for 24v = ?
lets say C1 voltage is 28.5 and R2 is 1K and the coil resistance would be 1.5K

thanks for all the help, a tad more and i think itll click

anotherjim

Unless the time delay is millisecond critical, don't knock yourself out too much. A single stage is going to depend on too many things outside of a designers control - a relay picks up at a lower voltage than rated and drops away at a much lower voltage than it picks up at. An electrolytic cap for timing has a wide value tolerance. Timing calculation is always going to be affected by the load.
For more precise work, you'd split it into 2 active stages. One to do the timing and another to drive the load.


Unlikekurt

#15
I got you Jim, Im just trying to make sure I understand the how I got to where I am with this one.  The circuit looks a bunch like an emitter follower biased by voltage divider but without an emitter resistor.  that has me confused. Is the load intended to serve fully in that role?

antonis

Quote from: Unlikekurt on October 03, 2020, 08:23:24 AM
The circuit looks a bunch like an emitter follower biased by voltage divider but without an emitter resistor.  that has me confused. Is the load intended to serve fully in that role?

Yeappp!!  :icon_wink:

Of a value esimated by working voltage divided with working current..
(if you are a perfectionist, you'll have to add 0.026/working current as intrinsic emitter resistor..) :icon_lol:

Of course, you'll have to feed BJT base with current much higher than IC/hFE to ensure proper switching..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Unlikekurt

Ok!  Now this is making more sense to me.
The intrinsic emitter current is higher than the actual load current; interesting.

So 24/(.016+.026) = 571.42 = RL

And the Collector current is pretty much going to follow the load current directly, right?

With respect to the bias divider, does it make sense to start with the source resistor or the sink? 


antonis

Quote from: Unlikekurt on October 01, 2020, 05:49:29 PM
The coil current will be around 12mA at 24v.

Coil resistance comes more close to 2k, I presume.. :icon_wink:

Ignore intrinsic emitter resistor (I was just kidding..) 'cause it's about 2R for 12mA Collector current..

Replace relay with a 2k Emitter resistor and proceed to bias an ordinary Emitter follower..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Unlikekurt

I went back to set it up and unfortunately, due to the timing circuit, the voltage at the capacitor fell to about 13 volts.  So, there was no way I'd be able to set up the transistor to have 24V at the emitter.  I considered switching to a 12V relay and slapping a one or two watt current limiting resistor in line with the coil, but decided to go in a different direction.  Thanks for all the help though; it definitely provided the spark for a better understanding.