# Helmholtz coil

A Helmholtz coil is a device for producing a region of nearly uniform magnetic field, named after the German physicist Hermann von Helmholtz. It consists of two electromagnets on the same axis, carrying an equal electric current in the same direction. Besides creating magnetic fields, Helmholtz coils are also used in scientific apparatus to cancel external magnetic fields, such as the Earth's magnetic field.

## Description

A Helmholtz pair consists of two identical circular magnetic coils that are placed symmetrically along a common axis, one on each side of the experimental area, and separated by a distance $h$ equal to the radius $R$ of the coil. Each coil carries an equal electric current in the same direction.
Setting $h=R$, which is what defines a Helmholtz pair, minimizes the nonuniformity of the field at the center of the coils, in the sense of setting $\partial ^{2}B/\partial x^{2}=0$ (meaning that the first nonzero derivative is $\partial ^{4}B/\partial x^{4}$ as explained below), but leaves about 7% variation in field strength between the center and the planes of the coils. A slightly larger value of $h$ reduces the difference in field between the center and the planes of the coils, at the expense of worsening the field's uniformity in the region near the center, as measured by $\partial ^{2}B/\partial x^{2}$.
In some applications, a Helmholtz coil is used to cancel out the Earth's magnetic field, producing a region with a magnetic field intensity much closer to zero.

## Mathematics

The calculation of the exact magnetic field at any point in space is mathematically complex and involves the study of Bessel functions. Things are simpler along the axis of the coil-pair, and it is convenient to think about the Taylor series expansion of the field strength as a function of $x$, the distance from the central point of the coil-pair along the axis. By symmetry, the odd-order terms in the expansion are zero. By arranging the coils so that the origin $x=0$ is an inflection point for the field strength due to each coil separately, one can guarantee that the order $x^{2}$ term is also zero, and hence the leading non-constant term is of order $x^{4}$. The inflection point for a simple coil is located along the coil axis at a distance $R/2$ from its centre. Thus the locations for the two coils are $x=\pm R/2$.
The calculation detailed below gives the exact value of the magnetic field at the center point. If the radius is R, the number of turns in each coil is n and the current through the coils is I, then the magnetic field B at the midpoint between the coils will be given by
    $B={\left({\frac {4}{5}}\right)}^{3/2}{\frac {\mu _{0}nI}{R}},$
where $\mu _{0}$ is the permeability of free space ($4\pi \times 10^{-7}{\text{ T}}\cdot {\text{m/A}}$).

### Derivation

Start with the formula for the on-axis field due to a single wire loop which is itself derived from the Biot–Savart law:
    $B_{1}(x)={\frac {\mu _{0}IR^{2}}{2(R^{2}+x^{2})^{3/2}}}=\xi (x){\frac {\mu _{0}I}{2R}}.$
Here
    $\mu _{0}\;$ = the permeability constant = $4\pi \times 10^{-7}{\text{ T}}\cdot {\text{m/A}}=1.257\times 10^{-6}{\text{ T}}\cdot {\text{m/A}},$
    $I\;$ = coil current, in amperes,
    $R\;$ = coil radius, in meters,
    $x\;$ = coil distance, on axis, to point, in meters,
    $\xi (x)=[1+(x/R)^{2}]^{-3/2}\;$is the distance dependent, dimensionless coefficient.
The Helmholtz coils consists of n turns of wire, so the equivalent current in a one-turn coil is n times the current I in the n-turn coil. Substituting nI for I in the above formula gives the field for an n-turn coil:
    $B_{1}(x)=\xi (x){\frac {\mu _{0}nI}{2R}}.$
For $x\ll R$, the distance coefficient $\xi (x)=[1+(x/R)^{2})]^{-3/2}\;$can be expanded in Taylor series as:
   $\xi (x)=1-{\frac {3}{2}}(x/R)^{2}+{\mathcal {O}}((x/R)^{4}).$
In a Helmholtz pair, the two coils are located at $x=\pm R/2$, so the B-field strength at any $x$ would be:
    ${\begin{aligned}B(x)&={\frac {\mu _{0}nI}{2R}}\left[\xi (x-R/2)+\xi (x+R/2)\right]\\&={\frac {\mu _{0}nI}{2R}}\left([1+(x/R-1/2)^{2}]^{-3/2}+[1+(x/R+1/2)^{2}]^{-3/2}\right)\\\end{aligned}}$
The points near the center (halfway between the two coils) have $x\ll R$, and the Taylor series of $\xi (x-R/2)+\xi (x+R/2)$ is:
   $(16{\sqrt {5}})/25-(x/R)^{4}(2304{\sqrt {5}})/3125+{\mathcal {O}}((x/R)^{6})\approx 1.43-1.65(x/R)^{4}+{\mathcal {O}}((x/R)^{6})$.

## Time-varying magnetic field

Most Helmholtz coils use DC (direct) current to produce a static magnetic field. Many applications and experiments require a time-varying magnetic field. These applications include magnetic field susceptibility tests, scientific experiments, and biomedical studies (the interaction between magnetic field and living tissue). The required magnetic fields are usually either pulse or continuous sinewave. The magnetic field frequency range can be anywhere from near DC (0 Hz) to many kilohertz or even megahertz (MHz). An AC Helmholtz coil driver is needed to generate the required time-varying magnetic field. The waveform amplifier driver must be able to output high AC current to produce the magnetic field.

### Driver voltage and current

$I=\left({\frac {5}{4}}\right)^{3/2}\left({\frac {BR}{\mu _{0}n}}\right)$
Use the above equation in the mathematics section to calculate the coil current for a desired magnetic field, B.
where $\mu _{0}$ is the permeability of free space or $4\pi \times 10^{-7}{\text{ T}}\cdot {\text{m/A}}=1.257\times 10^{-6}{\text{ T}}\cdot {\text{m/A}},$
$I\;$ = coil current, in amperes,
$R\;$ = coil radius, in meters,
n = number of turns in each coil.
Then calculate the required Helmholtz coil driver amplifier voltage:
    $V=I{\sqrt {{\bigl\omega {\biglL_{1}+L_{2}{\bigr )}{\bigr ]}^{2}+{\biglR_{1}+R_{2}{\bigr )}^{2}}}$
where
* I is the peak current,
* ω is the angular frequency or ω = 2πf,
* L$_1$ and L$_2$ are the inductances of the two Helmholtz coils, and
* R$_1$ and R$_2$ are the resistances of the two coils.

### High-frequency series resonant

Generating a static magnetic field is relatively easy; the strength of the field is proportional to the current. Generating a high-frequency magnetic field is more challenging. The coils are inductors, and their impedance increases proportionally with frequency. To provide the same field intensity at twice the frequency requires twice the voltage across the coil. Instead of directly driving the coil with a high voltage, a series resonant circuit may be used to provide the high voltage. A series capacitor is added in series with the coils. The capacitance is chosen to resonate the coil at the desired frequency. Only the coils parasitic resistance remains. This method only works at frequencies close to the resonant frequency; to generate the field at other frequencies requires different capacitors. The Helmholtz coil resonant frequency, $f_{0}$, and capacitor value, C, are given below.
    $f_{0}={\frac {1}{2\pi {\sqrt {\left(L_{1}+L_{2}\right)C}}}}$
    $C={\frac {1}{\left(2\pi f_{0}\right)^{2}\left(L_{1}+L_{2}\right)}}$

## Anti-Helmholtz coil

When the pair of two electromagnets of a Helmholtz coil carry an equal electric current in the opposite direction, it is known as anti-Helmholtz coil, which creates a region of nearly uniform magnetic field gradient, and is used for creating magnetic traps for atomic physics experiments.
In an anti-Helmholtz pair, the B-field strength at any $x$ would be:
    ${\begin{aligned}B(x)&={\frac {\mu _{0}nI}{2R}}\left[\xi (x-R/2)-\xi (x+R/2)\right]\\&={\frac {\mu _{0}nI}{2R}}\left([1+(x/R-1/2)^{2}]^{-3/2}-[1+(x/R+1/2)^{2}]^{-3/2}\right)\\\end{aligned}}$
The points near the center (halfway between the two coils) have $x\ll R$, and the Taylor series of $\xi (x-R/2)-\xi (x+R/2)$ is:
   $(x/R)(96{\sqrt {5}})/125-(x/R)^{3}(512{\sqrt {5}})/625+{\mathcal {O}}((x/R)^{5})\approx 1.72(x/R)-1.83(x/R)^{3}+{\mathcal {O}}((x/R)^{5})$.

## Maxwell coils

To improve the uniformity of the field in the space inside the coils, additional coils can be added around the outside. James Clerk Maxwell showed in 1873 that a third larger-diameter coil located midway between the two Helmholtz coils with the coil distance increased from coil radius $R$ to ${\sqrt {3}}R$ can reduce the variance of the field on the axis to zero up to the sixth derivative of position. This is sometimes called a Maxwell coil.