NPN Transistor in Off-Time Delay Switch

Thread Starter

mfiocca

Joined Dec 4, 2023
5
I am not an electrical engineer, and am just getting started learning and building small circuits. Total N00B.

But, I am trying to educate myself on building an off-time delay switch like this one: https://forum.allaboutcircuits.com/threads/making-a-delay-off-timer.75748/

The main (albeit ignorant) questions that I have are:

1) What is the purpose of the NPN transistor in this circuit?
2) Is it possible to energize the relay coil (with flyback diode) without the transistor, connected directly?

My only uneducated guess would be that voltage needs to be amplified during capacitor drain in order for the relay contacts to stay closed. That's probably way wrong, but I am just curious to know what the purpose of the NPN is here.
 

dl324

Joined Mar 30, 2015
16,684
Circuit in question:
relay_i.gif
1) What is the purpose of the NPN transistor in this circuit?
The transistor is being used as an emitter follower on the left and a switch on the right. An emitter follower is a current amplifier. A switch is a transistor being used in saturation mode.

I don't like either of the circuits.
Example Omron relay data:
1701707330600.png

In the emitter follower circuit, the relay will turn off when its dropout voltage is reached. That would be 1.2V for the 12V relay. Because the transistor is always in active mode, it will be dissipating potentially significant power as the base voltage decays.

In the circuit on the right, the transistor could also be dissipating potentially significant current power when it comes out of saturation. Again, the relay would open when the dropout voltage is reached.

I don't like either circuit.
2) Is it possible to energize the relay coil (with flyback diode) without the transistor, connected directly?
Only if you replace the transistor with a switch.
My only uneducated guess would be that voltage needs to be amplified during capacitor drain in order for the relay contacts to stay closed. That's probably way wrong
There is no voltage amplification in either circuit.
I am just curious to know what the purpose of the NPN is here.
It's used to provide voltage/current to energize the relay.

If you want a delay circuit, it would be better to use a timer for the delay and switch the transistor on/off cleanly with fast edges (vs an exponentially decaying voltage from a capacitor).
 
Last edited:

sghioto

Joined Dec 31, 2017
5,369
The purpose of the transistors is to provide a longer delay by acting as a buffer between the 12 volt ignition and the relay coil. Using a mosfet transistor would be an improvement allowing longer delays with the same value capacitor. There is dissipation on the transistor as the voltage across the relay coil decreases but that can be handled easily with the proper components. The reverse diode across the relay coil can be eliminated.
This is about the simplest method of providing a delay turn off.
How long of a delay is required?
 

dl324

Joined Mar 30, 2015
16,684
Just so I understand, in the event that the input to this circuit is already switched, would that mean that the NPN isn't necessary?
The question is moot. You can't replace the transistor with a switch in this case because the ignition switch needs to control the delay.
 

dl324

Joined Mar 30, 2015
16,684
This is all theoretical and just trying to learn, but I do have a circuit in mind that would use 10s.
If your intent is to learn, I'd try learning "better" ways to do that. Agreed that the circuits you posted are "simple", but they're not what I'd consider good.

I'd use the RC for delay with a comparator to turn a transistor on/off to switch the relay cleanly and not depend on pickup and dropout voltages.
 

Thread Starter

mfiocca

Joined Dec 4, 2023
5
If your intent is to learn, I'd try learning "better" ways to do that. Agreed that the circuits you posted are "simple", but they're not what I'd consider good.
Don't know what I don't know, i suppose. Thanks for the advice...
Do you intend to post said circuit?
If I get around to drawing something up that I intend to use/build, I will certainly post it.

Thank you all for your time and insights!
 

WBahn

Joined Mar 31, 2012
29,864
Either of those circuits is going to present a significant load to the ignition switch circuit when turned on. It's initially going to look like a short circuit. I'd recommend putting a resistor in series with the cap to let it charge slowly. That resistance can be part of the timing resistance.

The top circuit is going to have poor timing regulation because the discharging current is just the base current of the transistor, which can vary significantly even with the same collector current -- even an order of magnitude from one transistor to another (of the same part number), over temperature, and over the range of currents as the circuit deenergizes. Added to that is that the actual coil current when energized is probably not really well known, though the coil resistance is probably given to something like 10%. Then there's the uncertainty is just what the actual dropout current is for the particular relay you have in your hands.

As dl324 noted, having the transistor come out of saturation and spend a bunch of time in the linear region means it's going to dissipate more power. Using the relays he provided as an example, this is probably not earth shattering. You'd probably average about 100 mW for your 10 s, which can be tolerated by a suitable transistor without heatsinking. But will the relay like having its applied voltage change so slowly? Is there a chance for it to chatter as it releases? Or does it have enough hysteresis to prevent that?

Still, there are better ways to both get much more reliable timing and get a clean on/off signal to the relay itself.
 

crutschow

Joined Mar 14, 2008
34,047
Below is the LTspice sim of the emitter-follower relay delay circuit with an approx. 10s off delay;
The maximum transistor dissipation for a 12V relay with a 720Ω coil is about 50mW during the time-out.
It has an added input resistor to reduce the turn-on current, and a resistor from the transistor base to ground, to reduce the delay time dependence on the transistor current gain.

1701717381088.png
 

dl324

Joined Mar 30, 2015
16,684
Don't know what I don't know, i suppose. Thanks for the advice...
Here's one way I'd do a 10 second off delay:
1701716275974.png
When the ignition switch is turned off, C1 will start discharging through R5. When the voltage decays to 6V, the comparator will turn the P channel MOSFET off. The comparator input current is low enough to be ignored. There are all sorts of variables that you need to consider if you really want 10 seconds: battery voltage, capacitor tolerance, resistor tolerance.

Assuming a battery voltage of 12V, the time it would take the capacitor to discharge to 6V would be;
\( V_f=V_i(1-e^{-\frac{t}{RC}}) \)
Solving for t:
\( t = -RCln(1-\frac{V_f}{V_i}) = -10uF*1.5M\Omega*ln(1-\frac{6V}{11.3V})=11.4s \)

Adjusting the voltage divider ratio on the non-inverting comparator input is the easiest way to account for variations in battery voltage and capacitor/resistor tolerances.

The main difference from the circuit you referenced is that it doesn't depend on the beta of the transistor or the relay dropout voltage.

The circuit you referenced showed a rectifier diode after the ignition switch. A signal diode is sufficient in my circuit because the current and reverse voltage are small. I show a signal diode as the snubber for the relay coil. It will tolerate 2A for 1uS. If the coil current is higher than half an amp or so, I'd use a rectifier diode.

Automotive relays tend to require larger coil currents that the relays I've mentioned.

Relay contacts and decoupling capacitor not shown for clarity.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,047
But will the relay like having its applied voltage change so slowly? Is there a chance for it to chatter as it releases? Or does it have enough hysteresis to prevent that?
Standard relays inherently have a large hysteresis with a snap-action operation, independent of how slowly the coil voltage is applied or removed.
 

WBahn

Joined Mar 31, 2012
29,864
Although 10 µF is much easier on the system than 1000 µF (and in the range where it really shouldn't be much of an issue), I'd still probably put some of that resistance, perhaps 10 kΩ, in series with C1 to really clamp down the inrush current into the cap. But, like I say, with only 10 µF, it shouldn't really be a factor (since that's a pretty common size for bulk bypass caps). My only concern is that it might cause a glitch as the ignition switch moves from the accessory to the ignition position. Probably not, but it would depend on the impedances from the potentially affected components back to the battery.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
17,814
For both of the circuits in post#2 the NPN transistor is serving as a current operated switch, although it has a linear mode between full off and full on. The circuit with the relay coil load on the collector side is preferred because there is no negative feedback from the relay coil resistance and so the switching action is more simply described. Also, the switching point is simpler to predict.
In an automotive application the surge current at the moment the ignition switch closes will be real, but the switch can easily handle it.
 
Top