How the Helmholtz do you make a good electromagnet?

Perhaps not a question that has come to every persons’s mind, but it’s happened to me once or twice, so let’s take a look at it.

If you move in the right circles, it’s actually a problem of some consequence. How to make a nice clean magnetic field? Helmholtz coils are usually the answer and a set of really good coils is an essential component to a number of modern physics laboratories. I’ve used many of them in magnetic resonance experiments and have personally witnessed them in various labs studying plasma physics, exotic ultracold atom states, and ultra-sensitive magnetometer/gyroscope schemes. Really, their use pops up all over the place, even the biology of magnetotactic bacteria and magnetoreceptive honeybees.

The Simple Helmholtz Coil

png png
(images by Ansgar Hellwig & Geek3, under a CC-BY-SA 3.0 license)

The principle is quite simple: Take two coils of wire, connect them, pass a current, and you’re left with a very homogeneous magnetic field at the midpoint between the coils. The magnitude of the field produced scales with the radius, R, of the coils, the number, N turns of wire, the applied current, I, and the spacing between coils. To obtain the most homogeneous field, the two coils must be spaced a distance of R from one another – the sweet spot is then at R/2. For this nicely symmetric, ideal case, the central field magnitude is

    \[B(x=0, y=0) = \bigg(\frac{8}{5\sqrt{5}}\bigg) \frac{\mu_0NI}{R},\]

where \mu_0 is the magnetic permeability constant and we’re calling the center axial midpoint the origin of our (x,y) coordinate system.

But for many experiments, it’s the field homogeneity that’s most important. What happens if the coil symmetry is off? What’s the error on that? By how much does the magnetic field diverge and over what distance? The expression above says nothing about variations in \hat{x} or \hat{y} directions. For many applications, these are questions that must be answered at the outset since they ultimately limit sensitivity. But how do we do this before building anything? Answer: Simulation!

Forth-Order Helmholtz Equations

Luckily, the most difficult portions of this task have been solved in a publication by M.S. Crosser, et al. In their paper, they sketch a solution for magnetic fields in \hat{x} and \hat{y} around the center point, including terms out to forth order, \mathcal{O}(4). At this precision, the order of approximation for any calculated B(x,y) is probably better than our general engineering skills. Here’s the system they’re working with:
png
M.S. Crosser, et al., Rev. Sci. Instrum. 81, 084701 (2010).

The relavant symbols are defined in the table below (ignore the rest, which are used only in the derivation). But take notice of the four rectangular blocks – these are the coil cross-sections, where the tiny inner squares represent an individual wire turning. “Wait, now… aren’t wires round? Why is the wire square?” We’ll get back to that in a moment.

For now, just realize that we’ve got several tunable parameters to play with. The coil’s rectangular dimensions a \times b are adjustable, allowing for a different number of horizontal and verticle windings (N_a and N_b), or even different thicknesses of wire, h, and wire insulation, t (see figure below).

Additionally, there are correction terms, \rho and \tau, available for each coil’s radius. This allows each to have an independent mean radius: R-\rho for the left coil and R-\tau for the right coil. So if \rho \neq \tau, then there’s no longer a plane of symmetry in the center and we can account for this in the calculation. The purpose of including all these parameters is to be able to simulate realistic imperfections in the Helmholtz system. Very nice!

symbol description
B_x(x,y) magnetic field in \hat{x} direction at point P(x,y)
B_y(x,y) magnetic field in \hat{y} direction at point P(x,y)
R ideal coil radius and separation between coil midplanes
N total number of wire turns in each coil
N_a number of horizontal windings per coil
N_b number of vertical windings per coil
I current applied to the system
\mu_0 permeability constant
a width of coil
b height of coil
h thickness of wire
t thickness of wire insulation
\rho correction term for left coil radius: R-\rho
\tau correction term for right coil radius: R-\tau

So, what do these forth order expressions look like? Honestly, anything out to \mathcal{O}(4) is going to be quite ugly. On the other hand, it is just a bunch of algebra, and so should be fairly easy to code up. Here are the main field terms and their associated factors:

    \begin{align*} \begin{split} B_x(x,y) =& \frac{8\mu_0NI}{5\sqrt{5}R}\bigg[1 - \frac{b^2}{60R^2} + F_{ex} + \frac{x}{125R}F_{1x} + \frac{(2x^2-y^2)}{125R^2}F_{2x}\\ &+ \frac{(3xy^2-2x^3)}{125R^3}F_{3x} - \frac{18}{125R^4}(8x^4-24x^2y^2+3y^4) + \ldots\bigg] \end{split} \\ \begin{split} B_y(x,y) =& \frac{8\mu_0NI}{5\sqrt{5}R}\bigg[\frac{y}{125R}F_{1y} + \frac{xy}{125R^2}F_{2y} + \frac{y(4x^2-y^2)}{125R^3}F_{3y}\\ &+ \frac{xy}{125R^4}(288x^2-216y^2) + \ldots\bigg] \end{split} \\ \begin{split} F_{ex} =& -\frac{(18a^4+13b^4)}{1250R^4} + \frac{31a^2b^2}{750R^4} + \frac{\tau+\rho}{R}\bigg[\frac{1}{5}+\frac{2(a^2-b^2)}{250R^2}\bigg]\\ &- \frac{(\tau^2+\rho^2)}{250R^2}\bigg(25+\frac{52b^2-62a^2}{R^2}\bigg) - \frac{8(\tau^3+\rho^3)}{25R^3} - \frac{52(\tau^4+\rho^4)}{125R^4} \end{split} \\ F_{1x} =& \frac{(\tau-\rho)}{R}\bigg[150+\frac{(24b^2-44a^2)}{R^2}\bigg] + \frac{165(\tau^2-\rho^2)}{R^2} + \frac{96(\tau^3-\rho^3)}{R^3} \\ F_{2x} =& \frac{31b^2-36a^2}{R^2} + \frac{60(\tau+\rho)}{R} + \frac{186(\tau^2+\rho^2)}{R^2} \\ F_{3x} =& \frac{88(\tau-\rho)}{R} \\ F_{1y} =& \frac{(\rho-\tau)}{R}(75+\frac{12b^2-22a^2}{R^2}) + \frac{165(\rho^2-\tau^2)}{2R^2} + \frac{48(\rho^3-\tau^3)}{R^3} \\ F_{2y} =& \frac{2(36a^2-31b^2)}{R^2} - \frac{120(\tau+\rho)}{R} - \frac{372(\tau^2+\rho^2)}{R^2} \\ F_{3y} =& \frac{66(\tau-\rho)}{R} \end{align*}

Alright, now we have all the mathematical tools needed to start making design choices for our set of Helmholtz coils. Let’s implement the equations in python and then start asking questions.

Winding Dimensions Matter

In the above equations, we have a choice of winding dimensions a \times b for these coils. So, what dimensions should be chosen? In essence, each coil could be a solenoid of 20 turns (N_a=20, N_b=1). Or, we could stack the same 20 windings vertically (N_a=1, N_b=20).

The choice here might seem arbitrary until you look at how the higher order terms are affected. The best possible choice will involve minimizing the higher order terms as much as possible. For instance, one way to minimize field divergence at the center point would be to ensure that each coil radius is exactly R, meaning the correction factors \rho and \tau are zero. Take another look above at how many terms drop out when \rho = \tau = 0 – it definitely makes a difference.

Another way to minimize higher order terms is to balance the ratio of winding width to winding height. The expressions for F_{2x} and F_{2y} both contain the factor (31b^2-36a^2), and so each will go to zero when b/a = \sqrt{36/31}. We only have integer winding numbers to work with, so the closest match will be b/a = 14/13.

How much of a difference does this really make, though? Let’s visualize it.

png

Wow, that’s up to a factor of 10000 difference in field errors simply due to our choice of coil winding geometry. Sticking to N_a=13 and N_b=14 definitely seems to be the wiser choice. Anyone making flat coils, take heed… stacking the windings even a few times pays big dividends in field homogeneity.

Wire Dimensions Matter

png
Tongling Jinglong Electric Material Co. and M.S. Crosser, et al., Rev. Sci. Instrum. 81, 084701 (2010).

Another issue addressed by the M.S. Crosser, et al. paper is the effect of wire geometry. When you find magnet wire out in the wild, it usually has a circular cross-section. But this geometry just doesn’t lend itself to layered stacking very well. Instead, some manufacturers are beginning to specialize in other geometries (ribbon, square, hollow, etc.).

The full effects of modeling the wire geometry are a bit long to get into here (see, for instance, this paper). Suffice to say, however, that field homogeneity is degraded with a lower filling-factor of copper wire, but is greatly aided by having current flow uniformly within the entire coil cross-section, a \times b. Therefore, the square geometry is best for this purpose as it minimizes the formation of voids between wires. The authors of the Rev. Sci. Instrum. paper even account for effects due to insulation thickness, t, which can be something of a tunable parameter since manufacturers like MWS Wire Industries allow you to specify the insulation type/thickness.

In any case, the insulation effects of square magnet wire tend to cancel out in the horizontal direction, but produce an effective increase to the vertical height:

    \[b^2_{eff} = b^2\bigg[1 + \frac{t}{h}\frac{(2n-1)}{n^2}\bigg],\]

where h is wire thickness, t is insulation thickness. To make the math easier by symmetry, this only accounts for magnets with an even number of vertical layers, and so in this case 2n = N_b, with (n=1,2,\ldots).

Before simulating the entire magnet, let’s first write the function accounting for this contribution.

Forth-Order Helmholtz Field Simulation

Ideal Case

While all the above information is (hopefully) a mix of interesting/informative, it doesn’t really carry enough weight to be a punch-line. We’ll make good use of it, though, because now we get to simulate the entire field distribution around the center of the Helmholtz coil.

This part is crucial to anyone who wants to expose some macroscopic object to a uniform magnetic field. How large can the object be before the field divergence becomes unacceptable?

First, we’ll have to make some design choices about our magnet. Let’s mock-up something large enough to sit on a bench and as close to ideal as we can manage, given the above information. Also, wire specifications will be defined by making use of the MWS Wire Industries datasheet for its Microsquare Magnet Wire line.

Note that the wire length, resistance, and heating are all approximations. Length because we’ve used b_{eff}, and resistance and heating/power since these depend on a host of things (resistance depends on coil temperature, coil temperature depends on cooling rate, cooling rate depends on ambient temperature, material thermal conductivities and capacities, etc.).

Okay, now with that done, we can finally get down to modeling field divergence in the central patch of the Helmholtz. We’ll define some area around the center to calculate both B_x and B_y. Using these, we’ll calculate the field vectors, \vec{B}, and magnitudes, |\vec{B}|, as well. To capture the field divergence, we’ll use \big(|\vec{B}| - B(0,0)\big).

png

Okay, that looks fantastic! Within the contour lines showing a deviation of \delta B_0=0.1 \mu T, we have a field homogeneity of about 130 parts-per-billion (and 13 ppb within the 0.1 \mu T line). For this size electromagnet, this gives us an extremely clean field over a fairly large working volume, allowing for centimeter-scale objects or samples.

Non-Ideal Case

Now, the non-ideal case. What happens when we introduce even a minor imperfection? Let’s see what the case with \tau = 0.5mm looks like. This is equivalent to a mismatch in coil radii by just half a milimeter. as you can see, the Helmholtz is fairly sensitive to changes in symmetry to the system. Now we’ll probably need to make do with ppm deviations (still pretty good).
png

Handling Imperfections

Realistically, there will be a host of small imperfections. Here are a few of the most notorious:

  1. As the driving current heats up the coils, non-uniform thermal expansions of the magnet form material will take place, causing \rho and \tau to deviate from zero.
  2. While winding the magnet coils, as you reach the last turn of a horizontal layer, the wire has to suddenly “pop up” to the next vertical layer, leaving a small void and ruining the uniformity of current flowing through the coil.
  3. Real materials have a magnetic susceptibility, \chi_m, causing them to become magnetized along with, or against, the electromagnet. Therefore, the materials of the magnet form, wires themselves, and any object placed in the magnet are going to affect the field distribution according to their intrinsic value of \chi_m.

A few of these issues can be mitigated through a choice of materials – for instance, simply using aluminum for the magnet form solves most of the problems of points 1 and 3. The “pop up” effect is more difficult to deal with, though.

For any real construction of a Helmholtz electromagnet, some number of non-ideal conditions are going to be unavoidable. Fortunately, there are few addon options available for these cases.

  1. A second set of smaller Helmholtz coils can be set within the center region of the first and act as correction coils (discussed in the M.S. Crosser, et al. paper).
  2. A third, central coil can be placed within the primary Helmholtz coil to act as a correction coil. This is called a Maxwell coil and improves the Helmholtz field homogeneity out to \mathcal{O}(6).
  3. A magnetic core can be placed within the pole of each Helmholtz coil, acting as a field concentrator. Not only does this aid homogeneity, you get an added boost to magnetic field strength, as well. The drawback is that residual magnetization, or remanance, of the core will remain when the Helmholtz is driven to/around zero magnetic field.

References

Leave a Reply

Your email address will not be published. Required fields are marked *