Delay a relay after startup

panic mode

Joined Oct 10, 2011
4,984
i think that is a nice but in the end it may be touchy.

the first issue is that there is no delay. schematic shows a relay but really that is an SSR. and most significant delay will be the SSR turn-on time which is typically under 1ms. response of comparator is much shorter.

next, NTCs are not exactly the most stable or precise elements - quite the opposite. they have really high tolerances. also they have a wear and respond to other factors like temperature. for me that sounds as potentially perpetual concern and i would rather not have to periodically measure it, recalculate the circuit components and resolder parts.

the other issue is choice of zeners. not sure why they had to be so low (0.5 and 1V). zeners are notoriously inaccurate at low voltages and the lowest i recall is some 1.2V. at any rate, why not stick with something more common and more stable? as for Z2, i would only use it for IC input protection (10-15V). this would be handy in case NTC circuit connection becomes compromised or NTC fails open.

also switching large loads leads to transients and interference. there may be other circuits nearby that cause it too. i see nothing to deal with false triggers. and if it is pin3 trigger would latch the circuit so it would not perform what it was supposed to do. zener diodes have capacitance and since two different zeners are used, who is to tell which one will reach breakdown sooner? so it may be a good idea to add a capacitor in parallel with Z2. this can not only shift balance to the correct side, filter out possible transients but also create small delay... why not 3ms?

high current NTCs
https://www.vishay.com/docs/24512/mm.pdf
 

MrAl

Joined Jun 17, 2014
13,704
i think that is a nice but in the end it may be touchy.

the first issue is that there is no delay. schematic shows a relay but really that is an SSR. and most significant delay will be the SSR turn-on time which is typically under 1ms. response of comparator is much shorter.

next, NTCs are not exactly the most stable or precise elements - quite the opposite. they have really high tolerances. also they have a wear and respond to other factors like temperature. for me that sounds as potentially perpetual concern and i would rather not have to periodically measure it, recalculate the circuit components and resolder parts.

the other issue is choice of zeners. not sure why they had to be so low (0.5 and 1V). zeners are notoriously inaccurate at low voltages and the lowest i recall is some 1.2V. at any rate, why not stick with something more common and more stable? as for Z2, i would only use it for IC input protection (10-15V). this would be handy in case NTC circuit connection becomes compromised or NTC fails open.

also switching large loads leads to transients and interference. there may be other circuits nearby that cause it too. i see nothing to deal with false triggers. and if it is pin3 trigger would latch the circuit so it would not perform what it was supposed to do. zener diodes have capacitance and since two different zeners are used, who is to tell which one will reach breakdown sooner? so it may be a good idea to add a capacitor in parallel with Z2. this can not only shift balance to the correct side, filter out possible transients but also create small delay... why not 3ms?

high current NTCs
https://www.vishay.com/docs/24512/mm.pdf
Hi there,

An SSR (solid state relay) can have a delay from maybe 100us to 8ms on a 60Hz line, or 10ms on 50Hz I think. That is because they are most likely zero detect SSR's. Maybe they make non zero detect ones too though.

As to the low voltages of 0.5 and 1v, that was just for a design example. In real life we have to scale that up (if possible) so we can use regular zeners. Luckily, the zener voltage does not have to be super accurate nor super stable we have quite a bit of flexibility on the two voltages.

If there are two zeners being used, they are not in parallel. One is used for a DC reference voltage, the other is used for input over voltage protection.

If there is no delay and we need that we can always add that. For now it seemed that the math and basic setup was the most important.

I've included the schematic again for clarity. Note that the very input on the left is not Vi anymore it is just the input supply voltage we might call Vs instead. Vi is the sense voltage.
 

Attachments

panic mode

Joined Oct 10, 2011
4,984
If there are two zeners being used, they are not in parallel. One is used for a DC reference voltage, the other is used for input over voltage protection.
thanks, and i know - i saw the circuit before posting my thoughts. for DC circuit SSR need to be DC so no zero crossing. and the switching times should be inline with what i stated. for example here is a typical 100V 150A DC SSR:
https://www.celduc-relais.com/Technical_DataSheet/FA_SCM0150100.pdf

1760634565336.png
 
Last edited:

Thread Starter

andrew74

Joined Jul 25, 2022
224
Hi,

Oh that's great that you got the first one, that means you can also get the second one.

The general method for any of these circuits is to use Nodal Analysis. There's also a sort of 'trick'. It's not really a trick but it may seem like one because we do the very same thing as we did with the first equation, except now we do it two times. We then sum the results.

Let's look at a simpler example first. Say we have just two resistors of a voltage divider, R1 on top and R2 on bottom. We have two voltage sources V1 and V2, V1 connects to the top of R1 and V2 connects to the bottom of R2 (both positive) and the negative terminals are both grounded.

Now to start, we short out V2. That gives us the first node voltage vn1:
vn1=V1*R2/(R1+R2)

now we do the same thing again but this time we short out V1 and use V2 as the only source. this gives us vn2:
vn2=V2*R1/(R1+R2)

and note that for vn1 we have R2 in the top and for vn2 we have R1 in the top. That is a consequence of the roles of the two resistors changing place. If we drew the circuit with just V1 we would have R2 on the bottom, and if we redrew the circuit with just V2 we would see R1 on the bottom because R1 would then also connect to ground.

Now we just sum the two voltages vn1 and vn2 to get the total node voltage:
vn=vn1+vn2
so:
vn=V1*R2/(R1+R2)+V2*R1/(R1+R2)

In any case were we happen to have two resistors in series we of course just add the two before we use that as either R1 or R2.

Just keep in mind that when we do the second calculation the entire topology may look different because we may end up with more resistors or less resistors in the second calculation. The two calculations are done independently from each other although they may share some or all resistors.

See if that helps.
Am I getting closer to the solution? (..of course I mean to the second equation which I could not find)

I have not yet developed the calculations in the photo, but I would like some feedback as to whether this superposition of effects is OK
SmartSelect_20251018_155057_Samsung Notes.png
 

MrAl

Joined Jun 17, 2014
13,704
Am I getting closer to the solution? (..of course I mean to the second equation which I could not find)

I have not yet developed the calculations in the photo, but I would like some feedback as to whether this superposition of effects is OK
View attachment 357305
Hi,

Yes that looks right.

One note I have to add however is why are the drawings drawn within a gray blob of randomish shape?
It's clearer to just post a rectangular area.
You'll also note that the last parenthesis on the bottom after the R4 is missing. Put that back and it will be complete.

I like the way you used "//" to indicate paralleling of two resistors. The way I do it is I first create those new resistors and then proceed, then later put them back in. It makes it a little clearer.
For example, R3+R4=R34, then we have R2//R34, and that can be R234.
Then we also have R12=R1//R2.
What this does is first makes all of the expressions the same.
v1=Vi*R234/(R234+R1)
v2= E2*R12/(R12+R34)
With this we can quickly see if we got it right as they are both the simple voltage dividers. Then later we substitute the original values.
If you are comfortable with your current method though stick with it.
 

Thread Starter

andrew74

Joined Jul 25, 2022
224
Hi,

Yes that looks right.

One note I have to add however is why are the drawings drawn within a gray blob of randomish shape?
It's clearer to just post a rectangular area.
You'll also note that the last parenthesis on the bottom after the R4 is missing. Put that back and it will be complete.

I like the way you used "//" to indicate paralleling of two resistors. The way I do it is I first create those new resistors and then proceed, then later put them back in. It makes it a little clearer.
For example, R3+R4=R34, then we have R2//R34, and that can be R234.
Then we also have R12=R1//R2.
What this does is first makes all of the expressions the same.
v1=Vi*R234/(R234+R1)
v2= E2*R12/(R12+R34)
With this we can quickly see if we got it right as they are both the simple voltage dividers. Then later we substitute the original values.
If you are comfortable with your current method though stick with it.
Yes, I get:

v1=Vi*R234/(R234+R1)
v2= E2*R12/(R12+R34)

As for drawing, I use the tablet for convenience and speed so no straight lines come out, but I make sure everything is as clear as possible

We have the two expressions for the thresholds: Vz1-Vh and Vz1+Vh ... but I don't quite understand where Vh comes from, how I choose it, and why
 

MrAl

Joined Jun 17, 2014
13,704
Yes, I get:

v1=Vi*R234/(R234+R1)
v2= E2*R12/(R12+R34)

As for drawing, I use the tablet for convenience and speed so no straight lines come out, but I make sure everything is as clear as possible

We have the two expressions for the thresholds: Vz1-Vh and Vz1+Vh ... but I don't quite understand where Vh comes from, how I choose it, and why
Hi,

Vh stands for the hysteresis voltage, but in this case it is actually 1/2 of the total hysteresis voltage. So Vh+Vh is the total hysteresis voltage.

This is the voltage that forces the opamp/comparator to stay in one state or the other. That prevents it from oscillating back and forth between high and low. When the comparator threshold is reached the two inputs are considered equal, and then the output changes states. Now if the two inputs remained equal the slightest noise could flip the output back again, and then back again, and then back again, so it would oscillate. Including some hysteresis voltage, the input voltage is forced one way or the other in a direction which will hold the comparator in the state it just changed to. This helps to prevent it from flipping back to the previous state, and then back to the changed state, and repeating that over and over. That would be the unwanted oscillation. We try to prevent that by adding that hysteresis voltage. It is plus and minus because sometimes it has to pull the input positive and sometimes it has to pull the input negative in order to maintain the new state.

The hysteresis voltage is usually taken to be the entire change from -Vh to +Vh, and that would just called say VH. The problem with that is we don't know how much is applied to each polarity. If we consider both polarities, that gives us more control no matter what the previous and next states happen to be.
In my numerical example I used a small voltage but you can make it larger. Just have to verify it is not too much.

Another example might be:
When the input reaches +4v the output flips from 0 to 12 volts. When the input reaches +1 volts the output flips from 12 to 0 volts.
The total hysteresis would be 4 minus 1 which is 3 volts, so half of that would be 1.5 volts.

Another example:
When the input reaches +10v the output flips from 0 to 12 volts. When the input goes down to +6v the output flips from 12 to 0 volts.
The total hysteresis there would be 10 minus 6 which is 4 volts, half of that is 2 volts. That means the center trip point is at 8 volts because 10 minus 2 is 8, and 6 plus 2 is also 8.
If we reduced the Vh to just 1 volt, then we would have the trips at +9v and +7 volts, with total hysteresis being 2 volts now. The center point remains at 8 volts.

In most cases the total hysteresis voltage does not have to be very large. Even 1 volt is enough in many cases. You may need it higher though if the relay energize/de-energize causes a lot of electrical noise.
 

Thread Starter

andrew74

Joined Jul 25, 2022
224
Hi,

Vh stands for the hysteresis voltage, but in this case it is actually 1/2 of the total hysteresis voltage. So Vh+Vh is the total hysteresis voltage.

This is the voltage that forces the opamp/comparator to stay in one state or the other. That prevents it from oscillating back and forth between high and low. When the comparator threshold is reached the two inputs are considered equal, and then the output changes states. Now if the two inputs remained equal the slightest noise could flip the output back again, and then back again, and then back again, so it would oscillate. Including some hysteresis voltage, the input voltage is forced one way or the other in a direction which will hold the comparator in the state it just changed to. This helps to prevent it from flipping back to the previous state, and then back to the changed state, and repeating that over and over. That would be the unwanted oscillation. We try to prevent that by adding that hysteresis voltage. It is plus and minus because sometimes it has to pull the input positive and sometimes it has to pull the input negative in order to maintain the new state.

The hysteresis voltage is usually taken to be the entire change from -Vh to +Vh, and that would just called say VH. The problem with that is we don't know how much is applied to each polarity. If we consider both polarities, that gives us more control no matter what the previous and next states happen to be.
In my numerical example I used a small voltage but you can make it larger. Just have to verify it is not too much.

Another example might be:
When the input reaches +4v the output flips from 0 to 12 volts. When the input reaches +1 volts the output flips from 12 to 0 volts.
The total hysteresis would be 4 minus 1 which is 3 volts, so half of that would be 1.5 volts.

Another example:
When the input reaches +10v the output flips from 0 to 12 volts. When the input goes down to +6v the output flips from 12 to 0 volts.
The total hysteresis there would be 10 minus 6 which is 4 volts, half of that is 2 volts. That means the center trip point is at 8 volts because 10 minus 2 is 8, and 6 plus 2 is also 8.
If we reduced the Vh to just 1 volt, then we would have the trips at +9v and +7 volts, with total hysteresis being 2 volts now. The center point remains at 8 volts.

In most cases the total hysteresis voltage does not have to be very large. Even 1 volt is enough in many cases. You may need it higher though if the relay energize/de-energize causes a lot of electrical noise.
As always, thank you for the detailed responses.

1) Vz2 should be 36V in the case the LM393?
2) I still don't understand, however, why you put this circuit after the load, that is, in series with it. If it comes inrush current, it will inevitably cover the load first and then trip the comparator etc. Let's look again at the picture in post #42
3) The Q1 transistor based on what would you choose it?
 

MrAl

Joined Jun 17, 2014
13,704
Hello again,

NOTE: Originally I had forgotten to upload the new drawing. I just did that now.

I am including a new drawing to clarify a few things like the difference between Vs and Vi as shown. Vs is the actual input, while Vi is after the load. Rs is the series resistor but if a thermistor works ok that would be ok too probably. It has to have a low value.

[1]
Vz2 has to be less than the voltage that powers the comparator. 10v would probably be good with a 12v power source as shown.

[2]
Not sure why you question this, but the load position was changed because the resistor divider uses ground as a reference, and that divider is what senses the voltage across Rs. We can't have the load connected to directly to ground until the relay closes. That's because we have to have the sense resistor Rs connected to ground so the divider can sense the voltage across Rs. That's what detects the spike in current.
If this is not acceptable then we have to work out a new circuit with high side current sensing, which is usually not as easy.

[3]
Q1 ratings are based mostly on three things:
a. Current draw of the relay coil when it is energized, because the transistor has to be able to handle the full coil current without damage.
b. Beta, because the current IB times the Beta has to be close to the relay coil current in 'a' above. The Beta would be assumed to be just 10 here, but that means the transistor has to have high enough raw Beta to allow that much forced Beta when the relay coil is energized.
c. The max voltage expected, plus some margin so the transistor does not blow out. Probably a 40v CE rating would be good enough. Even a 2N2222 or 2N4401 would probably work but we don't know the rating of the coil current of the relay yet, or did you post that somewhere already?

There are a couple assumptions here that would be proved when the circuit is tested in real life.
One is that we don't need a resistor between the base of Q1 and the output of the comparator in order to make the hysteresis more effect during a transition. If not then we have to add a resistor in series with the base.
Another is that the relay itself provides enough delay time. If not, we have to add a delay.
 

Attachments

Last edited:

MrAl

Joined Jun 17, 2014
13,704
Hello again,

Here is an updated schematic showing the relationships between the current sensing and the ground connections. This helps to explain why the load is in series with the sensing circuit. The red arrows show all the nodes that are connected that are involved in sensing current.
The divider has to sense the voltage across Rs when the circuit is first connected therefore the grounds have to be the same.
 

Thread Starter

andrew74

Joined Jul 25, 2022
224
Hello again,

Here is an updated schematic showing the relationships between the current sensing and the ground connections. This helps to explain why the load is in series with the sensing circuit. The red arrows show all the nodes that are connected that are involved in sensing current.
The divider has to sense the voltage across Rs when the circuit is first connected therefore the grounds have to be the same.
Thank you as always for your reply, and sorry for the delay, I am often away on business.
Are you sure you uploaded the schematic?
Is it the one you posted in #49?
If so, I only see one red arrow, but you mentioned red arrows.

When you talk about adding a resistor between the comparator output and the transistor input, do you mean that the resistor would introduce a small delay or attenuation in the transistor's response making the transition between the comparator states clearer?
.. so this help to keep the comparator in the state it has just reached, preventing small disturbances or variations from bringing it back (?)
 

MrAl

Joined Jun 17, 2014
13,704
Thank you as always for your reply, and sorry for the delay, I am often away on business.
Are you sure you uploaded the schematic?
Is it the one you posted in #49?
If so, I only see one red arrow, but you mentioned red arrows.

When you talk about adding a resistor between the comparator output and the transistor input, do you mean that the resistor would introduce a small delay or attenuation in the transistor's response making the transition between the comparator states clearer?
.. so this help to keep the comparator in the state it has just reached, preventing small disturbances or variations from bringing it back (?)
Hello,

Here is an updated schematic making it more clear how the connections are made.

The resistor (Rx in the new schematic) only acts to isolate the output of the comparator from the base current of the transistor so that the comparator output is not loaded when the relay first starts to turn on. This new resistor Rx may not be needed, but I am showing it now just in case.
 

Attachments

Top