Searching \ for '[OT] Solenoid Driver' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/motors.htm?key=solenoid
Search entire site for: 'Solenoid Driver'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Solenoid Driver'
2000\02\04@074821 by paulb

flavicon
face
Harold M Hallikainen wrote:

> You can treat the relay coil as an inductor,

 That's exactly the idea - you use it as *the* inductor in a switchmode
converter.

> so when you turn the FET on and place a voltage across it, the current
> linearly ramps up until you either hit core saturation (making the
> inductance drop and the current ramp up faster), or the current limit
> imposed by the resistance of the coil.

 Now of course, for this application, you absolutely want *neither* of
these to happen; your "on" time must be short enough to prevent this.

> When the FET is opened, the coil current will ramp down, through the
> inductor.  I think it's important that the FET be off long enough to
> allow the current to ramp all the way down.

 Sorry, that's the very thing you want it *not* to do.

> If it's not off that long, the coil current will start ramping up from
> the ending current when the FET comes back on.

 Try to remember the goal of the exercise *in this case*.  You want the
same current to flow *as if* it were excited by 12 or 14 volts.  You
want a steady current.  Some fluctuation of the current is allowable,
but you must balance certain effects.

 If the current drops toward zero, the pull of the solenoid *also*
drops toward zero.  If you compensate this by making the current peak
higher than the design value, then not only will you introduce a strong
AC component (hum/ buzz/ whistle/ whine) into the thrust provided by the
solenoid, but you will overheat the solenoid as well.

 Why?  Because the heating effect is proportional to the square of the
current or voltage.  Applying a current/ voltage varying between zero
and twice nominal causes double the current to flow for half the time.
If you consider this for a moment, you will see that while the average
thrust (proportional to current) is nominal, the average power
dissipated (proportional to square of current) is quadrupled for half
the time, and is overall double.  This is a very poor design approach.

 So, what you *actually* want is a current waveform varying between
say, 80% and 120% or better, 90% and 110% of the nominal current.  To
do this, you will need a frequency sufficiently high that with the FET
ON, the inductance "charges" (ramps up) only a little and similarly,
with the FET OFF, the inductance "discharges" (ramps down) only a little
as well.

 The duty cycle will be about 17%; during the ON time the current is
drawn from the 80V supply, whilst during the OFF time, it commutates via
the diode.  The current in the coil stays relatively constant at the
desired value, while the current from the supply occurs in pulses of
this same value and multiplied by the supply voltage and the duty cycle,
equates to (or at least approximates) the nominal power dissipated by
the coil (of course!).

> You could probably experimentally watch the FET current waveform
> (perhaps with a small resistor in the source)

 Indeed!

> to insure that it ramps up from zero each time the FET comes on, then
> throw a little extra off-time in there just for sure.

 Again, exactly the *opposite* of what is required.

>  Also, have a look at the Burr-Brown DRV102. This solenoid/valve
> driver chip can handle 60V and 2.7A.  It has an internal adjustable
> PWM generator running at 24 kHz. It also has an adjustable "kick
> start" where the duty cycle is 100% for some period so the solenoid is
> engaged with high power, then backs off to hold it with PWM.
> Interesting chip...

 And what do its application notes suggest?

 This application is a switchmode *current* regulator instead of a
voltage regulator, so the rules are somewhat different.

Wagner Lipnharski wrote:

> There is another issue, the oscillator OFF control, or the PIC PWM OFF
> situation to the FET, should allow the FET to stay in OFF even when
> PIC is in reset.  So, I would suggest a very good fail safe design (I
> already used it to control my Styrofoam machine PWM thermal wire
> output drive):

 Component missing!

                      Vcc
                       |
                      LOAD
                       |
PWM----||--+---+----|FET
          |   -        |
          R   ^        |
          |   |        |
         Gnd Gnd      Gnd
--
 Cheers,
       Paul B.

2000\02\04@092801 by Harold Hallikainen

picon face
On Fri, 4 Feb 2000 23:46:55 +1100 "Paul B. Webster VK2BZC"
<spam_OUTpaulbTakeThisOuTspamMIDCOAST.COM.AU> writes:
>
>
> > When the FET is opened, the coil current will ramp down, through
> the
> > inductor.  I think it's important that the FET be off long enough
> to
> > allow the current to ramp all the way down.
>
>   Sorry, that's the very thing you want it *not* to do.
>


       My concern here is that without some sort of feedback, this "continuous
mode" switching will drift one way or another, possibly having the coil
current increase a bit more each time the FET is on. I agree that a small
current variation in continuous mode would make the solenoid quieter, but
can you do this without feedback? How about feedback of a current sense
(either a small resistor in the source lead or use of a SenseFET) so that
when the current goes above some level the FET is turned off, below some
level it's turned back on? No duty cycle calculations required... and the
hysteresis would determine the switching frequency.

Harold

________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
dl.http://www.juno.com/get/tagj.

2000\02\04@100122 by Chris Eddy

flavicon
face
You guys are confusing me.  If I read this right, you just want to regulate current
through the inductor, right?  If you regulate current, the voltage drop will be
relatively stable, granting temperature will have a slight effect.  Then you have
regulated power within reason.  So add a small resistor in series with the inductor
to sense current, and use one of two methods to regulate current.

One, use a Unitrode switch mode controller, little 8 pin job.  They make a long
list of varieties.  They directly accept the current feedback resistor drop to clip
at peak current, but you would have to experiment with amplifying that Rdrop into a
voltage to change it from voltage feedback mode to current feedback.

Two, use a single op-amp with one pin driven by the voltage on the resistor
(possibly gained up).  Then you add an RC delay in that feedback loop.  The OP-amp
output has a FET as a power driver.  When you add the RC, you make it unstable, and
instead of a linear current regulator, it falls into self oscillation.  It won't
have the steady frequency of an official switch mode controller, but it will have a
frequency that varies as it adjusts to contentment.

Chris Eddy
Pioneer Microsystems, Inc.

Harold Hallikainen wrote:

{Quote hidden}

2000\02\04@104033 by Jay

flavicon
face
Let me just say thank you to all who have posted on this topic, I have
learned a great deal.  I wanted to give you a little feedback on your
ideas...I implemented the simple FET driven PWM design, and took data at
several different frequencies and duty cycles.  I inserted a 1ohm resistor
in series with the coil/diode pair to determine the current profile from
power supply, then put the resistor inside the diode terminals in series
with coil.  Here is basically what I noticed:

at 200Hz 25% duty cycle, PS current ramp from 300mA to 600mA
at 300Hz 25% duty cycle, PS current ramp from 300mA to 550mA
at 2kHz 36% duty cycle, PS current ramp from 400mA to 550mA
* any less on the stated duty cycle would not allow the solenoid to engage

Basic Power Supply Current Profile:

Current
   ^
   |         X                         X
   |       X  X                      X  X
   |     X    X                    X    X
   |   X      X                  X      X
   |   X      X                  X      X
   |   X      X                  X      X
0mA +--------------------------------------------> Time
       |<---->|
          |
          '-------------"ON" pulse period


Basic Coil Current Profile (200Hz):

Current(mA)
   ^
660 |          X                        X
   |        X    X                   X    X
   |       X         X              X        X
   |     X               X        X
   |    X                     X  X
200 |X X X                        X
   |
0mA +--------------------------------------------> Time
        |<---->|
            |
            '-------------"ON" pulse period



Basic Coil Current Profile (2kHz):

Current(mA)
   ^
   |
   |
540 |          X                       X
   |       X       X               X       X
   |    X               X       X               X
370 |X X X                   X   X
   |
   |
0mA +--------------------------------------------> Time
        |<---->|
            |
            '-------------"ON" pulse period


As was mentioned, as the frequency was increased, the current profile would
flatten out, which would be the desired effect.  This is a very nice
technique, and again many thanks.  One of the design tradeoffs that should
be considered if using this technique is the audible ringing given these
audible frequencies, and also the vibration at the lower frequencies (Paul I
think you mentioned this as well as heat buildup which I noticed in the
lower frequencies).  But I was successful at running this at 20kHz 25% duty,
with no audible content, on no vibration that I could feel, less heat
buildup as well.  And as Paul suggests, the current I was able to obtain
rippled only a small amount around the nominal 500mA.


Jay

2000\02\04@114321 by wagner

flavicon
face
Paul, you are correct.
In my previous post I recommended to wait the current to stop, but I had
a "transformer" image in mind (coils, magnetic field...), in this case,
as much constant the current, better. Thanks for get us back to reality.

The following circuit using an op-amp or comparator would control
current (500mA) upon a 5V square wave. The resistor divider 10k/560
actually generates 265mV, but your PIC or oscillator will also not
generate exactly 5V. Increasing the 560 Ohms resistor value would
increase the average current over the LOAD. The square wave is necessary
to create a non-linear current regulation.

Again, costs still below $12.


                                +80V
                                 |
                                LOAD
Square Wave                       |
0-5V -_-_-_                       |
o------.         .--------o--- FET
      |         |        |       |
      |        / \       R 10k   |
 10k  R       /   \      |       |
      |      /_____\    Gnd      |
      |       +   -              |
      |       |   |              |
      o-------'   '------o-------o 250mV @ 500mA
      | 250mV            |       |
      | -_-_             |       |
 560  R                 ---      R 0.5 Ohm 1/2W
      |                 ---      |
      |                  |       |
     Gnd                Gnd     Gnd


"Paul B. Webster VK2BZC" wrote:
>   Try to remember the goal of the exercise *in this case*.  You want the
> same current to flow *as if* it were excited by 12 or 14 volts.  You
> want a steady current.  Some fluctuation of the current is allowable,
> but you must balance certain effects.

2000\02\04@125859 by William Chops Westfield

face picon face
   If you regulate current, the voltage drop will be relatively stable,
   granting temperature will have a slight effect.  Then you have
   regulated power within reason.  So add a small resistor in series with
   the inductor to sense current, and use one of two methods to regulate
   current.

   One, use a Unitrode switch mode controller, little 8 pin job.  They
   make a long list of varieties.

   Two, use a single op-amp with one pin driven by the voltage on the
   resistor (possibly gained up).

The point you're missing is that "we" want to treat this as a constant load
(it is, right?) and simplify the circuit by not having ANY feedback path.
We SHOULD be able to get constant current/voltage/power (with some greater
ripple than a SMP would normally provide) by simply providing a fixed
frequency and pulse width to the relay coil.  If a PIC is already driving
a mosfet on/off, it should also be able to drive it at the desired PW and
Freq.  We're just arguing over how one should calculate the values.

BillW

2000\02\04@152046 by paulb

flavicon
face
Harold Hallikainen wrote:

>  My concern here is that without some sort of feedback, this
> "continuous mode" switching will drift one way or another, possibly
> having the coil current increase a bit more each time the FET is on.

 I can see why you might think this, but if you consider it carefully,
the ramp is exponential, same as a capacitor charging except that
voltage swaps for current.  So, in the same manner (and it may be
worthwhile considering how this *does* happen) a capacitor adapts to the
voltage corresponding to the duty cycle in a voltage PWM circuit, the
current in this circuit adapts also.

 It is in fact, the *exact* analog of the PWM everyone uses already,
so the same considerations, including using the highest frequency
practical and the highest inductance available (though in this case,
fixed) to minimise ripple, apply.
--
 Cheers,
       Paul B.

2000\02\05@094526 by Donald L Burdette

picon face
Wagner Lipnharski wrote:

>The following circuit using an op-amp or comparator would control
>current (500mA) upon a 5V square wave. The resistor divider 10k/560
>actually generates 265mV, but your PIC or oscillator will also not
>generate exactly 5V. Increasing the 560 Ohms resistor value would
>increase the average current over the LOAD. The square wave is necessary
>to create a non-linear current regulation.
>
>Again, costs still below $12.
<snip...>

Wagner -

Nice circuit.  But why use a square wave?  The way I see it, the op-amp
with lagging feedback created by the R-C will create the PWM for you.
I'd just apply 5V to turn it on, 0V to turn it off.  Plus I'd apply a
little bias at the inverting (-) input of the op-amp to make sure that it
is really off when you turn it off.

And I'd say the cost is around $1.50, not merely "below $12".

One problem is that it doesn't measure the average solenoid current.  It
averages solenoid current when the FET is on with zero when the FET is
off.  That makes it regulate poorly if the supply voltage or load
changes, but maybe that's not an issue.

I have seen a circuit very similar to this that was used by a large
automotive manufacturer.  Unfortunately, they left the R-C out, and the
PWM frequency was limited only by the parasitic R, L and C, and the speed
of the op-amp.  It worked, but I thought it was a terrible design.

Don

2000\02\05@125541 by Wagner Lipnharski

flavicon
face
Donald L Burdette wrote:
> Nice circuit.  But why use a square wave?  The way I see it, the op-amp
> with lagging feedback created by the R-C will create the PWM for you.
> I'd just apply 5V to turn it on, 0V to turn it off.  Plus I'd apply a
> little bias at the inverting (-) input of the op-amp to make sure that it
> is really off when you turn it off.

The square wave at that circuit allows it to be used with general loads,
as you can see there "load" is not an inductor.  If "load" is resistive
you will need the square wave to avoid the circuit to provide a linear
current regulation (we don't want the FET to overheat).

Of course auto-oscillating circuits are common and this one will not be
an exception, but in power drivers I don't trust them so much, since
they can change frequency based on load change. Also, it is much easier
to find carbonized power transistors in such circuits than in the ones
controlled by external frequency signal.

The common use for solenoids are to drag mechanics, and it involves
changes in the inductance during the operation of such devices.  If the
auto-osc frequency will depend on the inductance as one of the osc
components, the osc freq will not be stable. This effect will be more
noticeable before and after the solenoids latches.

Of course, we always should remember that the words "simple" and "easy"
are not synonyms.

Wagner.

2000\02\05@135820 by Dwayne Reid
flavicon
face
>Let me just say thank you to all who have posted on this topic, I have
>learned a great deal.

> One of the design tradeoffs that should
>be considered if using this technique is the audible ringing given these
>audible frequencies, and also the vibration at the lower frequencies

Do keep in mind that a little vibration may be a good thing.  One of the
building blocks we build for use in our oven control systems is a 4 channel
modulating valve card that does current drive to 4 individual modulating
valves.  I use a PWM frequency of 500 Hz because the vibration reduces the
'stickyness' of the valve - this reduces the mechanical hysterisis.  It
seems to make a huge difference when tuning the PID controllers.

dwayne


Dwayne Reid   <dwaynerspamKILLspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 16 years of Engineering Innovation (1984 - 2000)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Do NOT send unsolicited commercial email to this email address.
My posting messages to Usenet neither grants consent to receive
unsolicited commercial email nor is intended to solicit commercial
email.

2000\02\06@084458 by Donald L Burdette

picon face
Wagner Lipnharski wrote:

>The square wave at that circuit allows it to be used with general loads,
>as you can see there "load" is not an inductor.  If "load" is resistive
>you will need the square wave to avoid the circuit to provide a linear
>current regulation (we don't want the FET to overheat).

But with the auto-oscillation capability, the circuit cannot provide
linear current regulation, no matter what the nature of the load.

If you're going to provide an external PWM, why use the RC network?  The
two will fight each other and make the operation unpredictable.  Unless
you are going to be lazy and not control the external PWM properly, in
which case, what advantage does it provide?

OOPS!  I just thought it through again, and this circuit COULD get into
linear mode.  It would be very unstable with the high loop gain and
lagging feedback, but the input capacitance of the FET might compensate
for that.  It would depend a lot on the op-amp and FET.   What this
circuit really needs is some positive feedback (hysteresis) to GUARANTEE
proper oscillation.  Maybe that's why you've seen 'carbonized power
transistors'.

Don

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