Parallel multi-droplet platform for reaction kinetics and optimization

We present an automated droplet reactor platform possessing parallel reactor channels and a scheduling algorithm that orchestrates all of the parallel hardware operations and ensures droplet integrity as well as overall efficiency. We design and incorporate all of the necessary hardware and software to enable the platform to be used to study both thermal and photochemical reactions. We incorporate a Bayesian optimization algorithm into the control software to enable reaction optimization over both categorical and continuous variables. We demonstrate the capabilities of both the preliminary single-channel and parallelized versions of the platform using a series of model thermal and photochemical reactions. We conduct a series of reaction optimization campaigns and demonstrate rapid acquisition of the data necessary to determine reaction kinetics. The platform is flexible in terms of use case: it can be used either to investigate reaction kinetics or to perform reaction optimization over a wide range of chemical domains.

Reactor temperature control is achieved through the use of Watlow cartridge heaters, Watlow control modules (for which corresponding software exists that can be integrated with LabVIEW), and Peltier coolers. For more information about the Peltier coolers, see Subsection S2. To accommodate the heaters, ports are drilled in the reactor behind the reactor tubing. A thermocouple is positioned within the reactor for temperature monitoring and control.

S1.2 Circuit board
A customized circuit board is used to control the Peltier cooler, the LED board, and two fans (one that cools the LED board and one that cools the heat sink attached to the Peltier cooler). The board is connected to two AC-to-DC switching power supplies, one that produces a 12V supply for the fans and Peltier (Mean Well part number SE-600-12) and one that produces a 15V supply for the LED board (Mean Well part number LRS-350-15). Control is managed by an ATmega4809 microcontroller (Microchip Technology Inc.) installed on the board. To enable the microcontroller to communicate via USB, we started by uploading the jtag2updi sketch (https://github.com/ElTangas/jtag2updi) to an Arduino Uno connected to the computer via USB, which converts the Uno into a UPDI programmer for the ATmega4809. Then, we soldered connections between specific pins on the microcontroller and Uno, which allowed us to use the Arduino IDE to burn a bootloader onto the ATmega4809 via the Arduino Uno. Once these steps are completed, the microcontroller on the control board can communicate with the computer directly via USB-C. After burning a bootloader onto the microcontroller, we defined its pins and desired functionality in an Arduino ® sketch and uploaded it directly to the microcontroller via USB-C. From LABVIEW, a Python node is used to establish serial communication with the board and write serial commands to it, using the commands defined in the Arduino sketch. The fans are controlled via digital pins, offering simple on/off functionality. The LED board and Peltier cooler are controlled using pulse width modulation (PWM) pins, which enable us to control the average voltage supplied to the devices between 0 and 100% in 0.39% increments: (1/256) * 100% = 0.39%, where integer values in the range [0,255] inclusive are the analog values that can be written to the pin, since it uses an 8-bit signal, and 2 8 =256.

S2 Development of the photochemistry module
The first photochemistry module development objective that we addressed was to identify the minimum distance between the LED board and the reactor that allowed for temperature control below 25 • C when the LEDs and Peltiercooler are operated at 100% power. We found that a separation distance of 2cm resulted in satisfactory temperature control ( Figure S4). We started by examining the temperature response when the Peltier isn't activated and the LED board is located at the minimum reasonable separation distance of about 1cm. As Figure S4 shows, under these conditions, the reactor temperature reaches 40 • C, which highlights the need for a Peltier cooler and an investigation of its heat transfer capabilities. At the same separation distance of 1cm, when the Peltier is operated at full power, the temperature equilibrates slightly above room temperature, at around 26 • C. When the separation distance is increased to 2cm, the temperature equilibrates around 24 • C, which satisfies our temperature control specification.
In Figure S4, the temperature traces corresponding to the two full-power Peltier experiments show an initial rapid dip in temperature, followed by a more gradual rise in temperature that continues until a steady-state is reached. This behavior is a result of the fact that we did not explicitly seek to control the temperature in these experiments, but rather to monitor the temperature response when the Peltier was operating at its maximum capacity. The efficiency of the Peltier declines with time as its heat sink temperature rises; eventually, the temperature gradient in the heat sink reaches a steady-state, and therefore so does the efficiency of the Peltier and the temperature of the reactor. When reactions are performed on the platform, the temperature is explicitly controlled at a set value to prevent temperature swings like those depicted in Figure S4.

S3 Scheduling
When developing the scheduling aspect of the control software, in addition to minimizing total run time, we also sought to maximize utilization, or what fraction of the reactors are in-use in a given experiment ( Figure S5). We used our analysis of utilization to determine how many parallel reactors to include in the platform. In our platform, each reaction is bookended by bottleneck operations: the liquid handler upstream, and the analysis downstream. Other hardware operations (droplet transport and rinsing) are generally much quicker than the liquid handler and analytical method and therefore they are unlikely to create bottlenecks. Peak utilization, or the maximum utilization observed in a particular experiment, is directly related to the ratio of a characteristic residence time used in the batch of reactions to either the liquid handler preparation time or the length of the analytical method, whichever is longer. The exact relation for full utilization is: As an example, consider a scenario in which the analytical method is very short (say, two minutes) and it takes the liquid handler three minutes to prepare a reaction droplet (such that the liquid handler is controlling): in this case, reaction residence times would need to be on the order of thirty minutes in order for all ten reactors to be needed to run the experiments. Reducing the reactor quantity increases the average utilization, but also radically increases the processing time in cases where residence times are longer. Since we consider thirty minutes to be a reasonably representative reaction residence time, the utilization assessment supported our decision to have ten reactors operating in parallel. The utilization assessment also highlights the value of minimizing the length of the bottleneck operations (which we considered while optimizing the liquid handler droplet preparation procedure, see Subsection S3.2).
The output of the scheduling algorithm is passed to a LABVIEW virtual instrument (VI) that orchestrates all of the hardware necessary to perform the parallel reactions. At the outset of an experiment, the software begins by performing all hardware-and software-related initializations, and then the software starts a timer that governs all subsequent operations. Once the timer starts, each of the seven discrete hardware operations (liquid handler, transport, etc.) independently oscillates between an "idle" and a "running" state, according to the schedule and timer. Some of the hardware operations (droplet transport from injection valve to reactor, the reactions themselves, and analysis) require both the schedule and positive detection of the droplet at a particular phase sensor in order to transition from their idle to their running state. The droplet transport sequences manage all necessary valve openings and closures. The reactor control sequences exclusively manage temperature: each reactor accesses its own temperature schedule and starts navigating to its next temperature when its current reaction finishes (with buffer to allow the current droplet enough time to exit the reactor), which helps ensure that the reactor reaches the next temperature before the next reaction starts.

S3.1 Additional scheduler visualization
For the purposes of visualization, a simplified version of the scheduling algorithm was constructed in which all operations that occupy the main flowpath (transit to/from the reactor as well as both rinse/vent operations) were combined into one operation. Visuals of a series of scheduling cases of varying complexity are provided in Figure S6. The images verify that the algorithm moves each droplet through the platform in the expected ways (from the liquid handler, to the main flowpath, to the assigned reactor, and then back to the main flowpath, and finally on to analysis), and that there are no collisions, as desired.
The scheduling algorithm requires the following input from the user: the length (in seconds) of each hardware operation (including droplet preparation, transport to/from the reactor, both rinse/vent operations, and the analytical method), along with the residence time of each reaction, and a list of which reactors are operational. The exact length of droplet preparation will vary depending on the number of stock solutions being combined and the location of the stock solutions on the liquid handler well plate; the user must specify the longest potential operation time to avoid faults.

S3.2 Optimizing liquid handler-based droplet preparation for speed and accuracy
Prior experimentation exposed large discrepancies between the target droplet concentrations specified in the control software and the actual concentrations detected in prepared droplets. As an illustration of the magnitude of the problem, the average absolute error in in the starting material concentration across an early set of validation reactions was 88%, an order of magnitude greater than what we would consider acceptable. Charge error can arise due to suboptimal design and operation of the liquid handler that is used to prepare the reaction droplets.
To address this problem, we took a closer look at the liquid handler operation. Every liquid handling variable can be customized to suit varying accuracy and speed requirements, from the size of the syringe used to prepare droplets, to the identity of the fluid used as a buffer between the transfer fluid and the reaction droplet, to the number of times the droplet is oscillated inside the liquid handler needle to promote homogenization. We thoroughly investigated the influence of these parameters on the speed and accuracy of the droplet preparation procedure.
Droplet preparation begins once the platform control software finishes calculating the volume of each stock solution that the liquid handler must collect in order for the final droplet to contain the user-specified concentrations of all the desired components. The liquid handler then withdraws the requisite volumes of each stock solution one after another into its needle (see Figure S7), "stirs" the stacked sub-droplets through repeated pump infuse-withdraw operations until uniformity is achieved, and then transports the homogenized droplet into an injection valve that is connected to the reactor.
The experiments described herein used a Gilson GX-271 liquid handler outfitted with a 221-by-1.5-by-1.1mm (length-by-OD-by-ID) constricted flat tip needle with a 0.45mm ID at the tip of the constriction (Gilson part number 27067373) and a rack with wells for 96 12 x 32 mm vials (2 mL) (Gilson part number 2504609). A Harvard PHD ULTRA infuse/withdraw syringe pump (Harvard  Figure 4: when the reactions are long compared to the other operations, droplet preparation can be back-to-back (case depicted in (a)); but when reactions are relatively short, as in (b), the algorithm imposes a pause between the preparation of the second and third droplets. (c) shows the algorithm handling a much more complex case, in which twenty reactions are assigned to ten parallel reactors.
Apparatus part number 70-3007) was used to aspirate the stock solutions, stir the droplet, and transport the droplet to the injection valve. Several different syringes with varying diameters were used throughout development. Standard HPLC vials (Agilent part number 5182-0715) were used to store stock solutions in the liquid handler rack in all experiments. FEP tubing with ID 0.02", OD 1/16" was used throughout: to connect the syringe pump to the head of the liquid handler needle and to transport the droplet throughout the platform. Droplet transport on the platform involved navigating through constrictions created by 1) the injection valve; 2) an 11-port, 10-position selector valve (VICI Valco, C5H-3720EUHAY); 3) a T-junction (Upchurch Scientific); and 4) a 6-port, 2-position reactor valve (VICI Valco, C2-3726EUHAY). Control software for all equipment was written using a combination of MATLAB ® † and LABVIEW ® ‡ .

Liquid handling optimization: methods
To improve the accuracy and reproducibility with which the liquid handler creates droplets, we began by listing all of the hardware and operational parameters that have the potential to influence the accuracy of the droplet preparation process. Throughout our analysis, we were also mindful of the time necessary to complete one droplet preparation cycle, because the native implementation of the liquid handler involves preparing just one droplet at a time, so the droplet preparation step is a bottleneck in the parallelized system (see Subsection S3). Table S1 shows all of the influential parameters that were identified, along with an indication of which performance factors the parameter has the potential to influence, and a note about how much control we have over the parameter.
To study the influence of these parameters on the accuracy and speed of droplet preparation, we programmed the liquid handler to prepare a series of droplets while we varied the parameter settings and the hardware. The exact experimental procedure evolved over time. For the first round of experiments, we analyzed one-component droplets containing biphenyl (Sigma-Aldrich, ≥ 99.9%) † https://www.mathworks.com/products/matlab.html ‡ https://www.ni.com/en-us/shop/software/products/labview.html in acetonitrile (Sigma-Aldrich, gradient grade, ≥ 99.9%). At the outset of experimentation, a calibration curve for biphenyl was constructed. Stock solutions for all subsequent experimentation were designed to be within the linear detector response range verified during calibration. To test droplet preparation parameters, we used the Gilson liquid handler to prepare droplets of biphenyl in acetonitrile at various concentrations, and injected these through the Gilson injection valve and into the sample loop. Once the Gilson injection valve switched, we used the carrier syringe pump (Harvard PHD ULTRA infuse-only, Harvard Apparatus part number 70-3005) to infuse the droplet out of the sample loop and into a 2-mL HPLC vial by disconnecting the downstream sample loop fitting and positioning it in the insert. It was necessary to repeat each set of conditions three times in order for the vial to contain enough material for analysis. Vials were stored in the refrigerator in between repeat experiments to minimize evaporation of the tiny volumes of sample. Once a given set of conditions had been repeated three times, we analyzed the sample by HPLC, and used the calibration curve to compute the concentration of biphenyl in the droplet and compared that value to the target value that we'd specified in the control software.
To accelerate parameter screening, we later augmented the experimental procedure by reprogramming the liquid handler to inject prepared droplets directly into HPLC vials. We installed 200-µL conical inserts into each of the collection vials to eliminate the need to repeat experiments multiple times in order to collect enough material for analysis. We continued to repeat each set of conditions three times, but analyzed each run separately to monitor variance on a condition-by-condition basis. With this approach, we studied both onecomponent and two-component droplets, using biphenyl as the first component, as before, and 4'-bromoacetophenone (Sigma-Aldrich, 98%) as the second component. At the outset of experimentation, a calibration curve for 4'bromoacetophenone was constructed. Stock solutions for all subsequent experimentation were designed to be within the linear detector response range verified during calibration. Multicomponent droplets are more challenging to prepare accurately than single-component droplets: the minimum aspiration volumes decrease and the number of necessary rinse vial dips increases; each vial dip represents an opportunity for material that is already in the needle to diffuse out of it. Within the droplet itself, the diffusion length scale increases. For a portion of these experiments, we isolated the non-stirring-related parameters from the stirring-related ones by removing the stirring operation from the preparation procedure and mixing droplets manually instead. In these cases, we mixed the droplets manually after preparation was complete by repeatedly inverting the vial. Development in this phase focused on exploring the influence of the syringe volume (100, 250, and 500µL syringes), the droplet preparation volume (25 to 120µL), the withdrawal flow rate used during stock solution aspiration (100 to 500µL/min), all stirring-related parameters (total stir volume [25 to 250µL], quantity of stirring operations [up to 10], stirring flow rate [100 to 500µL/min]), the volume and makeup of the buffer between the droplet and the transfer fluid, and the identity of the transfer fluid.
Later, it became clear that hardware downstream of the liquid handler itself also had an effect on the composition of the droplet. Thus, a third version of the experimental protocol was necessary, in which droplets were prepared as before, and then droplets were injected onto the system, infused through the system with the help of the carrier syringe pump and pressurized carrier gas, and finally collected in a vial with 200-µL conical insert stored in a pressure bomb at the system outlet. Injection onto the system was achieved via two different mechanisms. The first injection mechanism is the original approach, which involves injecting the droplet through the liquid handler needle, through the needle injection port on the Gilson injection valve, and into a sample loop installed on the valve. Problems with hang-up in the Gilson injection valve motivated us to also test a "withdrawal" approach: we installed a six-port, two-position valve (VICI Valco C2-3726EUHAY) with a sample loop constructed out of 7.5" of 1/16" OD, 0.02" ID FEP tubing on the  transfer line between the liquid handler syringe pump and the liquid handler needle, and withdrew the droplet through the top of the liquid handler needle, into the transfer line and into the sample loop. After each experiment performed using this protocol, the tubing and hardware connecting the injection valve to the system outlet had to be rinsed; for this purpose, a train of three 50-µL droplets of the solvent being used for the experiment was infused from a point upstream of the injection valve to the tubing terminus in the pressure bomb using another Harvard Apparatus infuse-only syringe pump. During this phase of development, we separately also tested the influence of installing a "mixing chamber" (piece of large-ID [1/16"] FEP tubing) above the liquid handler needle, and stirring the droplet there. One of the key performance-influencing aspects of the preparation procedure is the need for a buffer of some kind between the droplet and the transfer fluid to prevent the droplet's contents from diffusing into the transfer fluid. In prior implementations of the automated droplet reactor, a gas buffer was used to separate the droplet from the transfer fluid; experiments indicated that the presence of gas anywhere in the transfer line had a negative effect on the accuracy of the preparation process, so alternatives to the gas buffer were explored, including a series of perfluorinated oils exhibiting various properties. Since they're immiscible with most common organic solvents, perfluorinated oils are frequently used in a wide variety of segmented flow applications (e.g. 61-65 ). A selection of the oils we tested is listed in Table S2 along with relevant physical properties. We included tetrahydrofuran in the table as well as a reference because it's a solvent we commonly use as the transfer fluid. Ideally, in addition to the properties listed in the table, we would also know each oil's wetting behavior on the material of the liquid handler needle, along with that of each solvent; this would help us predict the phase intermixing behavior in the vicinity of the oil-drop interface. To prevent droplet-oil intermixing while also preventing the oil from dripping out of the tip of the needle, we want an oil with relatively high viscosity, relatively low density, and relatively high surface tension. The oil should also have low compressibility (to maximize alignment between the displacement volume of the syringe plunger and the volumes aspirated from stock solutions) and low affinity for the reactant and reagent compounds.
We also conducted experiments to directly examine the performance of the liquid handler syringe pump, which operates by turning a threaded screw with a backplate mounted onto it. The plunger of the syringe is secured to the backplate. The accuracy therefore depends on the pitch of the screw thread, the diameter of the syringe, and the temporal tolerance of the pump's on/off commands. To improve accuracy, we found it necessary to install washers on the plungers themselves to eliminate gaps between the backplate mounting mechanism and the plunger base. We programmed the syringe pump to withdraw volumes of magnitudes similar to those used during droplet preparation (5 to 25µL), and measured the resulting change in the liquid front at various points in the transfer line. Then, using the known internal diameter of the tubing, the actual change in volume could be determined. It wasn't possible to  make this assessment in the needle, which is opaque; therefore assessments were confined to the transfer line upstream of the needle: specifically, upstream of the injection valve; downstream of the injection valve, between the valve and the mixing chamber; and in the mixing chamber.
The preparation volume has competing effects: larger preparation volumes translate to larger aspiration volumes, which improves accuracy because whatever absolute error exists in the pump itself becomes a smaller fraction of the total. However, larger droplets are also more difficult to homogenize. Thus, there are strong interactions between the setting for the preparation volume and the settings that influence the quality of stirring. A related factor is the relative values of the target concentration for the droplet and the concentration of the stock solution: smaller target/stock ratios translate to smaller aspiration volumes.
The droplet is stirred via repeated infuse/withdraw operations of the pump, which causes the droplet to oscillate inside the liquid handler needle. Three distinct parameters can be used to control the extent of droplet mixing: the number of stirring operations that are performed, the volume displaced per stroke, and the syringe pump flow rate applied during stirring. The quantity of stirring operations has to be high enough to homogenize the droplet. However, each discrete stirring operation is costly in terms of preparation time; therefore, the quantity of stirring operations also has to be low enough to avoid converting the droplet preparation step into a significant bottleneck. The displacement volume should be large enough to allow for full recirculation within the droplet. The flow rate during stirring should be high enough to mix the droplet effectively without imparting so much energy to the fluid that the interface between the droplet and the oil buffer is disrupted.
Stirring is critical in this application because the stacking of the stock solution sub-droplets (see Figure S7) in the needle during preparation implies that the diffusion length scale is equal to the half-length of the droplet, which, with reference to the needle internal diameter of 1.1mm, is about 25mm for a 50µL droplet. Assuming a diffusion coefficient D of 1 × 10 −9 m 2 /s, this translates to a diffusion time scale τ D ∼ (droplet half-length) 2 /D that is on the order of days. The oscillatory stirring motion imposed on the droplet by the syringe pump, combined with the resulting shear at the needle wall, creates recirculating vortices inside the droplet, thus reducing the diffusion length scale from the droplet half-length to the needle radius.

Liquid handling optimization: results and discussion
The first round of liquid handler droplet preparation optimization involved collecting droplets injected through the injection valve sample loop. At this stage of experimentation, three droplets had to be prepared sequentially under fixed conditions and collected into the same vial in order to collect enough material for analysis; therefore the results at this stage represent an averaging of three runs. Under these conditions, apparent variation is reduced, and nondirectional charge variation (i.e. that which is centered around a mean charge error of zero) becomes harder to detect due to the central limit theorem. Further, since each preparation cycle takes a few minutes, there is more time for diffusion to homogenize the overall sample, which can hide the effects of incomplete stirring.
We compared charge error produced by an 8-mL syringe (Harvard Apparatus part number 70-2267, 9.525mm diameter) and that produced by a 2.5-mL syringe (Harvard Apparatus part number 70-2269, 4.75mm diameter). Under otherwise identical conditions, switching to the smaller syringe reduced absolute charge error from 13% (std. dev. 9%, N=3, with each individual run representing an average of three distinct droplets) to 3% (std. dev. 2%, N=3). This is consistent with our expectations based on the mechanism of operation of the syringe pump. As described in Subsection ??, syringes with smaller diameters offer finer volume control, because a given rotational translation of the thread that drives the plunger corresponds to a smaller absolute volume for the syringe with the smaller diameter than for the syringe with the larger diameter. In the next phase of development, this effect was explored further using even smaller syringes.
Experiments at this phase demonstrated the crucial role played by the stirring operation. Consider Figure S9: when a droplet hasn't been completely mixed before entering the sample loop, the portion of the droplet captured by the sample loop will contain relatively high concentrations of some components and relatively low concentrations of others, thus increasing the apparent error. The sample loop has to be overcharged, as shown in Figure S9, to prevent the droplet from breaking up when the valve switches from the atmospheric pressure of the liquid handler to the elevated pressure of the platform. Prior to stirring optimization, when entire prepared droplets were analyzed, the average absolute charge error was much lower than when only the portion of the droplet that entered the sample loop was analyzed: 3% versus 24%, respectively. This round of experiments further showed the benefit of increasing the number of stirring operations: under otherwise fixed conditions, the average absolute error decreased from 42% to 38% to 5% as the number of stirring operations increased from 2 to 4 to 8, respectively.

Fig. S9 Homogeneous and heterogeneous droplets captured by a sample loop
To accelerate development and improve the fidelity of measurements, we began injecting droplets directly into vials (rather than through the injection valve) and collecting droplets in 200-µL conical vial inserts, which allowed experiments to be analyzed one by one. The magnitude of the charge error observed in individual droplets is larger than when the analysis represents an averaging over three combined droplets. One drawback to this approach is that it doesn't capture the influence of droplet non-homogeneity as well as injecting through the sample loop does, because all droplets are analyzed in their entirety.
The influence of the syringe diameter and volume was explored further in an attempt to further capitalize on the trend observed when the syringe diameter decreased from 9.525mm to 4.75mm (see above) by testing a series of glass SGE syringes: 100µL (1.46mm ID), 250µL (2.3mm ID), and 500µL (3.26mm ID). However, in addition to the theoretical accuracy advantages associated with syringes with smaller diameters, experiments at this stage demonstrated that there are also subtle trade-offs associated with reducing the syringe diameter: syringes whose volumes aren't much larger than the droplet itself (such as the 100-µL syringes used in the old platform) impose very restrictive limits on the droplet preparation volume, the volume that the droplet can be displaced during stirring, and the flow rates that can be employed (due to pump-imposed pressure limits). For example, when comparing preparation with the 250µL syringe and the 100µL syringe, the restrictions on operating parameters at the 100µL volume translated to an increase in the error from 30% to 34%.
A separate operational consideration is relevant to syringe selection as well: the 2.5mL syringe from Harvard, unlike the SGE syringes, is designed for compatibility with the Harvard syringe pump. The Harvard syringe is constructed out of stainless steel and compatible with a Swagelok fitting to connect to the transfer fluid line, which ensures a good seal. The glass syringes' plungers are shorter than the Harvard ones, so without software-based monitoring of the total infused and withdrawn volume and related recovery software, the pump will occasionally pull the plunger out of the syringe entirely. For similar reasons, since the SGE syringes are made out of glass, the pump occasionally crushed them. Further, the SGE syringes aren't compatible with Swagelok fittings, so Luer-lok fittings were used instead, but these don't seal as well as Swagelok, and the large pressure drops created during withdraw operations occasionally resulted in the syringe pulling in air through the fittings. These considerations taken together supported a decision to permanently use the 2.5-mL Harvard syringe.
To definitively validate the 2.5-mL Harvard syringe's performance, we measured the displacement in the liquid front that resulted when the pump was programmed to withdraw droplet-scale volumes. The results are presented in Table S3. Most conditions were repeated multiple times to examine variability. The results show that the syringe pump outfitted with the 2.5-mL Harvard syringe is extremely accurate in the absence of any hardware in the transfer line, which further supported the decision to make it a permanent feature of the system. Downstream of the liquid handler valve, between the liquid handler valve and the mixing chamber, the accuracy decreases slightly, but the error is still tiny (∼ 2%) even at the small aspiration volume of 5µL, which is representative of the smallest volumes we expect to aspirate during preparation. In the mixing chamber, accuracy decreases a lot, to nearly 8% for an aspiration volume five times greater than the minimum. Before we made the definitive switch back to the 2.5-mL Harvard syringe, many experiments were performed using the smaller SGE syringes. For a portion of these experiments, the droplets were not stirred in order to isolate the influence of non-stirring parameters from the influence of stirring-related parameters. Stirring has an enormous effect on the outcome, and stirring parameters have significant interactions with non-stirring parameters, so the only effective way to analyze the influence of the non-stirring parameters was to mix the droplets manually post-preparation. We did this by gently and repeatedly inverting the vials.
The results of the manually-stirred droplet experiments are somewhat scattered, making them somewhat difficult to interpret, which could be due to incomplete and inconsistent mixing. The conical insert has a very narrow pore at the very bottom, where capillary action keeps fluid from flowing out when the vial is inverted, which prevents effective manual mixing. More aggressive mixing procedures, such as vortexing, weren't pursued because the droplet would have splattered, which would have increased the area of the gasliquid interface significantly, leading to increased evaporation, which would have had its own detrimental impact on the quality of the analytical outcome.
However, the results of the manually-stirred preparation experiments are directionally informative. For example, under otherwise identical conditions, reducing the size of the gas buffer between the droplet and the transfer fluid from 40µL to 20µL reduced the average absolute error from 18% (N=3, σ =10.6) to 13% (N=3, σ =1.3). A smaller gas buffer translates to lower charge error as well as lower run-to-run variation, which can be explained by the compressibility of the gas. Compression or expansion of fluid in the transfer line naturally results in differences between the displacement of the syringe plunger and the volume that is actually aspirated from a stock solution vial.
With stirring re-incorporated into the test procedure, we built upon the observation I made about the influence of the gas buffer, and eliminated it completely by replacing the tetrahydrofuran transfer fluid with perfluorohexanes, which is immiscible with the organic solvents intended for use on the platform. Under otherwise identical conditions (except for the removal of the mixing chamber), replacing THF with perfluorohexanes reduced the error from 42% (σ =16%, N=3) to 5% (σ =2%, N=2). While the perfluorinated oil resulted in significant reductions in the measured charge error in these cases, it should be noted that the oil is not a panacea. First of all, compounds that are soluble in the perfluorinated oil will tend to diffuse into it. Second, perfluorinated oils have very high oxygen solubility (high enough that they are used as oxygen sources in a variety of applications, such as bioreactors 68 , and even in medical applications where they have been shown to function as "liquid ventilators" in lung disease patients, see e.g. 69 ). Many organic synthesis reactions are sensitive to oxygen. Oxygen-sensitive applications will require the perfluorinated oil to be degassed prior to experimentation.
With the perfluorohexanes transfer fluid, further experimentation focused on examining the influence of the droplet preparation volume, the withdrawal flow rate used during stock solution aspiration, and the various stirring-related parameters. Two-component droplets were used to apply greater stress to the system and better mimic realistic preparation conditions; results that follow represent  Figure S10 shows the somewhat non-intuitive result of increasing the preparation volume while holding all other parameters constant. The average error across the two components actually increases with increasing preparation volume, because a given set of stirring parameters won't homogenize large droplets as effectively as small ones. Increasing the quality of stirring by increasing the quantity of stirring operations and the stirring flow rate results in more homogeneous droplets and lower apparent error ( Figure S11). However, during droplet preparation, speed is nearly as important as accuracy, due to the potential for bottleneck formation if preparation requires too much time, and increasing the quantity of stirring operations quickly increases the total preparation time.
The flow rate used while aspirating stock solutions has a less dramatic influence on preparation time, but a significant influence on error ( Figure S12). Higher flow rates during aspiration tended to result in large quantities of perfluorohexanes in the prepared droplets. The sample in Figure S12 corresponding to an aspiration flow rate of 500µL/min resulted in a droplet that was nearly 50% perfluorohexanes by volume. Interestingly, this outcome is not observed when the droplet is prepared using a relatively low aspiration flow rate of 100µL/min, and then stirred at 500µL/min; instead, the combination of slow aspiration with fast stirring results in very low error ( Figure S11a). These analyses led us to identify operating conditions that consistently delivered droplets with discrepancies between the target and actual concentrations of less than three percent, down from the 88% average error that we observed during preliminary experimentation. Using perfluorohexanes as a transfer fluid, 50µL preparation volume, 50µL stir volume, 100µL/min preparation flow rate, 500µL/min stir flow rate, and four stirring operations, the average charge error is 2.03%. The total preparation process under these conditions takes around seven minutes, which is long enough to create a meaningful bottleneck in the system.
The optimized preparation conditions outlined above were identified by injecting prepared droplets directly into vials, without passing through the injection valve; when the injection valve was reincorporated into the workflow, perfluorohexanes was observed in the droplets. Since perfluorohexanes is the transfer fluid, the needle purge step that precedes droplet preparation was leaving perfluorohexanes hang-up in the injection valve, and the hang-up was mixing with the prepared droplets when they were injected into the valve. With reference to Figure ??, this observation motivated me to switch from using perfluorohexanes as the transfer fluid to using it as a buffer between an appropriate rinse solvent (such as tetrahydrofuran) and the droplet.
Changing to a perfluorinated oil buffer reduced the amount of oil in the droplets that were injected into the injection valve, but didn't eliminate it; unlike when the oil was used as the transfer fluid, the oil tended to be localized at the trailing edge of the droplet. Localization of the oil near the trailing edge, where the interface between the droplet and the oil is located, suggests that the increased pressure drop needed to get the droplet through the injection valve increases the droplet's velocity, thus creating conditions that are more favorable for intermixing between the solvent and oil phases. Switching from perfluorohexanes to perfluorodecalin, which is more viscous, did not solve the problem.
To minimize the impact of this "oily edge" on the prepared droplet, we tried increasing the droplet preparation volume to 75µL, which proved to be large enough to keep the oily edge out of the sample loop with low charge error. However, the additional stirring operations necessary to homogenize the larger droplet resulted in a preparation time of eight minutes. I also tested the effect of preparing substantially larger droplets: 300µL. Ten stirring operations were necessary to achieve the same accuracy as for the smaller droplets (the stir volume was increased to 200µL to account for the larger droplet, but otherwise the optimized conditions were unaltered), but this resulted in a total preparation time of twenty minutes, which would create a major bottleneck during parallelized operation, unless the large droplet was subdivided into several discrete droplets. Each of the subdivided droplets would be of identical composition, but they could be used to study the effects of other process variables on the reaction outcome, such as temperature and residence time. For this approach to work, the droplet would need to be totally homogeneous along its entire length; to verify complete mixing, We prepared different 300µL droplets and examined different cuts of each one (Table S4). The results show that the error is low across the entire length of the droplet. At a total preparation time of around twenty minutes, a 300-µL droplet could be subdivided into six droplets of identical composition, translating to a per-droplet preparation time of under four minutes.
We used the further-optimized preparation conditions to perform an additional series of test reactions. The results of the test reactions highlighted a need for further modifications to the droplet handling procedures: all but one of the reactions had a lower starting concentration than the specified target ( Figure S15), and the average signed error was enormous (compared to the optimized preparation tests) at -57%. These results imply that the droplets were being diluted, which could happen due to solvent hang-up in the injection valve and other hardware in the platform with constriction points where fluid may tend to accumulate. To examine this further, we prepared identical droplets, and passed one of them through the injection valve and sample loop only, and the other through the entire system; the resulting preparation errors were -10% and -66%, respectively, suggesting an accumulating dilution effect that got worse as the number of hardware components the droplet encountered increased.   To address the problem of solvent hang-up, we switched from injecting the droplets onto the platform via the Gilson injection valve to instead withdrawing them into a VICI Valco six-port two-position valve ( Figure S8). We made this change based on the hypothesis that whatever mechanism was used to seal the needle seat in the Gilson injection valve would introduce more hang-up than a simple six-port two-position valve; even if this change didn't fix the problem, it was unlikely to make it worse, since the valves are practically identical aside from the needle seat. We also added a "vent" step between reactions, in which we opened a port at the center of the platform to atmosphere while the cylinder that supplies gas to the system was also open, and let the system vent for a minute or two to dry out any solvent that might have accumulated. After the vent step was complete, we closed the open port and re-pressurized the system.
To test the effects of these modifications, we performed a series of SNAr reactions and measured the conversion as well as the charge error of the limiting reactant. The results are tabulated in Table S6. The reaction that was injected through the injection valve, rather than withdrawn into a sample loop on the VICI Valco valve, appears to have been diluted significantly. With the vent step added to an oil buffer preparation, the dilution effects are minimized.

S4 Droplet evaporation
We monitored droplet evaporation versus temperature and residence time. At temperatures above 140 • C, oscillating droplets of tetrahydrofuran (THF) would evaporate within minutes, and corresponding condensate drops would form in the cooler tubing outside the reactor.
Whenever the reactor is controlled at a temperature above room temperature, oscillating droplets shrink over time due to evaporation. Unlike a reaction in a sealed, jacketed vessel, the droplet does not merely evaporate to saturate the headspace, and then cease evaporating once equilibrium is reached. Rather, several distinct phenomena contribute to a more dynamic behavior, in which volatile compounds in the droplet evaporate to saturate the headspace, and the saturated vapor condenses in the tubing outside the reactor (which is not temperature-controlled, Figure 2), thus forcing further evaporation of the droplet to maintain headspace saturation. The droplet also tends to smear along the walls as it oscillates, which increases the interfacial area between the droplet and the headspace, meaning the vapor phase is readily replenished whenever desaturation occurs.
One phenomenon that contributes to this dynamic behavior is a result of the oscillation itself. Oscillation of the fluid inside the loop pushes vapor that is saturated at the reaction temperature into the cooler tubing outside it. To the extent that the vapor cools, it will condense rather than persist in a supersaturated state. When liquid condenses outside the reactor, it tends to remain suspended there, since the organic solvents we use don't perfectly wet the FEP tubing walls. Images of condensate forming in the tubing above a reactor maintained at 60 • C with an oscillating 40-µL droplet of THF are shown in Figure S16. Figure S16c shows a 6mm-long droplet of condensate that has coalesced so as to span the cross-sectional area of the tubing; the droplet's length translates to a volume of roughly   12µL, a significant fraction of the original droplet volume. Another phenomenon contributes to gradual evaporation of the droplet. Since the reactor tubing is heated and the temperature of the rest of the headspace is uncontrolled, there is a temperature gradient in the tubing outside the reactor, which creates a vapor pressure gradient along the tubing axis of any volatile compounds in the droplet. The vapor pressure gradient translates to a partial pressure gradient that serves as a driving force for diffusion from the zone where the vapor pressure is high (the heated tubing) to the zone where it is low (the exterior tubing). As vapor diffuses along this gradient, it becomes supersaturated and, as before, condenses.
The temperature gradient in the exterior tubing when the reactor is maintained at the maximum target operating temperature of 200 • C was modeled using COMSOL Multiphysics software § ( Figure S18). Based on the simulation results, the tubing outside the reactor cools very quickly with distance from the reactor, meaning vapor that is convected out of the reactor on each oscillation cycle contacts tubing that is at a much lower temperature, and that the temperature gradient that produces a vapor pressure gradient is steep.
To quantify evaporative losses, we monitored the change in the length of droplets over time, and computed the fraction of a droplet that evaporated by dividing the length of the droplet at a given time by its initial length. To allow for thermal expansion, we waited   several seconds before collecting the t=0 length measurement in each case. To get an accurate measurement of droplet length, the oscillation was paused and droplets were pushed into a straight portion of the reactor tubing ( Figure S19). Using a standard ruler, our detection limit is 1/64 of an inch, which translates to 0.8µL, or about 2% of the volume of a typical droplet. To compare the influence of different operating conditions and mitigation strategies, droplets of THF oscillating at 60 • C for fifteen to thirty minutes were used. The saturation condition of the oscillator loop was also controlled: conditions in which the oscillator loop was pre-saturated with THF at 60 • C were compared to those in which the oscillator loop was flushed before the experiment to remove THF from the vapor phase. Several strategies for mitigating droplet evaporation were explored: we tried minimizing the total volume of the headspace, improving the condensing capabilities of the tubing outside the reactor by attaching a Peltier cooler to the tubing, and placing sacrificial droplets of pure solvent upstream and downstream of the main reaction droplet; none of these strategies reproducibly reduced evaporative losses to an acceptable level.
We eventually decided to examine the influence of removing oscillation from the design. Stationary droplets don't experience the convective contribution to evaporative losses described above, and the removal of the magnetic oscillator means the headspace can be shrunken significantly, from ∼5mL to ∼50µL. We performed a series of preliminary experiments examining the evaporation of stationary droplets in the same reactor used for the oscillation. In these experiments, stationary operation did reduce evaporative losses relative to the base case.
To further examine a stationary approach, we redesigned the reactor to use 0.02" ID tubing instead of the 0.0625" ID used in the oscillatory design, which reduces the interfacial area between the gas and the liquid and therefore slows evaporative behavior. To determine an appropriate tubing volume for the stationary reactor, thermal expansion coefficients of typical organic solvents were used to anticipate the change in droplet volume that would occur in response to a 175-degree temperature rise (from room temperature to our maximum target operating temperature of 200 • C). Most organic solvents have thermal expansion coefficients in the range 0.001 to 0.002 • C −1 , meaning that the reactor should be able to accommodate droplets up to volumes of around 54µL (Equation S2). We also wanted to ensure that the reactor would be able to accommodate the pressure resulting from carbon dioxide evolution from a 0.1M decarboxylative cross-coupling. Under worst-case conditions, the reaction would be operating at 200 • C and the entire headspace would be at that temperature (in reality, tubing outside the reactor quickly cools to room temperature as distance from the reactor increases). At 200 • C, the vapor pressure of a typical reaction solvent, THF, is around 300psi, and the nitrogen pressure in the system is 100psi. The pressure limit of the system is 500psi, so the additional headspace volume must be large enough to accommodate a 100psi pressure increase (≈7×10 5 Pa), which corresponds to a headspace volume of about 30µL (Equation S3).
40µL 175 • C 0.002 • C −1 = 54µL (S2) V ≈ nRT P = 0.1M 10 −6 L/µL 54µL 473.2K 8.314m 3 Pa/mol K 7 × 10 5 Pa = 3.03 × 10 −8 m 3 ≈ 30µL The updated stationary reactor that accounts for these conditions with safety factors has a heated volume of 60µL and connects to the six-port valve via eight total inches of temperature-uncontrolled 0.02" ID FEP tubing, which translates to a volume of about 40µL. The reactor was machined by ProtoLabs.
In the stationary reactor, we continued to use the change in droplet length over time to assess evaporative losses. The smaller diameter of the tubing makes the droplets harder to see, so small amounts of dye (Sudan red [Sigma-Aldrich, Sudan Red 7B, 95%] in THF [Sigma-Aldrich, anhydrous, ≥ 99.9%] or methylene blue [Sigma-Aldrich] in isopropanol [Sigma-Aldrich, anhydrous, 99.5%]) were added to the solvent to facilitate visualization. Neither dye was stable above 150 • C, so stationary evaporation experiments above 150 • C were not conducted.
We monitored evaporative losses from stationary droplets by setting the oscillation frequency to zero in the control software. At a temperature of 60 • C (the same temperature at which most of the mitigation experiments described above were performed), no measurable evaporation had occurred after thirty minutes. Under the same conditions with oscillation, more than half of the droplet would typically evaporate. We further studied the effects of different temperatures and droplet sizes ( Figure S20). Below 100 • C, no evaporation was observed. Larger droplets experienced less evaporation, in a relative sense, than smaller ones.
The promising results obtained with stationary droplets in the oscillatory reactor setup motivated us to redesign the reactor so  as to minimize the evaporation of stationary droplets. Results of evaporation monitoring of THF droplets at several timepoints and temperatures are shown in Table S7. The results are indicative of a significant reduction in droplet evaporation. As a result, we eliminated the magnetic oscillator from the design and made the updated stationary reactor a permanent fixture of the automated platform. Since the stationary droplets aren't actively mixed, the reactor system can no longer be used to study multiphase reactions. • Initialization: Latin hypercube sampling for Euclidean variables and uniform random sampling for discrete categorical variables (Dragonfly default). We varied the quantity of initialization experiments from 8 to 16, depending on the number of settings of the categorical variables being addressed in the case study in question.

S5 Bayesian reaction optimization with Dragonfly
• Batch size: We set the batch size, which is the quantity of experiments that the algorithm recommends on each iteration, to five, a value that balances between the execution efficiency gained through reaction parallelization and the trajectory efficiency that is naturally sacrificed when the algorithm is used to recommend several reactions at once (when there is more than one reaction in a batch, the reactions tend to be somewhat redundant).
The raw data from the two model reaction systems that we optimized using Dragonfly (Schemes 5 and 6) is included below.

S5.1 Kinetics investigation
The raw data from the kinetics demonstration campaign we performed is included in the table below.