Searching \ for '[OT] Solenoid driver - need a few good ideas' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/io/motors.htm?key=solenoid
Search entire site for: 'Solenoid driver - need a few good ideas'.

Exact match. Not showing close matches.
'[OT] Solenoid driver - need a few good ideas'
2000\02\04@212751 by

There are several issues here.

If our purpose was to put the proper power into a resistor, we would use
80^2/28 = 229W as the power when the FET is on, and 14^2/28 = 7W as the
desired power.  A duty cycle of 7/229 = 3% would give us 7W in the
resistor.  For future reference, the average current is 80/28 * 3% = 87.5
mA (if you didn't round off the 3%).

However, this is a relay.  What we are really interested in is the 'pull'
of the electromagnet.  That is proportional to the average current.  So
what we want is an average of 0.5A.  Our 3% duty cycle gives us an
average current so low that the relay will probably never even pull in.

If we calculate what gives us the desired average current, the duty cycle
comes out 80/28 * DC = 0.5, or DC = 17.5%.  However, the power dissipated
in the coil is 0.5A * 80V = 40 W.  This will surely destroy the relay
coil.

A compromise duty cycle between 3% and 17.5% would not only deliver less
than the rated current, but also would deliver more than the rated power.

The correct solution takes advantage of the inductance.  The previous
examples assumed the inductance to be negligible.  For this assumption to
be valid, we would have to use a PWM frequency low enough that the
current in the coil would settle to V/R (80V/28ohms) in a small fraction
of the 'on' pulse time.  If that were the case, then the numbers we
calculated above would be nearly correct.  Conversely, if the frequency
is high enough that the 'current ramp' takes up a significant portion of
the on-time (or even all of it) , then the calculations above become very
poor reflections of reality, which fortunately is a good thing.

Contrary to what Wagner says, I believe the best solution is to make the
PWM frequency so high that the current in the coil changes very little
during a single on or off time.  This would make the circuit look like a
'continuous' mode switching power supply.  Continuous mode means that the
inductor current never reaches zero.  If the current in the coil reaches
zero, then the relay begins to release.  When the current rises again,
the relay will pull back in, causing a buzzing at the PWM frequency.  (By
the way, AC relays don't buzz at power line frequency because they are
built with a 'shaded pole' that maintains magnetic pull during the off
part of the phase.  DC relays will buzz with AC or rectified AC drive.)

How do we know the right frequency?  We suspect that the off time will be
much longer than the on time, so let's start there.  If there's 0.5A in
the coil when we turn off the FET drive, the current begins to ramp down.
The equation V = L *dI/dt is the basic equation for an inductor.
Rearranged, it is dI/dt = V/L.  We know that V = 0.5A * 28 ohms + 0.7V
for the diode.  I'll guess that the inductance of the coil is about 10mH.
Thus, dI/dt = 14.7V/.010H = 1470 V/H or 1470 A/Sec, or 1.47 A/mS, or
1.47mA/uS.  Let's say we don't want the current to change more than 10%.
That's 50mA.  At 1.47mA/uS, that would give us 50/1.47 = 34 uS.  This is
the maximum off time we can allow.  By similar calculation I get an on
time of 9.6 uS.  The maximum PWM period is 34 + 9.6 = 43.6 uS.  The
minimum PWM frequency is therefore 22.9 kHz, and the duty cycle is
9.6/43.6 = 22%.  A PWM frequency of 25 kHz should be both reasonable and
sufficient.  The duty cycle is independent of frequency.  How you
implement the PWM is up to you.

The minimum required frequency is inversely proportional to the
inductance of the coil.  I guessed it might be 10 mH.  If it were higher
than that, a lower frequency could be used, but 25 kHz is nice because it
ensures it is above the audible range.  If the inductance were lower, say
half, or 5 mH, the frequency would need to be higher (double, or 50 kHz),
or you could add inductance to make it 10 mH so it would work at 25 kHz..

I also declared a maximum of 10% change in inductor current.  It would
probably work pretty well to 30%, maybe even 50%, though the assumptions
of linear ramps get kind of far off at that point.  A max change of 50%
would allow a frequency of 5 kHz with 10 mH or 25 kHz with 2 mH.

Well, I've rambled long enough.  But I have one question - why is the
relay coil power so high?  Most DC relays run at around 1W or less.  Is
this some huge 100+ Amp relay?

Don

<x-flowed>At 09:26 PM 2/4/2000 -0500, you wrote:
>Contrary to what Wagner says, I believe the best solution is to make the
>PWM frequency so high that the current in the coil changes very little
>during a single on or off time.  This would make the circuit look like a
>'continuous' mode switching power supply.  Continuous mode means that the
>inductor current never reaches zero.  If the current in the coil reaches
>zero, then the relay begins to release.  When the current rises again,
>the relay will pull back in, causing a buzzing at the PWM frequency.  (By
>the way, AC relays don't buzz at power line frequency because they are
>built with a 'shaded pole' that maintains magnetic pull during the off
>part of the phase.  DC relays will buzz with AC or rectified AC drive.)

One note of experience I'd add to this - be sure to add a high-speed
"catch" diode
back-biased across the solenoid coil.  In a project quite some time back, I had
several large contactors to throw - I managed each through a "hard" on
cycle when
first turning on the coil - basically just leave the FET full-on for a
time, and then after
a bit switch over to PWMing.  The reason for this is the power to throw is
often (always?)
higher than the power to hold it down.

The reason for the diode, though, was to give current through the inductor
somewhere to
go - obviously if you're switching on and off, there will be interruptions,
and if the current
doesn't have a convenient path to flow through when the FET is off, the
open side of the
coil (the one into the transistor) will fly up and *poof* your FET just
became a resistive
lump of silicon in a pretty black package.  Oh yeah, and make sure the
diode is >fast<.
One of the FR80X series or something with similar switching times would be
my call.

ND Holmes
--------------------------------------------------------------------------
Nathan D. Holmes   maverickdrgw.net, ndholmesiastate.edu
122 Shepard #3  Box 328  Gilbert, IA 50105  Iowa State University - EE
http://www.drgw.net/~maverick   PH: 515-663-9368
-------------------------------------------------------------------------

</x-flowed>

Donald L Burdette wrote:
[snip]
> Well, I've rambled long enough.  But I have one question - why is the
> relay coil power so high?  Most DC relays run at around 1W or less.  Is
> this some huge 100+ Amp relay?

It is not a relay Don, it is a medium solenoid (14W).

Wagner

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...