Introduction

Although continuous-flow processes are a mainstay of industrial bulk chemistry, the advent of microreactors has constituted a paradigm change in laboratory-scale synthetic chemistry. As such, it is important that this is also reflected in chemical education programmes [1]. At the same time, by its nature, flow chemistry also offers opportunities for integrating parts of chemical education in lab courses that are otherwise hard to incorporate.

We have been teaching flow chemistry in our lab courses since 2011, when we acquired two b330 flow start education setups from FutureChemistry, a spin-off company from our university specializing in flow chemistry. From the start, the Omura-Sharma-Swern oxidation has been the reaction that we use to make students acquainted with flow chemistry. The first two years, we provided students with an application note provided by FutureChemistry, based on [2] and describing the straightforward synthesis of cinnamyl aldehyde by oxidation of cinnamyl alcohol.

In 2013, we realized that this same reaction could also be used to convert benzophenone hydrazone (1, Fig. 1) to diphenyldiazomethane (2) [3, 4], This reaction is more appealing from a didactic viewpoint, for several reasons:

  • the product is a relatively stable diazo compound: a chemically interesting type of compound [5, 6], attractive to students, but not frequently encountered in undergraduate education;

  • the mechanism of the formation of the product (Fig. 2B) differs sufficiently from that of the commonly encountered aldehyde or ketone analogues (Fig. 2A) to be challenging for students to derive;

  • last but not least, the product has an intense purple-red color, permitting observation of its formation by eye as well as allowing quantification by Vis spectroscopy, for which equipment is readily available in most undergraduate laboratories.

Fig. 1
figure 1

The synthesis of diphenyldiazomethane 2 via the OmuraSharma-Swern oxidation of benzophenone hydrazone 1. DMSO: dimethyl sulfoxide; TFAA: trifluoroacetic anhydride; DIPEA: N,N-diisopropylethylamine; DCM: dichloromethane.

Fig. 2
figure 2

A: The general mechanism for the Moffatt oxidation of an alcohol by activated DMSO. B: Proposed mechanism for the formation of 2 from 1 by activated DMSO. The intramolecular transfer of a proton in the third step takes place in a four-membered ring, while in the general mechanism a five-membered ring is involved here. It is conceivable that in this case, the amine proton is transferred directly to the base.

We proceeded to investigate whether the synthesis of 2 could indeed also be performed in continuous flow at room temperature and to our delight this proved to be the case, even with our relatively simple flow chemistry setups. We then formulated a two-day student project in which students not only synthesize 2, but actually perform a limited optimization of two reaction parameters by means of a formal experimental design, integrating the theory they have previously obtained about organic chemistry, analytical chemistry, design of experiments (DoE), statistics and programming with the new concept of continuous flow processes.

Since then, the synthesis of 2 in flow has been one of the two recurring instances of flow chemistry in our undergraduate synthetic lab courses; the other being the routine synthesis of ethyl diazoacetate in flow [7] on an as-needed basis for use in the synthesis of a bicyclononyl derivative [8].

In this paper, we will discuss the optimization of the synthesis of 2 both from an experimental and from a chemical education viewpoint. A basic student manual for the experiment is provided as part of the Supporting Information.

Educational / didactical value

Different theories about learning exist and although we will not go into much detail in the current paper, it is important to mention that the integration [9] of knowledge is generally accepted to be one of the ‘highest’ forms of knowledge. These forms of knowledge build upon, or are converted from, ‘lower’ forms of knowledge such as remembering (as in rote memorization) and understanding [10]. Another influential idea is that learning something new is facilitated by being able to connect it to prior knowledge [11], which therefore needs to be ‘activated’ at the proper moment. This activation in turn can be effectively achieved by applying knowledge, such as when performing an experiment in a lab course.

The diphenyldiazomethane experiment is explicitly aimed at learning something new (continuous-flow processes) by connecting it to prior knowledge (in particular classic organic synthesis via batch processes) whilst at the same time integrating and applying prior knowledge about chemical subjects and concepts such as organic chemistry, quantitative analytical chemistry, kinetics, optimization, experimental design, statistics and computer programming. With the exception of a minority of students explicitly pursuing more advanced analytical or theoretical chemical education, students are otherwise not challenged to activate and thereby maintain – let alone upgrade – their knowledge about many of these subjects and concepts until they start their professional careers.

Moffatt oxidations

Following the introduction of ‘activated DMSO’ oxidations at the end of the 1950s, the direct oxidations of primary and secondary alcohols to the corresponding aldehydes and ketones by Moffatt-style DMSO-based activators at the beginning of the 1960s have become a standard tool in synthetic laboratories [12,13,14,15,16,17]. The general procedure involves activating DMSO by having it react with an ‘activator’, an electrophile that is attacked by a lone pair on the oxygen atom of DMSO. Two of the activators leading to the most reactive activated DMSO species are oxalyl chloride and trifluoroacetic anhydride, both introduced by Swern and coworkers [18,19,20,21,22].

There can be a cruel sense of humor in scientific progress: after Albright et al. in the 1960’s had dismissed the use of trifluoroacetic anhydride as an activator [23, 24], because it was useless at room temperature, Swern and coworkers, in the 1970’s proved that it actually is a very good activator at low temperatures [21, 22, 25] and with the advent of flow chemistry, the use of trifluoroacetic anhydride as an activator for DMSO at room temperature has been proven possible after all [2, 26, 27].

Contrary to their use in the oxidization of alcohols, Moffatt oxidations are far less widely used for the analogous conversion of amines into the corresponding imines [28,29,30,31], probably not because of inherent issues, but because the formation of an imine from an amine is simply less frequently required than the opposite pathway, as in reductive amination. Whereas the mechanism of imine formation starting from a secondary amine is probably analogous to that of carbonyl formation starting from an alcohol [32, Fig. 2A), it is not immediately obvious that it is also possible to convert a hydrazone into a diazo group, since in that case, two hydrogen atoms need to be abstracted from the same nitrogen (Fig. 2B). Not surprisingly therefore, the discovery of this possibility has been described as serendipitous and provides an extension of the set of available ways to produce diazo compounds. As such, the current paper represents a further extension to the ways available for producing diazo compounds in a continuous-flow setup [7, 33,34,35]. The proposed mechanism is depicted in Fig. 2B.

The experiment

Over the years, our undergraduate experiment has seen many small changes. In its current simplest version, students are tasked to prepare three 20 mL solutions of trifluoroacetic acid (TFAA, 0.4 M), N,N-diisopropylethylamine (DIPEA, 1.435 M) and, analogous to references 2 and 27, a combination of dimethyl sulfoxide (DMSO, 0.6 M) and 1 (0.2 M), all in dichloromethane (DCM). The TFAA and 1/DMSO solutions are then taken up in two 5 mL glass syringes, while the DIPEA solution is taken up into a 1 mL glass syringe. The reason for this difference is that the required flow rates for the DIPEA solution are generally quite low and with a large syringe, the step motor of the pump would have to rotate so slowly that the actual flow rate might become exceedingly inaccurate and/or the flow might become discontinuous.

The syringes are placed in three syringe pumps and connected via short (~10 cm) inlet tubing to the 1 μL microreactor (Fig. 3) which is placed in a reactor holder on top of a Peltier element set to cool down to 10 °C. In the student experiments, the temperature is kept constant, since from previous experience, we know that its effect is roughly inversely related to the residence time of the reactants in the microreactor. Of these two, therefore, only the residence time is used as a factor in the subsequent optimization procedure. A microtube is connected to the microreactor outlet and stuck through a hole in the plastic cap of a standard 10 mL disposable glass vial.

Fig. 3
figure 3

Microreactor setup: the 1 / DMSO and TFAA solutions are combined and mixed in mixing channel M1 which has an internal volume of 1 μL. At M2 the DIPEA solution is added, after which the reaction mixture leaves the microreactor.

After the setup has been checked for correctness and safety by a teacher or TA, it is suggested to students to first make sure that all inlet tubes are filled with their respective liquids by temporarily applying relatively high flow rates. Then, the flow rates are set to the ‘standard settings’ provided to them and their first synthesis of diphenyldiazomethane commences. After 5 to 10 min, red droplets normally start to appear from the end of the outlet tubing [36]. When they have collected some of the effluent in a volume of DCM, the students proceed to use a UV-Vis spectrometer to measure the visible absorption spectrum of the solution to determine λmax, the wavelength of maximal absorbance.

Students then start the actual experimentation in which they are going to vary the different flow rates in order to optimize the conversion of 1 into 2 as a function of two factors: 1. the ‘residence’ time between mixing the TFAA and DMSO / 1 solutions and adding in the DIPEA, and 2. the ratio between TFAA and 1. Since 1 and DMSO are contained in the same solution, the ratio between TFAA and DMSO is varied at the same time, and in the same manner, so any effects due to the ratio TFAA/1 are confounded with (cannot be distinguished from) effects due to the TFAA/DMSO ratio.

In their statistics course, students have previously learned about Experimental Design or Design of Experiments (DoE), which describes ways to optimize a criterion as a function of a set of factors in the minimum number of experiments [37, 38]. Part of their preparation for the experiment is setting up an experimental design for the two factors. The basic option is to choose a full factorial design of two factors at two levels (Fig. 4). The number of experiments in this design is only four, but since students start with the standard settings as the center point to allow for curvature detection / estimation in the response surface, and also have to perform a number of replicates to assess if any observed effects are real or just due to random error, seven or eight experiments are normally the minimum they should carry out. It is exactly here that one of the huge benefits of flow chemistry becomes apparent once again: imagine doing seven or eight batch experiments on a single day, let alone telling second-year undergraduate students that this is the bare minimum that you expect from them! Flow chemistry enables students to carry out multiple experiments, varying parameters in between, taking replicates and making mistakes and correcting for them. All these things are unimaginable for a classic synthesis experiment in the limited time frame of a single day.

Fig. 4
figure 4

Schematic depiction of a full factorial design of two factors at two levels, a high (+) and a low (–) level. Each point corresponds to an experiment with the given factor settings (e.g. temperature, pressure, pH, concentration of a reactant, etc.) in which the response (the quantity of interest, such as yield, ee, purity, etc.) is determined. The center point is not formally part of the full factorial design, but is often the starting point. It also allows for curvature detection of the response surface, which is vital if it is expected to have a maximum that is not an edge extreme.

For each combination of factor settings, students collect the red effluent from the microreactor in a volume of dichloromethane over the course of five to ten minutes. After collecting the product, students change the flow rates of the setup according to their experimental design (the order of which has preferably been randomized) and allow some time for equilibration of the system and removal of the effluent that is still in the outlet channel and corresponds to the previous factor settings. Meanwhile, they measure the absorbance of the diluted effluent on the UV-Vis spectrometer at λmax.

After they have carried out their experiments, students clean the setup and proceed to analyze their results, either by hand using direct effect estimation methods or by (linear) regression in a program such as Matlab, R or Microsoft Excel or by using a programming language such as Python [37].

Results and discussion

In an extension of the experiment, beyond the limited version for students, we have carried out a full characterization of the response surface of the relative conversion of 1 into 2 as a function of the two factors ‘residence time’ and ‘TFAA/1 ratio’ (confounded with TFAA/DMSO ratio).

The ‘Vis’ absorption spectrum of the product mixture shows a maximum around λmax = 521 nm. Absorbance measurements to determine the relative conversion of 1 into 2 are carried out at that wavelength. In order to obtain good results, effluent was collected over some time to allow temporal variations in the conversion to average out. For each experiment, the effluent was collected in a glass vial over a precalculated time interval that was chosen such that the total amount of 1 that passed through the system was always equal. Afterwards, either 0.5 mL or 1.0 mL DCM was added. In this way, the volume of the colored liquid became large enough to fill a semi-micro cuvette, while at the same time, its absorbance became sufficiently low to stay below 1 and, hence, was in the regime where the Beer-Lambert law is valid.

The absorbance alone is not a good measure of the conversion, however, since – to a certain extent – increasing the amount of 1 by increasing flow rate 1 (Fig. 3) or decreasing the total volume of liquid by decreasing flows 2 and/or 3 may also result in higher concentrations of product in the effluent, even when relatively less 1 is converted into product. Therefore, the measured absorbances were normalized by dividing them by the theoretical concentration of 2 in case of total conversion. The remaining differences in the corrected absorbance are either due to an actual effect (i.e. an actual change in the conversion) or to factors beyond control (i.e. experimental error). The Microsoft Excel sheet with our bookkeeping and calculations is provided as Supporting Information.

Figure 5 shows two depictions of the response surface corresponding to the relative conversion of 1 into 2. Numerical results can be obtained from the spreadsheet in the Supporting Information. Some replicate measurements produced values that we suspected to be outliers. To reduce their influence in subsequent data fitting, we calculated the median values of the corrected absorbances and used these as input for the model fit. We also realized that the [TFAA]/[1] axis would be asymmetrical: starting from an equimolar situation (i.e. [TFAA]/[1] = 1), and increasing [TFAA] by a factor of 2 leads to [TFAA]/[1] = 2, whereas decreasing it with a factor of 2 leads to [TFAA]/[1] = 0.5. To correct for this, we used the natural logarithm of [TFAA]/[1] to render the axis symmetrical around 0. This resulted in better fits (lower RMS) than for the asymmetrical situation. The data were fit to the model z = a + bx + cy + dxy + ex2 + fy2, in which z is the corrected absorbance, x is the reaction time tresidence (s) and y is \( \ln \frac{\left[\mathrm{TFAA}\right]}{\left[1\right]} \). The values obtained for the coefficients a till f can be found in the Supporting Information.

Fig. 5
figure 5

Two depictions of the response surface of the corrected absorbance as a measure for relative conversion of 1 into 2. The 3D surface simply ‘connects the dots’, which are the median values of replicate measurements of the corrected absorbance for different combinations of tresidence and \( \ln\ \frac{\left[\mathrm{TFAA}\right]}{\left[1\right]} \). The contour lines at the bottom show the fit of the quadratic model to the data. The distance between the contour lines corresponds to steps of 0.02 in the z direction, but the innermost contour line is added for extra detail at a distance of 0.006 from the previous one. The dashed contour line corresponds to a distance of 1 pooled standard deviation – calculated from all replicate measurements – below the maximum. The arrows indicate the point that yielded optimal experimental results.

Although the fit of the quadratic model to the data is far from perfect, the addition of higher-order terms resulted in overfitting, whereas the exchange of the quadratic terms for higher order terms resulted in fits that were actually worse, although the location of the optimum hardly changed. This conforms to the observation made in [37] that in experimental optimization, models do not normally benefit from incorporating terms beyond quadratic ones. For the given concentrations and the set-up used, at a temperature of 10 °C, the model predicts the optimal combination of factors to be around tresidence = 1.75 s and \( \ln \frac{\left[\mathrm{TFAA}\right]}{\left[1\right]}=0.065 \). Experimentally, we obtained optimal results at tresidence = 1.5 s and \( \ln \frac{\left[\mathrm{TFAA}\right]}{\left[1\right]}=0.2231 \).

Purification

Although assessing the yield and purity of diazo compounds is notoriously difficult [3, 39], we attempted to purify an amount of continuous-flow product for further characterization by NMR and IR spectroscopy. The small amount of product was obtained as a crystalline solid and the NMR spectra did not show any starting material or major impurities. The NMR and IR spectra (available as Supporting Information) corresponded to literature [3, 40]. We conclude that the purified product should in principle be clean enough for further use in synthetic applications.

Possible extensions

The experiment provided in this paper is a basic version that can be conducted in a single day of experimentation in the lab and requires about a day in total for preparation beforehand and data analysis and completion of lab notebook recording afterwards. There are ample opportunities for extension or adaptation to suit the personal preferences of teachers and / or students. Some options are:

  • Start with a demonstration experiment: when some droplets of the TFAA solution are added to the mixture of 1 and DMSO, it turns red. This is an interesting experimental observation: apparently, the intermediate that is formed before adding base already has the typical color of the final product! After 1 or 2 s, the color is gone again. Carrying this out in continuous-flow allows for adding the base exactly at the ‘temporal sweet spot’: the moment the maximum amount of intermediate is present.

    Incidentally, this is an observation that any chemist should appreciate since it can, in principle, provide important clues as to the molecular structure of the intermediate that, due to its ephemeral nature, would have been easily missed by any other means of observation other than seeing it with the naked eye.

    As such, in the context of chemical education, it can even be used to teach undergraduate students how to observe properly, how to take notes of observations in their laboratory notebook and to think about the meaning of observations and scientific evidence in general.

  • Have students synthesize their own hydrazone, either benzophenone or an alternative, such as the ones mentioned by Javed and Brewer [3, 4] according to procedures such as described in [41, 42]. In our lab, one couple of students have successfully synthesized acetophenone hydrazone and subsequently observed at least partial successful conversion into the corresponding methylphenyldiazomethane ((1-diazoethyl)benzene).

  • Have students try to determine the absolute yield of the diazo compound without the need for purification. Apart from losses due to purification itself, the pure compounds are unstable and may present safety problems. Determining the yield in another manner is not trivial [3, 39]; standard options are measuring the nitrogen evolution upon the addition of acid or quantifying a derivative such as an ester that can be formed upon the addition of a carboxylic acid. All of these methods are believed to underestimate the actual yield. Students could think about alternative manners, e.g. a spectroscopic quantification (UV-Vis, qNMR, IR) or a titration for instance.

  • Have students try to use the diazo compound in a subsequent reaction. The conversion into an ester was already mentioned; similarly, an ether can be produced by reaction of 2 with an alcohol. But diazo chemistry is quite versatile [5], including the formation of (substituted) olefins, cyclopropanation of olefins, insertion in O-H, N-H and C-H bonds, the formation of carbonyl and sulfur ylides, 1,3-dipolar cycloadditions and even the production of highly substituted polymethylenes [6]

  • Have students adapt the flow setup. The use of an extra syringe, pump and T-piece or Y-piece, enables the use of separate solutions of DMSO and 1 and, hence, removal of the confounding and even separate optimization of their stoichiometry. Another option would be to try the setup from [26] in which the substrate – an alcohol in that case – is only added after the activated DMSO is produced. Students can investigate the influence this has on the yield of the reaction.

  • Have students choose another experimental design, such as a Plackett-Burman design, the more advanced D-optimal, M-optimal or A-optimal designs or – the favorite amongst our students – a central composite design [37, 38]. Instead of these so-called response-surface methodologies, another option would be to use another optimization approach altogether, such as simplex optimization [37, 43]. Enthusiastic students could even program their own version of this algorithm.

  • Have students think of different optimization criteria to use: do they want to maximize the conversion rate, the production per unit time or minimize the costs or the waste produced?

  • If reactors of different internal volume are available, students could be challenged to try and scale up the reaction.

  • Finally, if students and / or teachers observe the same problem that we describe in reference 36, a challenging option might be to try and find the cause of the infrequent failure.

Experimental

Determination of relative conversions

Microreactor setup

All flow chemistry experiments were conducted using a FutureChemistry b330 FlowStart education setup, consisting of three syringe pumps, a temperature controller and a microreactor holder equipped with a Peltier element. The microreactor was a FutureChemistry ‘Short Quench’ microreactor consisting of borosilicate glass, with an internal volume (measured between the point where solutions 1 and 2 are mixed and the point where solution 3 is added) of 1 μL. The syringes used for dispensing the reactant solutions were two gas-tight 5 mL borosilicate glass syringes and one gas-tight 1 mL borosilicate glass syringe (Integrated Lab Solutions GmbH). Connections between syringes and the microreactor consisted of FEP tubing, 1/16” O.D., 0.50 mm I.D. (IDEX art. Nr. 1548 L).

All experiments were conducted with solutions in dichloromethane (Fisher Scientific, purity ≥99%) made from the chemicals as obtained from the manufacturers without further purification or drying: trifluoroacetic acid (Alfa Aesar, ≥99%): 0.4 M; dimethyl sulfoxide (VWR Chemicals, technical grade): 0.6 M, together with benzophenone hydrazone (Acros Organics, purity ≥98%): 0.2 M; N,N-diisopropylethylamine (Fisher Scientific, purity ≥98%): 1.435 M. The solution of dimethyl sulfoxide and benzophenone hydrazone was freshly made on a daily basis, since after a day of standing it became slightly opaque and a water-soluble precipitate formed at the bottom of the flask.

UV-analysis

All quantitative Vis spectroscopic measurements for determination of relative conversions were performed off-line on a Shimadzu UV-1800 UV-Vis spectrophotometer using a semi-micro quartz cuvette with a pathlength of 1 cm.

Purification trial

For the ‘purification trial’ of 2, fresh bottles of the same chemicals were used, with the exception of: dimethyl sulfoxide (Acros Organics, purity ≥99.7%, ‘Extra Dry’) and benzophenone hydrazone, which was recrystallized from a minimum volume of hot ethanol and dried in vacuo at 35 °C.

To the collected product solution in dichloromethane (approximately 20 mL) an equal volume of pentane was added. The resulting organic phase was subsequently washed with saturated sodium bicarbonate solution (1 × 20 mL), water (3 × 20 mL) and brine (2 × 20 mL), and dried over sodium sulfate. The solvent was removed in vacuo at room temperature. The residual dark purple-red oil was dissolved in a minimal amount of pentane and filtered over basic alumina (approx. 3 cm). The solids were rinsed with pentane until the filtrate was colorless. The filtrate was evaporated in vacuo at room temperature, yielding the product as a dark purple-red crystalline solid.

All NMR spectra were collected on a Bruker 300 MHz Avance III HD spectrometer equipped with a BBO probe at 298 K with a 1H frequency of 300.13 MHz and a 13C frequency of 75.48 MHz. Tetramethylsilane (δ = 0.00 ppm) or the residual protons of the deuterated solvent were used as internal references. 1H-13C HSQC spectra were acquired using a 2870.6 Hz spectral width in F2 and 12,500 Hz spectral width in F1 using 512 × 256 points and processed to 512 × 512 points, 4 scans per increment, relaxation delay of 1.5 s and 1-bond JCH = 145 Hz. 1H-13C HMBC spectra were acquired using a 2873.6 Hz spectral width in F2 and 16,778.5 Hz spectral width in F1 using 512 × 128 points and processed to 512 × 512 points, 8 scans per increment, a relaxation delay of 1.5 s and long-range JCH = 8 Hz.

1H NMR (CD2Cl2, 300 MHz): δH 7.45–7.37 (4H, m, H3, H5, H10 and H12), 7.35–7.29 (4H, m, H2, H6, H9 and H13), 7.24–7.17 (2H, m, H4 and H11). 13C{1H} NMR (CD2Cl2, 75 MHz): δC 130.0 (s, C1 and C8), 129.5 (s, C3, C5, C10 and C12), 126.0 (s, C4 and C11), 125.5 (s, C2, C6, C9 and C13), 62.7 (s, C7).). FT-IR (diamond ATR): 3057w (br, aromatic C-H), 3030w (br, aromatic C-H), 2032s (diazomethane N-N stretch), 1592 m (aromatic C-C), 1492 m (C-C), 1262w (C-N), 1075w, 1030w, 747 s, 688 s, 649 m, 472 m

Safety

All experiments should be conducted in a fume hood. All chemicals should be treated with normal precaution: we teach our students to look up the safety information for all chemicals and products in the appropriate MSDSs themselves. They also have to come up with ways to quench and dispose any resulting reaction mixtures, products, solvents, etc. This information is discussed with a teacher or TA prior to performing the experiment.

For this experiment in particular, note that DMSO increases uptake of other chemicals through the skin. The produced diphenyldiazomethane is unstable and, like all diazo compounds, toxic and potentially explosive in purified form; complete purification is not recommended for undergraduate students. The produced diazo compound can be quenched using small amounts of dilute acetic acid or another dilute acid.

Consider having students wear appropriate gloves when filling, attaching or detaching syringes. To take up liquids in the syringes used for dispensing the liquid in the experiment, we used blunt needles (Sterican MIX 1.20 × 40 mm, B. Braun Melsungen AG).

Conclusion

We have presented a challenging flow chemistry experiment involving the synthesis of diphenyldiazomethane. Readers of this journal will no doubt agree that it is important for chemistry students to become acquainted with flow chemistry in their education. The presented experiment is suitable for this goal, but also provides an opportunity for activating and applying prior knowledge about various other chemical subjects. An important reason for this is the fact that multiple flow chemistry experiments can be performed in a limited amount of time. To paraphrase (1): in fact, more generally, chemical educators should realize that whenever they would want to teach techniques or concepts that benefit from repeatedly carrying out the same reaction (e.g. optimization, determining the scope or the kinetics of a reaction), it is advantageous to conduct the reaction in flow, not only due to the superior control over the reaction conditions and the resulting reproducibility of the process, but mainly due to the fact that multiple experiments can easily be conducted within the limited time frame of lab courses.