effects of switching polarity on an electromagnet

Hi All,

I have an application for which I'd like to be able switch the polarity of an electromagnet at farily low frequencies (less than 10Hz, but variable). The magnet coil is 3.3 Ohms and my DC power souce provides

10A@24V, so about 8 amps running through the magnet. I'm thinking of using a DPDT relay, driven by some digital circuitry, to switch the magnet between both polarities.

I'm wondering if there are any potential issues to be aware of, given that this would approximate a bipolar square wave as a power souce. Since the polarity is switching, I can't use a shunting diode, but maybe a varistor would work to limit the inductive kick when the relay switches? Are there other concerns with this design (eddy currents)?

I'd really appreciate any general advice on how to proceed or ideas about alternative designs.

Thanks, Graham

Reply to
grindlay
Loading thread data ...

You need to measure the inductance of the magnet. Switching a big one in a short time is going to take a very impressive power supply, because V = L * dI/dt. If it's 1 H, and you want to switch it through +- 16 A in 10 ms, you're going to need to apply 1*16/.01 or 1.6 kV. It will also take fairly heroic measures to avoid the windings arcing over.

It's really quite easy to kill yourself this way, so be careful.

Cheers,

Phil Hobbs

Reply to
Phil Hobbs

Well, maybe 7.3 amps?

A simple resistor in parallel with the coil will limit the voltage spike (and help bleed off current). If you used a 13.2 ohm resistor you'd develop about 96 volts when the relay opened, at the cost of a couple of amps with the relay closed.

You could also do this with diodes to each power rail, so when either terminal of the coil rose above 24V or fell below ground a diode would conduct. This could be handled by a bridge rectifier if you wanted to save space -- and you could still put in a series resistor to raise the coil voltage above 24V to bring the coil current down.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Reply to
Tim Wescott

OK, Graham, go explore a circuit we call an H-bridge. . __________________________________ . | | | | . XXX _|_ _|_ XXX . | /_\\ /_\\ | | . '---+----, LOAD ,----+----' XXX = switch, . +---o o---+ e.g., a MOSFET . ,---+----' '----+----, . | _|_ _|_ | . XXX /_\\ /_\\ XXX . _|___|______________________|____|

These normally have reverse diodes to protect the switches.

Phil mentioned the issue of rapid switching. If you need this capability, add a set of series diodes to limit the current flow of each bridge-leg to its primary direction. Add another set of diodes with zeners in series, to limit the flyback voltage when you want to switch rapidly. See below. Open the turned-ON pair of switches (i.e., all the switches open), wait for the flyback voltage to settle, then close the other switch pair.

. H-bridge, with provision for rapid inductive-load shutoff. . _______________________________________________ . | | zener zener | | . XXX '-|>|--||--||------+ LOAD +---------------' XXX = switch, . +---o o---+ e.g., a MOSFET . ,------|>|------+ +---------------, . | | | | . XXX ,-||--' '--||-, XXX . _|___|_zener________________________zener_|___|

BTW, the zener voltages must be higher than the supply voltage. Make sure the zeners can handle the magnet's energy. Use what we call TVS, or Transient Voltage Suppressor zeners, these have slugs of copper on each side of the semiconductor die to absorb heat.

In practice, it may not be useful to use especially high-voltage zeners, because they only speed up the shutoff time, whereas the H-bridge supply voltage determines the startup time in the other direction. If you have a current-regulating bridge, you can use higher supply voltages to get faster startup time. But then the XXX elements are no longer switches, unless you're using a PWM. You can read up on the technology. As you can see, making rapid magnetic reversals can become fairly complicated, but it can be lots of fun. First educate yourself, and like Phil says, by all means, BE CAREFUL! One hand behind your back, tucked into your belt, whenever the lids are off and the power is on.

--
 Thanks,
    - Win
Reply to
Winfield Hill

using a relay to switch at 10Hz does not seem like a good idea... Mark

Reply to
Mark

A relay would be a problem because of arcing of the contacts, so it has to be a semiconductor H-bridge.

A few years ago I was asked to look into ways of reversing the current in a 180mH/8A/1.5ohm inductor, (5.76 Joules!), as reasonably quickly as possible.

A quick trial with an H-bridge and diodes "allowing the inductive energy to flow back into the supply" destroyed an expensive programmable supply... due to too much energy from the inductor going back into the supply. This led to the interesting scheme below.

D1 Vs, allowed to rise to Vpk. 12.5V------|>|---+----+----------+----+------+ | | | | | + _|_ _|_ + | Sw1/ /_\\ D D /_\\ /Sw2 | + | | + | | | | | +| +----+--//////--+----+ ===C | | R+L | | | + _|_ _|_ + | Sw3/ /_\\ D D /_\\ /Sw4 | + | | + | | | | | | 0v---------------+----+----------+----+------+

Assume the R+L is up at current I. When the bridge is swapped over the energy stored in L+R is tranferred via diodes (D) into capacitor C. The bridge supply rises to voltage Vpk. On the way, diode D1 gets back biassed to isolate the Vsupply.

At Vpk, the inductor current is zero and the capacitor voltage is at a defined maximum. This takes a quarter sine of the resonant period of L+C. Then the direction of the energy flow reverses... the C starts to deliver current into L. One q-sine later the C is discharged and the L now has nearly -I flowing in it. However, at the end of the recharge the voltage has fallen below Vsupply, so D1 conducts again and holds the current in the inductor at -I.

The approximate sums are relatively simple.

If T is the time taken for the current to reverse, then 1/2T = 1/2.pi.sqrt(L.C).

And if the energy transfer between the L and C is 100% then C.Vpk^2 = L.I^2.

Combining those produces the useful sums, Vpk = L.I.pi/T, and C = T^2/L*pi^2.

So reversing the current in that 180mH/8A inductor in 10mS would require Vs to swing up to a Vpk of 452V, (with C= 56uF). 100mS gives 45V, requiring 5600uF.

I did play around with a breadboard and the scheme did look promising. One early problem was the tolerance of big electrolytics and a TVS to clamp Vpk to a safe value for the MOSFETs was a swift addition. Unfortunately the customer changed his mind about what was wanted.

--
Tony Williams.
Reply to
Tony Williams

Back-to-back zeners across the coil?

Good Luck! Rich

Reply to
Rich Grise

What if he got a supermagnet, and epoxied it to some kind of shaft, and rotated it 180 degrees each half-cycle?

Cheers! Rich

Reply to
Rich Grise

Thanks to all who responded to my post. I think that I'm going to give Winfield's suggested circuit for rapid switching a shot, but want to be sure that I understand his comments regarding the zeners. In my application, I am more concerned with the rapidity with which the field dies down than I am with how quickly it starts up (although I certainly don't want startup to be slow) and I know that simply applying my 24V power source yields an acceptable startup time. So, as I understand it, to get the quickest shutoff time, I should be using zeners with a breakdown voltage just a hair higher than my supply (24V) rather than ones with say a 50V rating. Am I correct here?

I'm also curious as to how long the flyback voltage might take to settle in this circuit. Are we talking on the order of a few milliseconds here? How would one go about calculating the required time?

Thanks again (and thanks very much for the Art of Electronics, Winfield!),

-Graham

Reply to
grindlay

Here's my circuit,

. H-bridge, with provision for rapid inductive-load shutoff. . _______________________________________________ . | | zener zener | | . XXX '-|>|--||--||------+ LOAD +------| I'm also curious as to how long the flyback voltage might take

During normal operation of the electromagnet the 8A current is developed across the 3.3-ohm magnet resistance. When the XXX switches are opened the inductive flyback reverses the voltage across the magnet terminals, to the supply plus two diodes plus a zener. The coil's inductance begins its current fall at the dI/dt = V/L rate we're so familiar with. Ignoring the coil's resistance we can say the time will be t = L I/V. So clearly you want V to be as high as is reasonable. To calculate some typical times we'd need to know your magnet's inductance.

Actually, I liked Tony's circuit the best. It can be simpler, and has the advantage you can simply reverse the H-bridge switches, rather than opening the first pair for a discharge time, before closing the other pair, as my circuit required.

formatting link

. D1 Vs, allowed to rise to Vpk. . 12.5V------|>|---+----+----------+----+------+ . | | | | | . + _|_ _|_ + | . Sw1/ /_\\ D D /_\\ /Sw2 | . + | | + | . | | | | +| . +----+--//////--+----+ ===C . | | R+L | | | . + _|_ _|_ + | . Sw3/ /_\\ D D /_\\ /Sw4 | . + | | + | . | | | | | . 0v---------------+----+----------+----+------+

When you reverse the set of closed switches (MOSFETs), say 2,3 instead of 1,4 the current flow through the new FETs is in the reverse direction. However, unless the drop across the FET's Rds(on) exceeded 0.7 volts (and generally you'd select them so it wouldn't) in the normal drain-to-source direction, the drop in the reverse direction would be about the same, and the diodes shown in the drawing wouldn't conduct. This means the diodes don't play a special role, except during the short open time as the bridge is reversed. Power MOSFETs have intrinsic diodes as a part of their structure, so we don't need to explicitly add diodes if we use MOSFET switches. Tony's circuit becomes:

. D1 allowed to rise to Vpk |---+------------------+--------+-----, . | | | | . |--' '--| | | . || | | . |--+ +--| | \\_|_ . | | +| C /_\\ . +------//////------+ === | TVS . | L + Rs | | | units . |--' '--| | \\_|_ . |--, Q3 Q4 ,->| | /_\\ . |--+ +--| | | . | | | | . 0v-----------+------------------+--------+-----'

Ignoring Rs, and equating L and C energies, Vpk = I sqrt L/C, or the TVS voltages, whichever is lower.

For rapid discharge only, with no energy return, I'd probably eliminate the capacitor and rely on the TVS power zeners alone. This way the discharge is a fast ramp, rather than a half-sine.

Any way you do it, the result is more simple than my circuit.

If you want, the energy in the magnet can be returned to the power supply's output capacitor.

. TVS zeners rises to Vzener + Vs . V+ -+--o--|>|--|>|---+-------+----------+--------, . | | | | . | |--' '--| | . | || | . | |--+ +--| | . +| Cs | --> Im | | C2 . === +------//////------+ === . | | L + Rs | | . | |--' '--| | . | |--, Q3 Q4 ,->| | . | |--+ +--| | . | | | | . 0v--+--o-------------+------------------+--------'

You might want to use a small C2 to limit the flyback risetime, calculate dV/dt = Im / C2, and reduce RFI, etc.

Be careful, Cs in the power supply has to be large enough to absorb the magnet's inductive energy without soaring too much. If Cs absorbed all of the inductor's energy (ignoring the TVS) its voltage after flyback would be Vs' = sqrt (Vs^2 + LC I^2).

Hmm, you can add your own external electrolytic cap to be safe. In that case add diode D1 and get the best of both worlds, fast dI/dt ramp, plus some energy storage and return to the magnet in the other direction, saving power and speeding up reversal.

. V+ D1 TVS zeners rises to Vzener + Vs + dVcap . o--|>|-+--|>|--|>|---+------------------+--------, . | | | | . | |--' '--| | . | || | . | |--+ +--| | . +| C1 | | | C2 . === +------//////------+ === . | | L + Rs | | . | |--' '--| | . | |--, Q3 Q4 ,->| | . | |--+ +--| | . 0V | | | | . o------+-------------+------------------+--------'

One big difference between Tony's circuit and mine, my MOSFET's voltage ratings are low, just safely above the supply voltage, whereas for Tony's scheme the FETs need to be rated at a much higher voltage, safely above the maximum flyback. However, with your magnet's modest 8A draw, there are plenty of good inexpensive high-voltage FETs. Lots of attractive 800V power MOSFETs.

There are good high-voltage MOSFET driver ICs, like IR's 600V ICs, allowing you to use impressively-high flyback voltages.

formatting link
formatting link
These are only $2.58 each, in stock at DigiKey.
formatting link
?Ref=120907&Row=68496&Site=US (fix any link wraparound) I've used the IR2113, which is rated for 2A gate drive, but the IR2111 is fine. Its higher sinking than sourcing gate-drive capability is appealing.

That just leaves the issue of the TVS diodes, used to maximize the discharge ramp. These have to absorb the magnet's energy. TVS parts have internal copper slugs for this purpose. Note I showed parts in series. The largest practical size may be the 5kW units, which can absorb 5J of energy in one ms (less if the time is shorter, scaled by the square root of time). You can purchase low-cost automotive types, e.g., the 5kp26A parts, which breakdown at about 30 volts for 8 amps, and wire them in series for a higher voltage. E.g., 15 for 450 volts. They'd handle 75J, which would be enough if your inductance less than L = 2E/I^2 = 2.3H. If it's more, you can use paralleled stacks of TVS diodes.

OK, that's it, I've said enough.

Hey, thanks, you're very welcome, Graham.

--
 Thanks,
    - Win
Reply to
Winfield Hill
[huge snip]

ISTR Win that Q1/Q2 could be low voltage, but the drains of Q3 or Q4, (when OFF), are always going to be lifted to the Vpk of C2.

Lots of forward diode drop in the circuit now. On the original single diode circuit I was going to try an N-channel MOSFET in parallel with D1, wired 'backwards', Source to V+, etc. The MOSFET would be normally ON, just gated OFF during the flyback/current-reversal (which is whenever the voltage on the H-bridge is higher than V+).

--
Tony Williams.
Reply to
Tony Williams

Good point. Especially if the TVS consists of 15 in series! We can easily solve this by moving D1 (which must now be a high-voltage diode) and adding one small diode to establish the voltage on C1. After a few flybacks the standing voltage on C1 will rise to be 15 diodes-drops higher than Vs.

. Vs+ D1 rises to Vzener + Vs + 15Vd + dVcap . o-+----|>|------------+------------------+--------, . | TVS zeners | | | . '-|>|-+--|>|--|>|---+ | | . | | | | . | |--' '--| | . | || | . | |--+ +--| | . +| C1 | | | C2 . === +------//////------+ === . | | L + Rs | | . | |--' '--| | . | || | . | |--+ +--| | . 0V | | | | . o-------+-------------+------------------+--------'

Yes, that's a good addition to save the power lost in D1.

--
 Thanks,
    - Win
Reply to
Winfield Hill

I took a quick look for a sample of 600V low-Ron power MOSFETs, and found IR's irfps30n60k. DigiKey stocks these for $11.85.

formatting link

The 30n60 is among the larger 600V FETs available, but still has Rds(on) = 0.16 ohms typ at 25C, which means they would drop 1.3V at 8 amps, or 10 watts of dissipation, assuming Tj = 25C. Given an estimated 50C of heating, Rds(on) rises to ~ 0.24 ohms, for so 1.9V of drop and Pd = 15 watts. That's much worse than a diode when considered as a replacement for D1. It also means IGBTs can be considered for these tasks. An irg4pc50ud drops ~1.1V at 8A when warmed up (about 9 watts), $11.44 at DigiKey.

formatting link

--
 Thanks,
    - Win
Reply to
Winfield Hill

I'm always nervous about dissipating forward power in TVS devices. It raises the die temperature and reduces the transient energy dissipation capacity. So another diode across the TVS zeners chain could be useful.

Things are starting to look a little mucky now though. Might be better to put the TVS chain back across C2 and forget about using them to recover energy.

--
Tony Williams.
Reply to
Tony Williams

I'd say there's not much concern with pre-heating, because forward current flows through the TVS diodes only long enough to discharge C1 to Vs + 15 diode drops, then D1 takes over for the reverse- direction steady current. However, there's still a motivation to add a diode across the TVS, as you suggest, to discharge C1 closer to Vs, recover more energy, and speed the current reversal. Still, the whole idea was that by adding the TVS parts, one is trading off a fast magnetic-field shutoff with a slow startup in the reverse direction, as the O.P. requested.

. Vs+ D1 rises to Vzener + Vs + dVcap . o-+----|>|------------+------------------+--------, . | TVS zeners | | | . '-|>|-+--|>|--|>|---+ | | . +----|>|------+ | | . | D2 | | | . | |--' '--| | . | || | . | |--+ +--| | . +| C1 | | | C2 . === +------//////------+ === . | | L + Rs | | . | |--' '--| | . | || | . | |--+ +--| | . 0V | | | | . o-------+-------------+------------------+--------'

Tony, I'm puzzled about where you suggest putting the TVS chain.

In the drawing above, C2 is a small capacitor to slightly limit the dV/dt as the voltage flys up, to start the rapid-discharge cycle. Whereas in your original design C2 was large, grabbing the magnet's energy and slowing the discharge to a resonant LC half-sine as a penalty, but then speeding up current reversal. So we see C2 in the two designs plays quite different roles.

If we see C1 just as a large BFC cap to play it safe with the power supply, forgetting any fast-reversal energy recovery, that certainly simplifies the circuit. Except that C1 will be potentially much larger than before.

. TVS zeners . Vs ,--|>|--|>|---, rises to Vzener + Vs . o-------+----|>|------+------------------+--------, . | D1 | | | . | |--' '--| | . | || | . | |--+ +--| | . +| C1 | | | C2 . === +------//////------+ === . | | L + Rs | | . | |--' '--| | . | || | . | |--+ +--| | . 0V | | | | . o-------+-------------+------------------+--------'

We also get into an interesting subject, how far are we allowed to force the power supply above its intended output voltage? I'd venture to say most supplies can be safely raised a few volts, maybe 5V. I'd want to see the schematic, but these days many manufacturers withold that information, for example Xantrex, my favorite high-power lab switching-supply-with-PFC company.

--
 Thanks,
    - Win
Reply to
Winfield Hill

Of course MOSFETs could be used, if a number of 600V parts were paralleled, or if a lower TVS flyback voltage was used, allowing the use of lower-voltage lower-Ron FETs.

Also, we should remember Tony's point that Q1 and Q1 can be low-voltage switches, that can be a big help when considering paralleled FETs, and in helping to reduce the heat-sink size. Low-voltage switches have much lower Ron for a given size.

One issue if IGBTs are used: Unlike MOSFETs, they don't conduct current in the reverse direction, which is what's happening in the bridge during the flyback. That's why I selected irg4pc50ud parts, note the "d" on the end. Most IGBTs come with and without the extra parallel diode. Unlike the case with MOSFETs, where the parallel diode comes for free as an intrinsic part of the die, in IGBTs the diode takes considerable extra die space. If you check at DigiKey, you'll see the irg4pc50ud IGBT costs $11.44, whereas the irg4pc50u costs $8.68, so the diode adds an extra 32%. Whew!

Because of the extra cost, manufacturers often give designers a choice, "Sir, would like a diode on the side, with your IGBT?"

--
 Thanks,
    - Win
Reply to
Winfield Hill

From a previous drawing of yours Win. C2 as indicated.

------------------------------------------------------------ D1 allowed to rise to Vpk |---+------------------+--------+-----, | | | | |--' '--| | | || | | |--+ +--| | \\_|_ | | +| C /_\\ +------//////------+ === | TVS | L + Rs | became|C2 | units |--' '--| | \\_|_ |--, Q3 Q4 ,->| | /_\\ |--+ +--| | | | | | | 0v-----------+------------------+--------+-----'

Ignoring Rs, and equating L and C energies, Vpk = I sqrt L/C, or the TVS voltages, whichever is lower.

For rapid discharge only, with no energy return, I'd probably eliminate the capacitor and rely on the TVS power zeners alone. This way the discharge is a fast ramp, rather than a half-sine.

----------------------------------------------------------------

Yes. The resonant LC half-sine is a solution to the OP's original problem of reversing the current.

How much energy is being recovered, against the energy dissipated in the TVS chain? Is there an optimum balance between the two?

It will be an individual thing, depending the voltage rating of the output C, on any Overvoltage trips, or even crowbars.

This discussion has highlighted the fact that "putting the inductive energy from an H-bridge, back into the supply" should not be done casually.

--
Tony Williams.
Reply to
Tony Williams

Right.

Maybe it shouldn't be done at all. For rapid shutoff of the field, just a small C2 to control flyback slew rates. No C1. Q1 Q2 low-voltage MOSFETs. Q3 Q4 rated for the TVS-stack total, plus safety margin, perhaps using IGBTs (with internal diode) if Vzener is over 200V. Double up on Q3 Q4 if necessary to reduce heat-sink size. Simple.

. D1 rapidly rises to Vzener . V+ ----|>|---+------------------+--------+-----, . | | | | . |--' '--| | | . || | | . |--+ +--| | \\_|_ . | | C2 | /_\\ . +------//////------+ === | TVS . | L + Rs | | | units . |--' '--| | \\_|_ . |--, Q3 Q4 ,->| | /_\\ . |--+ +--| | | . | | | | . 0v-----------+------------------+--------+-----'

--
 Thanks,
    - Win
Reply to
Winfield Hill

Tony and I had fun tossing around rapid magnetic-field shutoff and reversal ideas, indulging ourselves, but Graham, we still are curious about your project, and your inductor. Have you had a chance to measure its inductance? If you like, you could take a walk over to the Institute and we could measure it for you. Then we could put some real-world numbers to all our theorizing.

--
 Thanks,
    - Win
Reply to
Winfield Hill

Hi Win,

Thanks for the generous offer. I did manage to measure my magnet's inductance, albeit indirectly. I fed 15VAC@60Hz through the magnet and a decade box, R, in series:

|--------/////////--------| | | ~ | | | |-----------R-----------|

I adjusted R such that the voltage across R and the voltage across the magnet were equal. Then, using R's value as the reactance, X_L, I solved for L = X_L/(2*pi*60Hz). I get L = 161mH.

In my application, I definitely can't tolerate field reversal times of more than 100ms. In fact it'd be highly preferable to be able to fully switch in about 10ms. It's okay if the field shutoff and startup times are unequal, but shutoff should be quicker than startup (say 20ms shutoff and 80ms startup for the worst-case 100ms scenario). This balance becomes less important as the total field reversal time becomes shorter.

So, it seems that for the circuit below, I'd be safe with only two of the 5kp26A TVS zeners since the magnet energy is E = (161mH*8A^2)/2 =

5.15J.

. D1 rapidly rises to Vzener . V+ ----|>|---+------------------+--------+-----, . | | | | . |--' '--| | | . || | | . |--+ +--| | \\_|_ . | | C2 | /_\\ . +------//////------+ === | TVS . | L + Rs | | | units . |--' '--| | \\_|_ . |--, Q3 Q4 ,->| | /_\\ . |--+ +--| | | . | | | | . 0v-----------+------------------+--------+-----'

This just leaves me with finding an appropriate value for C2 and figuring out some startup and shutoff times. It seems as though shutoff should be very quick (

Reply to
grindlay

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.