This guide gives a detailed overview of our design for a prototype free-electron maser that we will be testing (as detailed in [[Test build of a free-electron maser]]).
> **Note:** This guide assumes familiarity with free-electron masers. See [[Free-electron maser physics]] for a more comprehensive guide to free-electron masers.
## General design
Our prototype design consists of an electron gun that uses electrostatic acceleration to be able to accelerate electrons to high speeds, as well as an undulator that uses the interaction of the electrons with a magnetic field to generate microwaves. The full design is shown below:
![[prototype-free-electron-maser.excalidraw.svg]]
In this design, we assume generic parameters for most values. This is primarily because while we have done some calculations and some numerical simulations, much is unknown. Consequently, most parts of the maser are adjustable. [[Test build of a free-electron maser]] has specific suggested values for the parameters for the prototype.
### Photocathode
We use UV light to stimulate photoemission of electrons, rather than using the more-efficient thermocathode (which uses thermionic emission), as this is an initial design and thermal heating introduces additional complications to the design. A UV light source (UV-C lamp) is placed and secured by the frontal open frame in the electron gun. The UV light then enters a reflective chamber: all four sides of the chamber are electroplated thin aluminium metal[^1], and at the end of the chamber is a small tin photocathode. Due to the low work function of tin at $\pu{4.42 eV}$[^2], a UV-C light source operating at between $\pu{100 nm - 200 nm}$ has more than sufficient energy to eject electrons out of the metal.[^3]
> **Note:** Both the electroplated aluminium and tin (photo)cathode must both be made of **pure metal** stored in an inert gas or other oxygen-free environment. The tin cathode in particular must be scoured (polished) to remove the surface layer of tin oxide that forms due to contact with air.
### Magnets
In our design, we use three different types of magnets. The first type of magnet is the **steering magnet** (we can also call it the _turning magnet_). This type of magnet is a modified version of a [horseshoe magnet](https://en.wikipedia.org/wiki/Horseshoe_magnet), and uses two flat magnets of opposite polarities, so that the south pole of one magnet faces the north pole of the other magnet. For instance, the below diagrams shows the N-S configuration shown below (north pole side on top, south pole side on bottom):
![[turning-magnet.excalidraw.svg]]
> **Note:** The magnets of course themselves both have a north and a south pole. Thus, to be more precise, the top magnet in the illustration would have its north pole on its bottom-facing side, whereas the bottom magnet in the illustration would have its south pole on its top-facing side. This is not shown in the diagram for simplicity.
In the N-S configuration, the magnetic field lines point downwards, so the Lorentz force $\mathbf{F} = q\mathbf{v} \times \mathbf{B}$ causes the electron beam to follow a curved path that bends towards the right (remember: electrons are negatively-charged, so they are deflected the opposite direction of positive charges) Meanwhile, in the S-N configuration (where the south-facing side is on top and the north-facing side is on the bottom), the Lorentz force causes the electron beam to bend towards the left. This is used for steering the electron beam from the electron gun into the undulator.
> **Note:** A [horseshoe magnet](https://en.wikipedia.org/wiki/Horseshoe_magnet) may be used as a low-cost alternative in preliminary experimental testing.
The next type of magnet we'll use is a **sextupole magnet**, which is used for beam focusing rather than steering. This is a composite magnet made from six magnets joined together in a hexagonal ring, hence the name "sextupole" (meaning "six poles"), as shown in the diagram below:
![[The-sextupole-magnet.png|400]]
_Source: [ScienceDirect](https://www.researchgate.net/figure/The-sextupole-magnet_fig6_228406812) for "Design of the Magnet System for the Super SOR Light Source" (Koseki, 2004)_
The magnetic field of a sextupole magnet squeezes an electron beam towards its center, which focuses the beam and gives it a characteristic star-shaped cross section, as shown below:

_Source: [Wikipedia](https://commons.wikimedia.org/wiki/File:Magnetic_field_of_an_idealized_sextupole.svg)_
The field of a hextuple magnet can be written in spherical coordinates (assuming azimuthal symmetry, or in this case, $\phi = 0$) via the **multipole expansion**, which, up to some constant factors, takes the form:
$
B(r, \theta) =B_0P_0(\cos \theta) + B_1P_1(\cos \theta)r + B_2 P_2(\cos \theta) r^2 + \dots
$
Where $B_0, B_1, B_2, \dots$ are some constant factors, and $P_n(\cos \theta)$ is a Legendre polynomial. The first three Legendre polynomials are given by:
$
\begin{align*}
P_0(x) &= 1 \\
P_1(x) &= x \\
P_2(x) &= \dfrac{1}{2}(3x^2 - 1)
\end{align*}
$
Thus, we can write $B(r, \theta)$ in explicit form as:
$
B(r, \theta) =B_0 + B_1r \cos \theta + \dfrac{1}{2}B_2(3\cos^2 \theta - 1) r^2 + \dots
$
> **Note:** For the purposes of our discussion, the precise forms of $B_0, B_1, B_2$ don't matter, since we're only interested in the qualitative characteristics of the solution, which are not affected by the values of the constants.
To describe a sextupole magnet, we truncate the series after three terms, hence the name "sextupole" (which comes after the dipole (first) term and the quadrupole (second) term). An [interactive Desmos visualization](https://www.desmos.com/3d/zvlr61g0za) shows the field magnitude as a function of angle. The strong fields near the edge of the sextupole magnet are what cause charges to be repelled towards the center of the magnet, which allows the sextupole magnet to serve the function of a magnetic lens. Borrowing an idea from [transmission electron microscopes](https://en.wikipedia.org/wiki/Transmission_electron_microscopy)[^4], if we use two sextupole magnets of opposite polarities (that is, one flipped so all N-S pairs become S-N pairs), the two lenses can act as a combined converging-diverging lens. This means that rather than diverging the beam (as with a single magnet lens), the two magnets both collimate the beam and restore the beam back to a circular shape.
The last type of magnet we'll use is the conventional **dipole magnet** (permanent bar magnet), which is extensively used in the undulator. As explained in [[Free-electron maser physics]], the field of a bar magnet can be roughly approximated as a perfect magnetic dipole, which has a well-studied analytical expression for the magnetic field. The field is strongest at the surface of the magnet, where it reaches a value of $B_y(r) = B_r$, where $B_r$ is known as the **magnetic remanence** and is a property of the material that makes up the magnet(for high-grade neodynium N52 magnets for instance, this value is $B_r = \pu{1.4 T}$). The expression for the field is given by:
$
B_y(r) = \begin{cases}
B_r \left(\dfrac{r_0}{r}\right)^3, &r \geq r_0 \\
0, & r < r_0
\end{cases}
$
Where $r_0$ is the distance from the center of the magnet to its surface. This [live demonstration](https://www.desmos.com/calculator/ml6b382wsc) on Desmos shows a plot of this magnetic field. What is notable about the field is that it decays by the inverse cube of the distance, so the field is generally quite weak except for the immediate vicinity of the magnet. Thus, the bar magnets in the undulator are also adjustable in that they can be raised and lowered to adjust the strength of the field, as discussed in the next paragraph.
All of our magnets are adjustable to be able to vary the magnetic fields in the electron gun and undulator. This uses a very simple screw mechanism, where the magnet is slotted inside a plastic sleeve and has a (non-metal) screw attached. Since magnetic fields easily penetrate through the plastic sleeve, it has no effect on the magnetic field, and only acts as a guiderail. Turning the screw allows the magnet to be extended or contracted out of the sleeve, which in turn changes the field strength in front of the magnet. The assembly is shown below:
![[magnet-adjustment-mechanism.excalidraw.svg]]
### Output coupler design
The output coupler of the maser is very simple and only consists of a circular aperture that leads to a metal waveguide. The diameter of the aperture is adjustable, so as to allow more or less microwaves through (to adjust the intensity of the beam). Through numerical simulations as well as analytical calculations, we found that purely a simple aperture (circular opening on the side of the maser cavity) would not work as the output coupler: details are in [[RF cavity simulation with aperture]]. Thus, an attached waveguide was found to be necessary, and calculations indicated that a basic cylindrical waveguide with no curvature along the optical axis was ideal (see [[Solving for the fields in a hollow waveguide]] for details).
### Other components
All anodes and cathodes are attached to a variable voltage source controlled by a (shielded) microcomputer (e.g. Arduino). The voltage can be changed to be able to adjust the electron beam energy. The beam dump at the end of a maser is a concrete block to absorb the heat and energy of the electron beam. The electron gun will likely need some form of cooling (water cooling might be sufficient) due to the multiple anodes used to accelerate the electrons and form the electron beam, which will heat up from the current that supplies the applied voltage.
While not shown in the design, a small dish antenna (similar to those used for receiving satellite TV or radio) will be used to be able to measure the microwave beam of the maser. The values will need to be fed into another shielded microcomputer, which will transmit (via highly-insulated wire) the readings to computers located outside of the shielded vacuum chamber used to test the maser.
## Efficiency considerations
While this is just a prototype, it is still important to keep efficiency in mind to minimize power losses. A large part of prototype testing will be measuring the output power of the maser beam as a function of the input power supplied (both from current necessary to power the UV lamp as well as the voltage used to charge the cathode and anodes). Additionally, it is also important to measure the power output of the maser beam at different angles, so a remotely-controlled mechanism will need to move the dish antenna used to measure the microwave beam from left to right and up to down along curved horizontal and vertical tracks. This information will be used to further improve the design.
## Future design modifications
While not goals in the first prototype, future iterations of the design could incorporate the following features:
- [Partial energy recovery](https://en.wikipedia.org/wiki/Linear_particle_accelerator#Energy_recovery_linac) of the electron beam
- Using [electrets](https://octopart.com/pulse/p/electret-generators-motion-energy-harvesting) instead of an external voltage source, so that we essentially don't need any active power supply for the maser
- Using a heat source (tungsten heating element perhaps) to mimic the heat energy of focused sunlight
- Cooling the entire maser to 100K (-173 degrees Celsius) to simulate the very cold temperatures of space
[^1]: A thin aluminium coating for the reflective chamber was chosen due to the high UV reflectivity, which can reach up to 85% (source: [Luminus Devices](https://luminusdevices.zendesk.com/hc/en-us/articles/360059237931-What-kind-of-reflectors-work-at-UVC-wavelengths), 2021). The choice of electroplating is due to the need for a very thin layer of aluminium, which avoids absorption of UV light and maximizes reflection.
[^2]: Referenced from the table of [workfunction values for common elements](https://chem.libretexts.org/Ancillary_Materials/Reference/Reference_Tables/Bulk_Properties/B1%3A_Workfunction_Values_(Reference_Table)) (LibreTexts Chemistry)
[^3]: From $E = h \nu - \phi$, where $\phi$ is the work function, we can calculate that the energy of photons from between $\pu{100 - 200 nm}$ is between $\pu{6.19 - 12.4 eV}$, which is much greater than the work function of tin. Hence, UV-C light in this range can easily eject electrons out of tin atoms.
[^4]: Inspired by [Veritasium's video](https://www.youtube.com/watch?v=88bMVbx1dzM&t=1091s) on transmission electron microscopy.