Flexible Sample Environment for the Investigation of Soft Matter at the European Spallation Source: Part II—The GISANS Setup

: The FlexiProb project is a joint effort of three soft matter groups at the Universities of Bielefeld, Darmstadt, and Munich with scientiﬁc support from the European Spallation Source (ESS), the small-K advanced diffractometer (SKADI) beamline development group of the Jülich Centre for Neutron Science (JCNS), and the Heinz Maier-Leibnitz Zentrum (MLZ). Within this framework, a ﬂexible and quickly interchangeable sample carrier system for small-angle neutron scattering (SANS) at the ESS was developed. In the present contribution, the development of a sample environment for the investigation of soft matter thin ﬁlms with grazing-incidence small-angle neutron scattering (GISANS) is introduced. Therefore, components were assembled on an optical breadboard for the measurement of thin ﬁlm samples under controlled ambient conditions, with adjustable temperature and humidity, as well as the optional in situ recording of the ﬁlm thickness via spectral reﬂectance. Samples were placed in a 3D-printed spherical humidity metal chamber, which enabled the accurate control of experimental conditions via water-heated channels within its walls. A separately heated gas ﬂow stream supplied an adjustable ﬂow of dry or saturated solvent vapor. First test experiments proved the concept of the setup and respective component functionality.


Introduction
Neutron scattering techniques are well-established routines for the structural and molecular analysis of matter, and they cover a broad field of scientific interest [1][2][3][4][5][6][7][8][9][10]. With techniques such as neutron reflectometry (NR) [11][12][13], which is used for the investigation of vertical thin film compositions, or grazing-incidence small-angle neutron scattering (GISANS) [14][15][16][17], which is used for the investigation of lateral thin film morphology and its order, two powerful methods to study thin films exist. GISANS probes a large material volume by measuring the scattered signal from a neutron beam impinging under a shallow

Humidity Chamber
We designed a spherical 3D-printed humidity metal chamber that provides precise control over temperature and, in conjunction with the gas flow assembly, humidity while offering a relatively large volume that can accommodate large samples and additional, interchangeable equipment. It is an upgraded version of a previous design of ours, with an improved control over environmental parameters and an easier general handling of the chamber [43]. The spherical design depicted in Figure 1 enables a homogeneous heat distribution for isothermal and temperature switching experiments while simultaneously preventing condensation due to the lack of sharp edges and corners, which are usually critical points for condensation [44]. The chamber size was reduced to a diameter of 146 mm, with a plane-to-plane distance of the two windows of 138 mm. It is still able to accommodate samples up to a size of 70 × 70 mm 2 , while the smaller overall chamber volume of 1.0 L compared to the previous volume of 1.4 L allows for faster temperature and humidity switching kinetics. The connection between chamber and lid was changed to a flat geometry in order to facilitate the accurate positioning of the chamber lid, on which the setup for spectral reflectance measurements is mounted. The windows have a height of 30 mm and a width of 90 mm to enable NR measurements. The angle between a window edge and the furthest sample edge (of a 70 × 70 mm 2 sample placed in the center) measures to 8.2 • , well above the typical scattering angles needed for both NR and GISANS measurements. This ensures that the 3D printed material is not hit by the incident nor the scattered neutron beam (which would produce unnecessary background). It was shown with the previous chamber design that the 3D printed material yields a strong scattering signal when directly hit, but it generates no detectable background otherwise [43,45,46]. As such, NR and GISANS measurements with no measurable background contribution from the chamber itself were already demonstrated. Within the 10-mm-thick walls of the chamber, a pathway of a 6-mm-diameter fluidic channel for temperature control is centered and runs around the chamber, as shown in Figure 1b. The total path length is 2.2 m, thus providing ample contact area for a thorough heat transfer. The chamber is 3D printed from an AlSi10Mg aluminum alloy powder via selective laser melting (SLM) using a metal 3D printer (EOS M290, PROTIQ GmbH, Blomberg, Germany). During the layer-by-layer printing process, the construction chamber was flooded with an inert gas to prevent the oxidation of the material. Afterwards, a heat treatment ensured the homogenization of the intermetallic phase and reduced grain boundaries within the bulk material, improving the direction-independent tensile strength of the chamber. Lastly, the contact surfaces were polished flat to ensure the airtight sealing of the chamber, thereby yielding the printed chamber and lid shown in Figure 1c,d. The lid of the chamber is designed to accommodate the optical lens system of the spectral reflectance setup, while the holes at the side of the chamber are designed as connections to either the internal liquid flow channel or the inside of the chamber, providing in and outlets for the gas flow system and additional electronics.
For measurements, the three pillars at the bottom of the chamber, visible through the chambers window in Figure 1d, are used to mount an aluminum plate with three vertical pins that can be adjusted to accommodate various sample sizes from 10 × 10 to 70 × 70 mm 2 . The windows are covered by a 0.1 mm aluminum foil clamped against the windows by a 2-mm-thick aluminum counterpart. For further details on the sample holder and the various connections to the chamber, we refer to our previous publication [43].
The temperature within the chamber is controlled by a heated or cooled liquid, in the current case H 2 O, flowing through the channels within the walls. It is usually adjusted between 10 and 80 • C for soft matter experiments, but it can be extended by using a different heating medium. In order to investigate the temperature distribution around the sample during experiments, we conducted temperature-switching simulations and confirmed them with corresponding laboratory experiments. For that purpose, SolidWorks flow simulation was used to simulate a heated and a cooled liquid flow through the chamber, heating it from 20 to 50 • C and cooling it from 50 to 20 • C, respectively. The liquid flow was set to start through the chamber lid before flowing via a tube to the lower part of the chamber and finally exiting at an intermediate height (see number order in the first image of Figure 2a). For the simulation, a liquid flow speed of 30 mL s −1 , a heat transfer coefficient of 10 W m −2 K −1 , an ambient temperature of 20 • C, and turbulence free surrounding conditions were assumed. The chosen flow speed is related to the flow speed limit of the heating liquid through the channels. Figure 2a depicts the sectional cuts through the center of the chamber obtained during the heating simulation. The cuts are shown as contour plots, coloring the heat distribution within the chamber in isothermals with a 1 • C range. We find laterally homogeneous heating layers as the temperature quickly changes over a period of around one minute.
An analogous laboratory experiment was conducted, connecting a 50 • C liquid flow to the chamber that was preheated to 20 • C. The liquid flow was provided by a refrigerated heating circulator (FP50-HL, JULABO Labortechnik GmbH, Seelbach, Germany), and the temperature was measured with a combined humidity and temperature sensor (SHT31, Sensirion AG, Steafa, Switzerland) throughout the whole experiment. Figure 2b depicts the temperature evolution at the center of the chamber over the course of the simulation and the laboratory experiment. We find a slightly slower heat evolution during the experiments, which we attribute to heat losses due to air turbulence around the chamber in the laboratory environment not being included in the simulation. Using the same settings as for the heating process, a cooling simulation and experiment were performed by switching back from the 50 • C liquid stream to a 20 • C stream. The temperature evolution at the center of the chamber is depicted in Figure 2c. Again, the evolution of the temperature extracted from the simulation and the measured temperature are in good agreement.
The smaller chamber size (compared to the previous design) and the thus potentially stronger heat discrepancies between the sample center and its edges might affect the homogeneity of the heat distribution, especially for large samples. Therefore, we measured the temperature at the chamber center (c) and 35 mm off-center (oc) in the direction of the windows (where the most heterogeneous temperature distribution was expected) over the Appl. Sci. 2021, 11, 4036 5 of 15 course of the previously described temperature jump experiment. The results are depicted in Figure 3, together with the temperature at the two locations obtained from the previous simulation. The simulated temperatures show a discrepancy of less than 0.1 • C, and the curves strongly overlap. In comparison, the measured temperature closer to the chamber windows is slightly trailing behind the measured temperature at the center. However, considering the accuracy of the temperature sensors given with 0.5 • C, the differences are marginal. This supports the presence of the horizontal temperature layers that were found in the contour plots of the simulation and shows that the chamber provides a good temperature stability over the area of large samples. The smaller chamber size (compared to the previous design) and the thus potentially stronger heat discrepancies between the sample center and its edges might affect the homogeneity of the heat distribution, especially for large samples. Therefore, we measured the temperature at the chamber center (c) and 35 mm off-center (oc) in the direction of the windows (where the most heterogeneous temperature distribution was expected) over the course of the previously described temperature jump experiment. The results are depicted in Figure 3, together with the temperature at the two locations obtained from the previous simulation. The simulated temperatures show a discrepancy of less than 0.1 °C, and the curves strongly overlap. In comparison, the measured temperature closer to the chamber windows is slightly trailing behind the measured temperature at the center. However, considering the accuracy of the temperature sensors given with 0.5 °C, the differences are marginal. This supports the presence of the horizontal temperature layers that were found in the contour plots of the simulation and shows that the chamber provides a good temperature stability over the area of large samples.

Gas Flow Setup
In order to control and regulate the vapor composition within the chamber, a gas flow setup was installed on top of the optical breadboard. The layout of the gas flow is depicted in Figure 4 and can be grouped into the gas flow circuit (orange), an electrical control circuit (green), and a temperature control circuit (blue). The gas flow circuit consists of a supply of dry nitrogen (A), three remote-controllable gas flow controllers (B), two washing bottles (C), the connection to the humidity chamber (D), and, finally, the gas outlet (E). The gas flow controllers (B) are also part of the electrical control circuit, together with the power supply, the readout system (F), and the required software running on a computer (G). Lastly, the temperature control circuit consists of a thermal bath (H), the tubing within the gas flow chamber, the channels within the humidity chamber, and additional tubing to connect the various parts.

Gas Flow Setup
In order to control and regulate the vapor composition within the chamber, a gas flow setup was installed on top of the optical breadboard. The layout of the gas flow is depicted in Figure 4 and can be grouped into the gas flow circuit (orange), an electrical control circuit (green), and a temperature control circuit (blue). The gas flow circuit consists of a supply of dry nitrogen (A), three remote-controllable gas flow controllers (B), two washing bottles (C), the connection to the humidity chamber (D), and, finally, the gas outlet (E). The gas flow controllers (B) are also part of the electrical control circuit, together with the power supply, the readout system (F), and the required software running on a computer (G). Lastly, the temperature control circuit consists of a thermal bath (H), the tubing within the gas flow chamber, the channels within the humidity chamber, and additional tubing to connect the various parts.
The core parts of the control circuit are three F-201CV-1K0 gas flow controllers calibrated with a system pressure of 2 bar at 20 • C to adjust a nitrogen flow rate between 0 and 1 L min -1 , as well as the E-8501-R-00 supply and readout system that provide the power supply and handle the readout and control of the three gas flow controllers (both by Bronkhorst High-Tech B.V.Ak Ruurlo, Netherlands). They are connected by a set of patch cables and a multiport adapter with one connection leading to a remotely located computer via an RS232 connection. The PC is equipped with the FlowDDE software, which is a dynamic data exchange (DDE) server that connects digital instruments to windows applications, such as the FlowView software, a DDE-client program that is used to operate digital instruments. With the software, the gas flow of all three controllers can be adjusted and monitored.
The three flow controllers provide three individual and steady nitrogen gas flows. Two of them are led via polytetrafluoroethylene (PTFE) tubing to two separate 200 mL washing bottles (Neubert-Glas GbR, Geschwenda, Germany) equipped with a glass frit, while the third gas flow is a pure nitrogen line used for drying the chamber or to generate intermediate humidity values. The washing bottles can be filled with water or other solvents, thus allowing for different pure or mixed solvent atmospheres within the chamber. In order to prevent back flow of any solvated gas to the controllers and any uncontrolled diffusion from the washing bottles into the gas supply to the chamber, non-return valves are arranged before and after the washing bottles, as well as on the pure nitrogen line. The three gas streams merge into one and are led via a water-heated tube from the gas flow chamber to the humidity chamber. The gas flow enters the chamber below the aluminum plate on which the sample holder pins are located. Then it diffuses up to the sample through a set of holes in the sample holder base plate in order to prevent turbulences and atmospheric inhomogeneity around the sample. Finally, as the chamber is airtight, an exhaust tube leads the gas flow through another washing bottle to clean the gas flow from potentially hazardous substances.
process at the center (c) of the chamber and 35 mm off-center (oc) in the direction of the windows.

Gas Flow Setup
In order to control and regulate the vapor composition within the chamber, a gas flow setup was installed on top of the optical breadboard. The layout of the gas flow is depicted in Figure 4 and can be grouped into the gas flow circuit (orange), an electrical control circuit (green), and a temperature control circuit (blue). The gas flow circuit consists of a supply of dry nitrogen (A), three remote-controllable gas flow controllers (B), two washing bottles (C), the connection to the humidity chamber (D), and, finally, the gas outlet (E). The gas flow controllers (B) are also part of the electrical control circuit, together with the power supply, the readout system (F), and the required software running on a computer (G). Lastly, the temperature control circuit consists of a thermal bath (H), the tubing within the gas flow chamber, the channels within the humidity chamber, and additional tubing to connect the various parts.  The temperature of the whole system is regulated by a single thermal bath. As it flows through copper tubes coiled around the bottles, it heats the washing bottles and the whole gas flow chamber. The gas flow chamber is insulated and equipped with a computer fan to ensure a homogeneous temperature distribution, which is monitored with an SHT31 sensor. The heated liquid then flows to the humidity chamber via silicone tubes coiled around the gas flow tube, keeping the gas temperature constant. After heating the chamber as described in the previous section, the liquid flows back to the thermal bath.
In order to test the gas flow system, we adjusted the gas flow through one water-filled washing bottle from 0 to 100% (100% was the equivalent to 1 L min −1 ) in 20% steps and adjusted the gas flow on the pure nitrogen line accordingly to a total flow of 1 L min −1 (N 2 flow at 100 down to 0%). Then, we increased the temperature from 20 to 50 • C and repeated the same experiment. The evolution of the temperature and humidity at the chambers center were recorded with an SHT31 sensor and are shown in Figure 5. The humidity within the chamber starts at 0% RH (0% H 2 O and 100% N 2 flow) before rising to 20% over the course of around 7 min as we adjust the flow rates accordingly (20% H 2 O and 80% N 2 flow). The measured humidity continues to follow the adjusted flow rates in 20% steps, which proves the good control of the gas flow system. Eventually, a humidity of 96%RH (100% H 2 O and 0% N 2 flow) is reached. Condensational losses at the windows and the tubes prevented the humidity from being even higher, although no visible evidence of condensation during and after any performed experiments was found. Furthermore, the equilibration time increases as we aim to obtain a pure water or nitrogen atmosphere, which is due to the relatively large volume of the chamber. After adjusting the flow rates back to a pure nitrogen flow, it takes around 17 min to dry the atmosphere back to below 1% RH. The repeated experiment at a temperature of 50 • C, shows an equally good control over the humidity and similar equilibration times. The highest achieved humidity is slightly lower at 93% RH due to the stronger temperature gradient at the windows. In conclusion, the presented gas flow system allows for the study of a broad and well-controlled temperature and humidity range despite the large chamber volume and generous window sizes. This system was already used in neutron scattering experiments that investigated thin-film responses under changing atmospheric compositions, which also demonstrated the use of solvents other than water [45,46]. The setup currently runs without a feedback loop, as set humidity (via the flow rates) and temperature values are reached accurately. conclusion, the presented gas flow system allows for the study of a broad and well-controlled temperature and humidity range despite the large chamber volume and generous window sizes. This system was already used in neutron scattering experiments that investigated thin-film responses under changing atmospheric compositions, which also demonstrated the use of solvents other than water [45,46]. The setup currently runs without a feedback loop, as set humidity (via the flow rates) and temperature values are reached accurately. Figure 5. Humidity (black) and temperature (red) evolution in the center of the humidity chamber during two step-wise increases of the flow rate of a water saturated gas flow mixed with a pure nitrogen flow at 20 and 50 °C. The flow rate of the water-saturated flow started at 0% and was increased in 20% steps to 100%, while the flow rate of the nitrogen stream started at 100% and was decreased accordingly to 0%-thus keeping the total flow at 100%, which was equivalent to a constant flow of 1 L min −1 . After each humidification cycle, the flow rates were switched back to 0% water and 100% nitrogen, drying the atmosphere. The highest reached humidity is 96% RH (20 °C) and 93% RH (50 °C).

In Situ Spectral Reflectance Setup
To complement the neutron scattering data on thin films, thickness measurement techniques are commonly applied, which enable the correlation of morphological and compositional changes within the film to the changes in film thickness. In order to realize this in situ, a spectral reflectance setup was connected to the lid of the humidity chamber. Spectral reflectance can probe film thickness in the nanometer-to-micrometer range and is well-suited to the typical film thicknesses investigated with neutron scattering techniques. Additionally, it provides information on the refractive index of a film, which contributes to the determination of film porosity or water content. Figure 6a schematically shows the spectral reflectance setup. Light from a light source (I) is directed through an optical fiber to a lens assembly (II) on top of the chamber lid. The light is reflected from the sample surface (III), and the thin film interference signal is detected by a spectrometer (IV) and analyzed on an external computer (V). . Humidity (black) and temperature (red) evolution in the center of the humidity chamber during two step-wise increases of the flow rate of a water saturated gas flow mixed with a pure nitrogen flow at 20 and 50 • C. The flow rate of the water-saturated flow started at 0% and was increased in 20% steps to 100%, while the flow rate of the nitrogen stream started at 100% and was decreased accordingly to 0%-thus keeping the total flow at 100%, which was equivalent to a constant flow of 1 L min −1 . After each humidification cycle, the flow rates were switched back to 0% water and 100% nitrogen, drying the atmosphere. The highest reached humidity is 96% RH (20 • C) and 93% RH (50 • C).

In Situ Spectral Reflectance Setup
To complement the neutron scattering data on thin films, thickness measurement techniques are commonly applied, which enable the correlation of morphological and compositional changes within the film to the changes in film thickness. In order to realize this in situ, a spectral reflectance setup was connected to the lid of the humidity chamber. Spectral reflectance can probe film thickness in the nanometer-to-micrometer range and is well-suited to the typical film thicknesses investigated with neutron scattering techniques. Additionally, it provides information on the refractive index of a film, which contributes to the determination of film porosity or water content. Figure 6a schematically shows the spectral reflectance setup. Light from a light source (I) is directed through an optical fiber to a lens assembly (II) on top of the chamber lid. The light is reflected from the sample surface (III), and the thin film interference signal is detected by a spectrometer (IV) and analyzed on an external computer (V). Appl. Sci. 2021, 11, x FOR PEER REVIEW 9 of 15 We use an LS-DT2 deuterium-tungsten light source with a remote-controlled shutter, together with the F20-UV thin film analyzer spectrometer and the LA-GL25-25-25-UV lens assembly in the KM-GL25 kinematic mount (all by Filmmetrics Europe GmbH, Unterhaching, Germany), which is fixed to the extrusion on the chamber lid (see Figure 1c). The LS-DT2 provides a wavelength band from 190 to 1050 nm and is able to probe films within a film thickness range from 1 nm to 40 µm. The one-inch UV lens with a focal length of 25.4 mm is positioned within the lens assembly at a distance of 103 mm above the sample position. A calcium fluoride window installed in the lid of the chamber allows for light in the UV/Vis and NIR range to pass through a 1-cm-diameter hole in to chamber lid. Prior to measurements, a reference measurement of the pristine substrate reflectance is recorded and subtracted from the sample data. Recorded spectra are analyzed with the FILMeasure software using a vertical layer model and give live feedback of the thickness and refractive index during the neutron experiment independently of the collected neutron data.
For exemplary measurements, we prepared a thin film of a poly(N-isopropylacrylamide) (PNIPAM) microgel cross-linked with N,N'-methylenebisacrylamide on a silicon substrate. PNIPAM microgels are temperature-responsive and highly hygroscopic at temperatures below the volume phase transition temperature (VPPT) [47][48][49]. The film was placed in the humidity chamber at a temperature of 20 °C (well below the VPPT [38]) and humidified in 20% RH steps from a dry atmosphere at 0% RH to a humidity of 96% RH. The spectral reflectance setup continuously recorded a spectrum every 10 s. A simple twolayer model, SiO2 and a generic polymer layer with a refractive index of 1.45, was used to model-fit the spectra. The extracted film thickness is shown in Figure 7 as a function of measurement time, together with the humidity within the chamber. We use an LS-DT2 deuterium-tungsten light source with a remote-controlled shutter, together with the F20-UV thin film analyzer spectrometer and the LA-GL25-25-25-UV lens assembly in the KM-GL25 kinematic mount (all by Filmmetrics Europe GmbH, Unterhaching, Germany), which is fixed to the extrusion on the chamber lid (see Figure 1c). The LS-DT2 provides a wavelength band from 190 to 1050 nm and is able to probe films within a film thickness range from 1 nm to 40 µm. The one-inch UV lens with a focal length of 25.4 mm is positioned within the lens assembly at a distance of 103 mm above the sample position. A calcium fluoride window installed in the lid of the chamber allows for light in the UV/Vis and NIR range to pass through a 1-cm-diameter hole in to chamber lid. Prior to measurements, a reference measurement of the pristine substrate reflectance is recorded and subtracted from the sample data. Recorded spectra are analyzed with the FILMeasure software using a vertical layer model and give live feedback of the thickness and refractive index during the neutron experiment independently of the collected neutron data.
For exemplary measurements, we prepared a thin film of a poly(N-isopro pylacrylamide) (PNIPAM) microgel cross-linked with N,N'-methylenebisacrylamide on a silicon substrate. PNIPAM microgels are temperature-responsive and highly hygroscopic at temperatures below the volume phase transition temperature (VPPT) [47][48][49]. The film was placed in the humidity chamber at a temperature of 20 • C (well below the VPPT [38]) and humidified in 20% RH steps from a dry atmosphere at 0% RH to a humidity of 96% RH. The spectral reflectance setup continuously recorded a spectrum every 10 s. A simple two-layer model, SiO 2 and a generic polymer layer with a refractive index of 1.45, was used to model-fit the spectra. The extracted film thickness is shown in Figure 7 as a function of measurement time, together with the humidity within the chamber.
The obtained thickness data correlates well with the humidity within the chamber. A good fit (goodness of fit >0.999) was achieved for all collected spectra, and a continuous thickness increase of the film with rising humidity is observed. A stronger swelling at higher humidity is observed and is in accordance with neutron reflectometry data collected on such PNIPAM microgel thin films [38]. Overall, we are able to accurately track the thickness via the spectral reflectance setup attached to the chamber lid, allowing for complementary in situ spectral reflectance measurements during GISANS or NR measurements. The setup was already used during a recent NR study and proved to be an important tool to measure the film thickness and refractive index in situ [46].

Figure 7.
Film thickness (red) and humidity (black) during a continuous spectral reflectance measurement at 20 °C and a 20%RH step-wise increase of the humidity from 0% to 96% RH.
The obtained thickness data correlates well with the humidity within the chamber. A good fit (goodness of fit >0.999) was achieved for all collected spectra, and a continuous thickness increase of the film with rising humidity is observed. A stronger swelling at higher humidity is observed and is in accordance with neutron reflectometry data collected on such PNIPAM microgel thin films [38]. Overall, we are able to accurately track the thickness via the spectral reflectance setup attached to the chamber lid, allowing for complementary in situ spectral reflectance measurements during GISANS or NR measurements. The setup was already used during a recent NR study and proved to be an important tool to measure the film thickness and refractive index in situ [46].

Motion Control and Sample Alignment
The alignment of thin film samples for GISANS or NR measurements is crucial and requires high accuracy. Therefore, an inherent alignment system was installed on top of the optical breadboard consisting of a lateral y-translation stage perpendicular to the neutron beam (set as x direction hereafter), a vertical z-translation stage, and an angular translation stage for both rotations around the x-and y-axes. For the y-translation stage, the LS-180 (PI miCos GmbH, Eschbach, Germany) with a 508 mm travel range (as seen in Figure 8a,b) is used. It is equipped with a two-phase bipolar half-coil stepper motor (PK-258-02B, Oriental Motor) and a linear optical encoder with an RS422 quadrature output signal (LIA 20, NUMERIK JENA), and it allows for the positioning of an up-to 100 kg load with an accuracy of 1 µm. The z-translation is achieved with the 5103.A10-35 z-stage, and the angular translation is achieved with the 5203.  . Film thickness (red) and humidity (black) during a continuous spectral reflectance measurement at 20 • C and a 20%RH step-wise increase of the humidity from 0% to 96% RH.

Motion Control and Sample Alignment
The alignment of thin film samples for GISANS or NR measurements is crucial and requires high accuracy. Therefore, an inherent alignment system was installed on top of the optical breadboard consisting of a lateral y-translation stage perpendicular to the neutron beam (set as x direction hereafter), a vertical z-translation stage, and an angular translation stage for both rotations around the x-and y-axes. For the y-translation stage, the LS-180 (PI miCos GmbH, Eschbach, Germany) with a 508 mm travel range (as seen in Figure 8a  In order to control the different stages, a custom-made control unit was assembled based on the Ethernet-based fieldbus system EtherCAT [50] (Ethernet for Control Automation Technology) (Beckhoff Automation GmbH & Co. KG, Verl, Germany). The layout of the motion control unit is shown in Figure 9a. The motors (M1-4) and encoders (E1-4) belong to the LS-180 linear stage (M1, E1), the z-stage (M2, E2), and the 2-circle segment (M3, M4, E3, E4). Three power supply units are installed in a 19-inch rack together with an embedded computer and the required EtherCAT terminals. The 48 V supply feeds the 4 motors, while the 24 V power lines feeds the CX5130 embedded PC and thereby also the internal terminal power circuit. The EL9189 is a 0 V potential distribution terminal to which M1 was connected. The two EL1808 24 V are digital input terminals that registered the limit switches of the four motors (two per terminal). The EL2819 is a digital output terminal that connects the 24 V signal of the automation unit to the three encoders of the z-stage and 2-circle segment, and the two EL5002 are the SSI encoder interfaces for these three encoders. Since E1 provides an RS422 signal, EL5101, which is an incremental encoder interface that registers RS422 differential signals, is used. The four EL7041-0052 are stepper motor terminals to which M1-M4 are directly connected. Lastly, the EL9011 is a bus end cover that terminated the bus station and covers the contacts. If not supplied via a terminal, the motors, encoders, and cable shields are grounded via the power supply.
ESS, the motors and encoders of the used stages were integrated into a project that allows for the accurate control over each axis and their remote access. Laboratory tests were conducted to ensure that all axes are working properly.

Conclusions
In the framework of the FlexiProb project, we designed and built a sample environment for the investigation of soft matter thin films via GISANS for the use at the ESS. The presented setup includes four core components: a spherical, 3D printed humidity chamber; a gas flow control setup; a spectral reflectance measurement setup; and a motion control system. The 3D-printed spherical humidity chamber with embedded fluid channels is optimized to reduce condensation and provide a homogeneous temperature distribution around the thin film sample. Temperature simulations and measurements show a layered temperature profile for temperature switches, with no significant temperature gradient even over large samples. The three-channel gas flow setup provides well-controlled mixed vapor atmospheres of pure nitrogen and two solvents. Gas compositions within the chamber can be easily adjusted via the regulation of the flow rates of the three channels. Laboratory experiments confirmed the accurate control and a humidity of 96%RH was achieved for an exemplary water saturated gas-stream despite the large chamber volume. The spectral reflectance measurement setup installed on top of the chamber lid enables in situ thickness measurements during neutron experiments. Exem- The complete assembly of the unit can be seen in the photograph shown in Figure 9b, with all cables connected. In order to access and control the different axes, TwinCAT 3 is installed on the embedded computer. In cooperation with the motion control group at the ESS, the motors and encoders of the used stages were integrated into a project that allows for the accurate control over each axis and their remote access. Laboratory tests were conducted to ensure that all axes are working properly.

Conclusions
In the framework of the FlexiProb project, we designed and built a sample environment for the investigation of soft matter thin films via GISANS for the use at the ESS. The presented setup includes four core components: a spherical, 3D printed humidity chamber; a gas flow control setup; a spectral reflectance measurement setup; and a motion control system. The 3D-printed spherical humidity chamber with embedded fluid channels is optimized to reduce condensation and provide a homogeneous temperature distribution around the thin film sample. Temperature simulations and measurements show a layered temperature profile for temperature switches, with no significant temperature gradient even over large samples. The three-channel gas flow setup provides well-controlled mixed vapor atmospheres of pure nitrogen and two solvents. Gas compositions within the chamber can be easily adjusted via the regulation of the flow rates of the three channels. Laboratory experiments confirmed the accurate control and a humidity of 96%RH was achieved for an exemplary water saturated gas-stream despite the large chamber volume. The spectral reflectance measurement setup installed on top of the chamber lid enables in situ thickness measurements during neutron experiments. Exemplary measurements demonstrated the functionality of the setup. Finally, the motion control setup consisting of four axes for lateral (perpendicular to neutron beam), vertical, and angular movement enables the accurate positioning of the sample for alignment and experimentation. The custom assembled control unit is based on the Beckhoff EtherCAT technology and optimized for future integration at the ESS. Thus, for the ESS instruments, a versatile GISANS sample environment that can be used for early science at the ESS is available.  Data Availability Statement: Derived data supporting the findings of this study are available from the corresponding author upon reasonable request.