Question about relay voltage

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Bigglez
Posts: 1282
Joined: Mon Oct 15, 2007 7:39 pm
Contact:

Post by Bigglez » Mon Mar 17, 2008 9:33 am

Greetings Mrai,
MrAl wrote:It looks like you are using Switchcad? Nice simulator too.
Yes, I'd encourage everyone to download and install
this free software from Linear Tech. (In the future we
can share the RAW files - much better than capturing
screen shot graphics).

Download (7.5Mb)
MrAl wrote:You can also do a sim with the diode connected to
see how much longer the pulse lasts with the catch diode, but you also need to add some series resistance (say 100 ohms) to that coil to simulate a real world relay coil (0.001 ohms gives rise to 12000amps)
I may have those plots ready to go. We know from the OP
that the coil is 90ohms and draws a measured 133mA
from a 12V source. I did add another 90 ohms in series
with the diode and confirm that the coil voltage doubles!

Also, as predicted (after Dale and your posts) the coil
dumps a fixed amount of energy, but does so quicker
with a resistor in series with the diode
.
MrAl wrote:I tried several coil inductances, like 10mH and 100mH.
I figured the inductance would be rather high because the maker would want to generate enough force to pull the relay in and since F=k*A*N roughly, the more turns (N) the more force.
Agreed, but there's a financial incentive to reduce the
amount of costly copper wire in a high volume product.
MrAL wrote:In any case, if you do more simulations it
would be nice if you could share them here with us. The
waveform snapshots tell a lot about what's happening in
these circuits.
Comments Welcome!

Image
Image

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Mon Mar 17, 2008 9:46 am

Hi again Pete,

Oh yes, nice pics.
It would also be nice to see one with the 90 ohms in series with
the coil alone, with the diode for protection across both coil and R.
That would simulate the actual device and circuit pretty well.
It will of course also take longer to charge the coil so the MOSFET
will have to stay on longer to get that to happen, or else set initial
conditions to 133ma in the coil.
LEDs vs Bulbs, LEDs are winning.

Bigglez
Posts: 1282
Joined: Mon Oct 15, 2007 7:39 pm
Contact:

Post by Bigglez » Mon Mar 17, 2008 10:36 am

Greetings Mrai,
MrAl wrote:It would also be nice to see one with the 90 ohms
in series with the coil alone, with the diode for protection across
both coil and R.
The upper of the last two is exactly that, if I have
understood your request. The relay is an inductor
of 1e-3H with a DCR = 90ohms. These can't be
separated in the real world. The turn-off is 10us
into the sim. and the relay has stabilized at 133mA
(matching the OP's data).

One more plot, this time with a "real" relay (1mH
and 90ohms) and no diode. Notice the back-emf
reaches 500V, and lasts under 500ns HAD.
The coil current goes from pos 133mA from the battery
to neg 133mA (as Dale was first to point out), and
back to zero as the stored energy is lost.

I used the 1N4148 diode model while playing around
over the weekend, and it seems to hold up.
(It's really hard to let the smoke out of sim models...).

Image

Comments Welcome!

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Tue Mar 18, 2008 3:34 am

Hi again Peter,


Something seems wrong with this last pic. The current in the inductor
doesnt really go negative, or at least not that much, unless there is
also some capacitance to cause it to oscillate. There doesnt seem to
be any sizeable capacitance in this circuit so im wondering what the
intial conditions of the coil were set to. If the initial current is set
incorrectly the current might appear to swing like that.

So the question is, what is the initial current in the inductor set to?

ADDED A BIT LATER:
Ok, that negative current seems to be caused by the MOSFET capacitance
which appears to oscillate with the coil at some point after it's turned off.
One way of understanding this is to ask the question, "What is the circuit
path that this negative current takes?".
Of course this isnt really the normal operation anyway as a diode is
usually used and that clamps the voltage to a much lower level.
LEDs vs Bulbs, LEDs are winning.

Bigglez
Posts: 1282
Joined: Mon Oct 15, 2007 7:39 pm
Contact:

Post by Bigglez » Tue Mar 18, 2008 8:07 am

Greetings Mrai,
MrAl wrote:Something seems wrong with this last pic. The current in the inductor
doesnt really go negative, or at least not that much, unless there is
also some capacitance to cause it to oscillate.
I don't agree, take another look at the graph that I posted.

The inductor current is steady at plus 133mA until
the switch is turned off.

The current in the inductor reverses to reach neg 133mA,
and the voltage across the inductor rises sharply to plus 503V.

The current decreases to zero (middle of vertical axis)
at the same time that the inductor voltage falls to zero,
approx 11us after the switch off.

With a larger X axis sweep the current in the inductor
is seen to oscillate, and as you pointed out, this is the
resonance of the coil and circuit stray capacitance
(mostly the FET). The damped oscillation ends after
approx 50us.

I can post an expanded graph or better yet the RAW
file from the simulation.

Comments Welcome!

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Tue Mar 18, 2008 11:33 am

Hi Peter,

You quoted something that was later corrected already.
I pointed out where the negative current went.

The thing is though, the graph is misleading because that negative
current is not one of the main points of the circuit. It happens because
of the MOSFET alone, and without that the current wont go negative.
Not only that, the time period where it does go negative is short
relative to the circuit and so i believe it is not a good idea to dwell
too long on this current or to think it's very important.
The more important points are that the coil energy dissipates
faster when allowing higher coil voltages, and that the higher
the faster, although high voltages can kill other parts. The high
voltage could easily kill a 50v MOSFET even though 50v is more
than 4 times the Vcc supply voltage of 12vdc. This alone means
that this circuit is not possible, or at least very impractical without
some sort of catch diode or at least a resistor or something
in parallel with the coil to limit the high voltage spike.
Also, that 500v peak is not something you can count on, it can be
100v, 500v, or 5000v depending on the other parts of the circuit that
just happen to be there.
Dont you agree?
LEDs vs Bulbs, LEDs are winning.

Bigglez
Posts: 1282
Joined: Mon Oct 15, 2007 7:39 pm
Contact:

Post by Bigglez » Tue Mar 18, 2008 12:33 pm

Greetings mrai,
MrAl wrote:The thing is though, the graph is misleading
because that negative current is not one of the main points
of the circuit. It happens because of the MOSFET alone,
and without that the current wont go negative.
That is counter-intuitive. The inductor is in a
magnetic field that is rapidly changing, thus
inducing a voltage across it. The coil current will indeed
oppose the initial current that built the field.

Had this been a capacitor circuit, charging would
result in stored energy with fixed voltage and no
current flow (except for leakage).

The inductor would also remain charged with fixed
current and no voltage, but such a circuit is not
practical.

When the inductor charging voltage was removed,
the collapsing field would reverse the polarity of
the terminals and the voltage would rise (to infinity)
until current flows, and the coil energy is dissipated.

The magnitude of the current is identical but the
polarity (sign) is opposite.

In the simulation circuit there is no path for
current except to charge the capacitance,
which it is agreed is parasitic to both the coil
and the FET (and strays).

This is a lossy resonant circuit. With optimization
we would have a shock-excited-resonator. The
energy would swing back and forth from inductor
to capacitor, until all is used up overcoming
circuit losses.
As you may know, the discovery of this was the
life's work of Nikola Tesla.
MrAl wrote:The more important points are that the coil energy dissipates
faster when allowing higher coil voltages, and that the higher
the faster, although high voltages can kill other parts. The high
voltage could easily kill a 50v MOSFET even though 50v is more
than 4 times the Vcc supply voltage of 12vdc.
I would think the goal is to manage the release of the
stored energy to not stress the other components.

For the OP's relay driver this is a simple back-emf
diode, which protects the transistor and limits the
radiated energy that may otherwise interfere with
the car radio or upset other circuitry.
MrAl wrote:Also, that 500v peak is not something
you can count on, it can be 100v, 500v, or 5000v
depending on the other parts of the circuit that
just happen to be there.
Actually, the 503V peak is very real for the models
used in the simulation. In practice the voltage may
be quite different, and without careful design it
would threaten the other components.

As shown earlier, with no snubber and practically
zero coil resistance the back-emf is over 70,000 volts.

The use of an inductor to store energy, and
release it into a different circuit impedance, thus
changing the voltage and current available is the
basis for a SMPS (switch mode power supply).
Output voltages higher than input are quite
practical in a flyback converter with only one
inductor (and two switches, one of which could be
a diode).

I think you and I are on the same page, and the
topic has been thoroughly reviewed, well beyond the
OPs inquiry. The take away for me is that in
simulation the magnitude of the circulating currents
and pulse voltages can be quantified, and neither
is trivial.

Comments Welcome!

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Wed Mar 19, 2008 5:41 am

Hi again Peter,

All i am saying is that the negative current is a secondary effect,
and should not be something to dwell on. Connect the circuit the
way it should be connected and see what happens then.
Also, saying that the inductor current goes negative because the
inductor wants to make it negative is not correct either. This happens
because we happen to have a capacitance also connected in the circuit,
and it's that capacitance that causes the negative current, not the
inductor itself. This is part of why i suggest that the appearance of
the negative current is misleading.
Replace the MOSFET with a switch that has no capacitance and the
true theory of the relay coil will become more apparent.

Im sure there is going to be some small capacitance in the relay coil
itself too which would cause self resonance, but we dont want to dwell
on that point either because that's not part of the basic operation.
The basic operation only involves an inductor, a voltage source,
and a switch, but of course the inductor has a series resistance that
limits current when the device is 'on'. After looking at the basic operation
with no catch diode, it becomes apparent that some catch diode is
a good idea. That's the basic operation...no negative current or other
phenomena that clouds the main issue.

This doesnt mean it's a totally bad idea to analyze the circuit with
the extra capacitance though, but it might lead to misconceptions about
how this basic circuit works, especially when that negative current seems
to take on a significance that is on par with the main drive current, which
is what seems to be implied by your snapshot of the current without
a catch diode.

In other words, the basic current flow should look like this:

Image

Code: Select all

_______________
               *
                 *
                   *
                     *
                        *
                            *
                                *
                                       *
                                                  *
                                                                    ____________

Or, with no series resistance, a decreasing ramp.


Remember im not saying that there will never be any reverse current,
but it will be smaller than shown previously and it's caused by the
capacitor not by the inductor.

I hope this makes my point a little more clear.
If not, i guess i could post a few waveforms if you would like to
see some. You've been good enough to post quite a few so i guess
i could do the same.
LEDs vs Bulbs, LEDs are winning.

Bigglez
Posts: 1282
Joined: Mon Oct 15, 2007 7:39 pm
Contact:

Post by Bigglez » Wed Mar 19, 2008 11:45 am

Greetings Mrai,
I'm not disagreeing with you. The goal was to use
simulation tools to examine the magnitude of the
energy that's stored in the relay coil, and efficacy
of various snubbers.
MrAl wrote:Connect the circuit the
way it should be connected and see what happens then.
I think we've done that already.
MrAl wrote:Also, saying that the inductor current goes negative because the
inductor wants to make it negative is not correct either. This happens
because we happen to have a capacitance also connected in the circuit,
and it's that capacitance that causes the negative current, not the
inductor itself.
A practical circuit won't be just "inductance", so stray
capacitance and DCR of the coil (and other secondary
effects aka "windage and friction") are needed for
the simulation to have any value.
MrAl wrote:This doesnt mean it's a totally bad idea to analyze the circuit with
the extra capacitance though, but it might lead to misconceptions about
how this basic circuit works, especially when that negative current seems
to take on a significance that is on par with the main drive current, which
is what seems to be implied by your snapshot of the current without
a catch diode.
Go back and look at the plots I've posted. The current in
the coil does decrease exponentially to zero unless influenced
by the circuit capacitance. By varying the ratio of the
capacitance to inductance the current can be altered to
decay and only be positive, or to oscillate and have both
positive and negative current of almost equal magnitude.

I think we've beaten thi one to death. Let's move on.

Comments Welcome!

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Wed Mar 19, 2008 1:12 pm

Hi Peter,

BTW, thanks for the chat about this circuit. Interesting...
Bigglez wrote:Greetings Mrai,
A practical circuit won't be just "inductance", so stray
capacitance and DCR of the coil (and other secondary
effects aka "windage and friction") are needed for
the simulation to have any value.
I hate to say this, but that's exactly the opposite of what
i am trying to say here. The circuit is 99 percent inductance
and 1 percent capacitance in the real world.
I wont push this point any farther however, out of respect for
your opinion and your very very useful input too. It's obvious
now that you want to definitely include the capacitance too in
any analysis, and im ok with that too because after all there
will be some in any circuit, so in a way we do agree after all
:smile:
I think we've beaten this one to death. Let's move on.
Ok sure, i have to agree with that too :smile:
Also, i cant wait now until we get started on the new project.
Should be interesting.

That said, i look forward to discussing more circuit with you in
the future, and good luck with your new ones.
LEDs vs Bulbs, LEDs are winning.

zmwworm
Posts: 41
Joined: Wed Dec 20, 2006 4:26 pm
Location: Bonners Ferry, ID
Contact:

Post by zmwworm » Thu Mar 20, 2008 8:35 pm

MrAl wrote:Replace the MOSFET with a switch that has no capacitance and the true theory of the relay coil will become more apparent.
Not to draw a topic beyond its usefullness, but I am using a switch. If I had MOSFETs in mind then I probably would not need a relay at all, right? Analyzing a MOSFET's effect might help hypothetical situations, but not mine. By the way, I ended up getting some 2.5A 1000V rectifier diodes partly because of a poor selection and partly because I was late for work. These are way bigger than I need, right?

User avatar
Bob Scott
Posts: 1192
Joined: Wed Nov 20, 2002 1:01 am
Location: Vancouver, BC
Contact:

Post by Bob Scott » Thu Mar 20, 2008 10:27 pm

zmwworm wrote:These are way bigger than I need, right?
Yea, they'll last a thousand years, but I'm on pins and needles waiting to see what the added junction capacitance does to the simulation!

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Fri Mar 21, 2008 7:18 am

Hi Bob,

Well, the junction capacitance isnt that large, so the effect is going
to be minimal, especially when compared to the rather large relay
inductance. This means any oscillations will be fast.
Of course there is a short current pulse through the diode when
the relay is first turned on because of the junction capacitance,
but that's true of most diodes in any application where the reverse
voltage suddenly rises (when the switch it turned on).
LEDs vs Bulbs, LEDs are winning.

dyarker
Posts: 1752
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Post by dyarker » Fri Mar 21, 2008 7:23 am

"If I had MOSFETs in mind then I probably would not need a relay at all, right?"

Right.

"These are way bigger than I need, right?"

Ditto. Maybe even way, WAY, bigger. As long as you have them, might as well use them.

C U L -
Dale Y

User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Post by MrAl » Fri Mar 21, 2008 8:09 am

Hi again,


I forgot to mention that it is also believed that the open circuit coil
voltage (when being turned off) influences the acceleration of the
opening armature, meaning the contacts can open faster with an
allowed higher coil voltage at turnoff time. Faster opening contacts
sometimes reduces wear caused by pitting or even partial welding
of the contacts simply because the contacts can move away from
each other at a faster rate which reduces arc time.

The way to acheive this faster turn off time is to allow the coil
voltage to go higher, but not so high that it would cause a problem
with other parts of the circuit as to their voltage handling ability.
A zener in series with a diode is a good tradeoff between higher
voltage and still having some protection for the other parts of the
circuit. The higher the voltage the better (other parts withstanding)
but twice the source votlage is probably good enough. Thus, a 24v
zener in series with a 1N4001 diode (or the 2.5 amp diode mentioned
previously) would be very good.

The following shows how much faster this can be. With the single
diode there is a rather slow turnoff (typical relay inductance).
With the addition of the zener it's about 4 times faster.


Image


The following shows the voltage from a different point of view
(and the source voltage was lowered to 12v).
That oscillation is due to the internal capacitance of the 1N4001 diode,
and if a Schottky diode is used instead most of that disappears.


Image
LEDs vs Bulbs, LEDs are winning.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests