# Open-Source Magnetometer for Characterizing Magnetic Fields in Ultracold Experiments
## 5 Conclusions  
We have demonstrated an automated magnetometer that can be used to characterize magnetic fields created by coils and/or permanent magnets. The presented design is optimized for easy reproduction by inexperienced users by relying on off-the-shelf elements and 3D-printed parts. The entire software suit needed for the operation of the device comes with a GUI that enables the control of all essential functions. If one decides to use different hardware solutions (e.g., a different Hall sensor or a different stepper motor), the modifications of the original code should be straightforward as long as the new devices can communicate with the same protocols as are used in our design.  
We have characterized the performance of the magnetometer and have demonstrated how the access to all three components of the magnetic field vector can be used to optimize the alignment of the coils. We have shown an important property of our design, i.e., the ability to extract magnetic fields produced by the source in an environment plagued by spatially and temporally varying stray fields. The obtained field values agree with the data obtained with a commercial gaussmeter within 3\(\sigma\) of its uncertainty (1% of the measured value).  
The \(\pm 8\) G saturation magnetic field of the Hall sensor we use might be too small for certain applications, in particular for characterization of some permanent magnets that can produce fields on the order of hundreds of Gauss even several cm away from their surface. For such high fields, an upgrade with a easily available Hall sensor with a higher saturation threshold is not feasible. As a solution, one could build a low-quality \(\mu\)-metal shield that would weaken the magnetic field but would not shield it completely. This approach should be easy to implement with thin \(\mu\)-metal sheets.  
Figure 5: Magnetic field produced by the coils measured at a fixed location for different stray fields (**a**) and as a function of time (**b**). Magnetic field projections along the sensor axes \(x\), \(y\) and \(z\) are color-coded with red, green and blue, respectively.  
It is worth noting, as discussed in Section 2, that the polarization flipping function of the sensor is not always necessary to determine the magnetic field generated by the coils or permanent magnets, \(\vec{B}_{\rm coil}\). Any method of determining the magnetic field created by the source that corrects for stray fields relies on the ability to remove the source (turn off the coils or remove permanent magnets). In principle, the magnetic field measurement with the coils on (\(\vec{B}_{\rm ON}\)) and coils off (\(\vec{B}_{\rm OFF}\)) would provide sufficient information to extract the value of interest, \(\vec{B}_{\rm coil}=\vec{B}_{\rm ON}-\vec{B}_{\rm OFF}\). However, we aim here at the versatility of the setup such that our design can also be used to reliably measure stray fields, which can be completed only if the internal offset of the sensor can be determined.  
[PERSON] designed, constructed and characterized the magnetometer; [PERSON] initiated and supervised the project, devised the measurement plan, acquired funding, analyzed and interpreted data; [PERSON] and [PERSON] wrote the manuscript. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the Foundation for Polish Science within the Homing programme and the National Science Centre of Poland (grants No. 2016/21/D/ST2/02003, No. 2021/43/B/ST4/03326 and a postdoctoral fellowship for [PERSON], grant No. DEC-2015/16/S/ST2/00425).  
The data presented in this study are available on request from the corresponding author ([PERSON]).  
The authors declare no conflict of interest.