1 Introduction

Increasingly in analytical sciences, research has been devoted to the development of miniaturised devices, and chemical research has been turning to microfluidic technologies to develop smaller analysis systems, with the goal of creating a laboratory on a single chip. Microfluidic technology involves the manipulation of fluids in channels at length scales of less than a millimetre, enabling the use of smaller quantities of reagents, high throughputs, low costs and smaller footprints (Haswell and Watts 2003). This has found use in chemical synthesis (Elvira et al. 2013; Chia et al. 2011; Garcia-Egido et al. 2002) and in the biological sciences (Woolley and Mathies 1994; Srinivasan et al. 1997).

Absorbance spectroscopy is well established as a useful, non-invasive tool for the analysis of chemical reactions in microfluidic devices (Mogensen et al. 2004; Buchberger 2000). Light passing through a chemical solution is attenuated by the chemical depending on the wavelength of the incident light and the light-absorbing properties of the more conventional bulk material. The technique finds practical uses in monitoring the colour consistency of commercial hair dyes. We use this reaction as test model for our method within microfluidic channels as it is a multiphase reaction with a gaseous reactant product.

Hair colouring is a modern global process employed by men and women of all ages. In 2014, the hair colourant industry was worth \(\pounds 466\) million in the UK (http://www.statista.com/statistics/397853/uk-hair-colourant-market-value-united-kingdom-by-category/), and in a growing industry such as this, it is becoming necessary for companies to be able to carry out testing of this product with greater speed and accuracy. To monitor such a reaction where a colour change takes place, optical spectroscopy is an ideal choice, and typically absorbance spectroscopy is used to compare the white light spectra of the dyes over time and hence monitor the rate of hair dye development. This allows a library of absorbance spectra to be built from many measurements as a standard, and batches of hair dye and specifically new and evolving formulations which fall outside certain defined parameters in this library are rejected. However, this method requires a large level of user input and fairly large quantities of samples and is not ideal when developing new formulations.

Hair dye is a complex mixture of reactants, which includes chemicals to manipulate the hair follicle itself; the absorbance of the dye is modelled as a pseudo-first-order reaction. This is given by the following equation (from private communication with Procter and Gamble GmbH)

$$A_t = A_{\infty }- de^{-k^{\prime}t}$$
(1)

where \(A_t\) is the absorbance at time t, \({A_{\infty }}\) is the final absorbance of the mixture at time \(t=\infty \), d is the difference between the initial absorbance of the sample \(A_0\) and final absorbance \({A_{\infty }}\) and \(k^{\prime }\) is a pseudo-first-order rate constant specific to the reaction and to the absorption depth of the sample. As the reaction progresses, it is known that the absorption profile changes, the exact change depending on the specific dye tone.

The rate constant, \(k^{\prime }\), is calculated for each sample and compared to an industry standard. Samples for which the calculated rate constant falls outside a certain percentile are rejected.

We present a microfluidic-based absorbance spectroscopy method in which the rate of such multiphase reactions, or more complex ones, can be measured with low volumes of material and the removal of artefacts caused by gas bubbles.

2 Experimental

2.1 Flow slides and set-up

The current method of testing the chosen reaction involves the use of a commercial spectrometer and manual mixing methods. However, at the product development stage this uses fairly large sample volumes (of several millilitres) and requires a significant level of human interaction. It would be useful to have a fully automatic microfluidic system to both mix and test such formulations, in particular in the product development and formulation phase. It is thus necessary to study the effects of reduced volume, of flowing solutions and the complication of gas within a microfluidic system on the absorbance of the reactants. Initially two configurations of channel were used to fully understand the complications of miniaturisation in terms of monitoring the reaction: one with the same path length as the commercial spectrometer and one with a vastly reduced volume and path length to test the lower limits of the quantities of reactants which may be studied.

The dimensions of the flow channels used are shown in Fig. 1. Channel (a) was a thin bottomed flow channel from Micronit Microfluidics, with a channel volume of \(2.8\,\upmu \hbox {l}\), channel width of \(1000\,\upmu \hbox {m}\) and path length of \(47\,\upmu \hbox {m}\). Channel (b) was a flow channel built in house with a channel volume of \(250\,\upmu \hbox {l}\) and an optical path length of \(1000\,\upmu \hbox {m}\). In the larger spectrometer system currently used in industry, 20 ml of solution is made up and \(20\,\upmu \hbox {l}\) of this is pipetted into a spectrometer analysis cell with a path length of \(1000\,\upmu \hbox {m}\). A decrease in the absolute absorbance values compared to the standard spectrometer is thus expected for channel (a) due to a lowered path length from the Beer–Lambert law, and therefore a lowered signal-to-noise ratio, whereas for channel (b) we would expect similar signals.

Fig. 1
figure 1

a Image of the standard commercial flow channel (from http://www.micronit.com/products/flow-cells/) and cross section b Image of the homemade channel and cross section

The light source itself was comprised of several LEDs, as shown in Fig. 2, along with their combined spectrum. LEDs were used due to their high intensity and wavelength stability over time, as opposed to a tungsten light source; the combination of the three LEDs prevents low signal to noise in the region from 470 to 500 nm where white LED intensity is typically low. The LEDs used were Roithner 1W LEDs and were comprised of a ‘warm white’ LED (\(\hbox {LED}_3\)), a 470-nm centre wavelength LED (\(\hbox {LED}_1\)) and a 490-nm centre wavelength LED (\(\hbox {LED}_2\)).

Fig. 2
figure 2

A schematic of the experimental set-up, for each channel. Abbreviations BS = 50:50 beam splitter, ND = neutral density filter (OD=0.2), F = 0.22NA fibre, \(\hbox {PH}_1/\hbox {PH}_2 = 200\,\upmu \hbox {m}\) (for channel a) or \(400 \,\upmu \hbox {m}\) (for channel b) diameter pinhole, M = mirror, MC = microfluidic channel

Any unwanted light scattering from the surface of the channel will act to further decrease the signal. It was thus decided that the instrument should be designed to reduce scattering from the edges of the channel while analysing as large a volume from within the channel as possible. For channel (a), a pinhole (\(\hbox {PH}_1\)) with a \(200\,\upmu \hbox {m}\) diameter was imaged onto the sample with microscope objectives \(\hbox {MO}_1\) to create a localised volume in the sample. The transmitted light was collected by \(\hbox {MO}_2\). Both \(\hbox {MO}_1\) and \(\hbox {MO}_2\) had a numerical aperture of 0.25. For channel (b), a larger pinhole (\(\hbox {PH}_1\)) of \(400\,\upmu \hbox {m}\) was used with the same microscope objective. A compromise must be reached with regard to the pinhole size and numerical aperture of the lens used. A smaller pinhole and larger numerical aperture will restrict the confocal depth of field, and it is advantageous if this matches the depth of the channel, which results in more light probing the actual sample. However, this introduces significant chromatic aberrations due to the wavelength range of the combined LEDs which gives incorrect spectra. The pinhole sizes and numerical apertures used were judged to give the best possible combination of low aberrations and confocal depth of field. A ND filter with an OD of 0.2 was placed in the spectrometer arm of the set-up, as the increased light levels required for good camera images (acquired at a high enough frame rate to minimise blurring) tended to saturate the spectrometer detector.

2.2 Sample preparation and procedure

Hair dye (i.e. the trial sample) is a viscous gel mixture which allows for easier application to hair (hereafter referred to as the gel ‘chassis’) and must first be diluted to increase its transparency and permit light to pass through the sample to be analysed. The chassis is diluted in water by carefully introducing and expelling the mixture in and out of a pipette to prevent bubble formation, while the sample was visually inspected for uniform mixing. Hydrogen peroxide and a metal catalyst were diluted and then mixed together in a 1:1 ratio to create a peroxide–catalyst mixture, which was left for 30 s to allow oxygen to develop. This was then added to the diluted hair dye and mixed carefully for a few seconds. It is important to make sure the two are mixed adequately so that a representative sample of this mixture may be taken. A small volume of the resulting solution (\(20\,\upmu \hbox {l}\)) was syringed out and introduced into the channel via PTFE tubing attached to the syringe via a Luer lock connector, at which time the program to control the experiment was started. The system is designed so that in the eventual full microfluidic set-up the syringing process may be automated through inert gas driven flow of the chemicals.

Spectra were taken using an OceanOptics USB2000+ spectrometer (0.1  nm resolution) controlled by a program written in LabVIEW with an integration time of 10 ms with 500 spectra averaged per reading, giving a time of 5 s per reading, every minute for 9 min. For comparison, the standard spectrometer system was wavelength scanning and had a total integration time of 1 min with no averaging taking place. The resulting large number of spectra was averaged due to the lowered light levels in the system from the addition of the pinhole and beam splitter in an attempt to increase the initial signal-to-noise ratio. Dark and reference spectra were taken with deionised water in the channel as the reference. Air is used as a reference in the standard spectrometer system, but it is difficult to clean and subsequently dry the channel sufficiently well that no water remains on the glass surface. Given the light is focussed, the difference in refractive between air and water (or hair dye) also causes light to be focussed to a different focal plane. Thus, it was necessary to redefine the reference spectrum as being the light intensity with water present rather than air.

Hair dye development is a process which intrinsically produces bubbles due to the reaction between the peroxide and the metal catalyst. These bubbles present less of a problem when analysing large volumes, but present a challenge in a microfluidic channel, where a 1-mm-diameter bubble, in open solution, occupies a length of several centimetres when enclosed in a thin channel. As removing the bubbles entirely would hinder the development of the dye, an Ethernet camera (Prosilica GS 650) was placed in the set-up to monitor the bubbles. The sample volume was reimaged to an alternate focal plane using two microscope objectives, as shown in Fig. 2. This enabled spectra to be rejected if required.

2.3 Spectral selection criteria

Robust rejection criteria for poor spectra were defined through the analysis of images of the channel taken concurrently by the camera. The system must not only be able to distinguish between the edges of bubbles (which are visible as dark areas in the image), but also non-uniform solutions and large bubbles that occupy the entire volume being analysed, which look similar to a uniformly mixed solution, as shown in Fig. 3. It was found that when the camera was simply placed in the transmission arm of the experiment after a beam splitter for the thinnest channel, images were poor. This is due to the fact that, while the centre of the channel may be the best volume from which to obtain spectra, it is not necessarily the best area for a good image. This is due to aberrations caused by the non-uniformity of the fluid. It might be tempting to move the camera to a different imaging plane, but both this gives rise to spherical aberration and the images are much dimmer. Given that both the illumination and transmission objectives must remain stationary to obtain spectra, it was decided that instead the focal plane should be reimaged remotely (Botcherby et al. 2007), which is achieved via microscope objectives \(\hbox {MO}_3\) and \(\hbox {MO}_4\) in Fig. 2. This is a technique generally used in high numerical aperture microscopy when the imaging objective either cannot be moved or where movement would cause significant specimen disturbance.

Fig. 3
figure 3

Images depicting examples of the possible camera images we can obtain, taken with a camera integration time of 100 ms. In a the image is ideal as it depicts a uniformly distributed mixture. In b the clear dark edges of a bubble flowing through the channel can be seen and thus the simultaneously obtained spectra will be suboptimal. In c, the chassis has not been mixed thoroughly enough and a large blob of chassis is flowing past. In d, the bubble flowing past is so large that its edges cannot be defined

The system is as follows, as shown in Fig. 2; a third objective (\(\hbox {MO}_3\)) is placed in the rear focal plane of the transmission objective, with the same numerical aperture. This creates an in-focus image of the focussed spot; however, a fourth objective (\(\hbox {MO}_4\)) is required to magnify this to fill the detector area. The third objective also serves to select the plane required for imaging. The detector is then placed in the plane of the correct, unaberrated image. A pinhole is used at the rear focus of the second objective to block out light from other planes.

The Ethernet camera was programmed using the same LabVIEW program used to obtain spectra to take an image for every spectroscopic reading. Figure 3 shows some examples of the camera images obtained and artefacts which may cause poor spectra to be obtained. In particular, there may be errors due to inadequately mixed solution. The gel hair dye is mixed with water and suspended in solution, but poor mixing results in large lumps of the gel chassis in the mixture. Figure 4 shows the criteria used for determining whether a spectral reading is compromised by either bubbles or poor mixing. Each image is cropped so only the image of the channel is analysed, and a histogram is built from the intensity value of each pixel in that image. Small bubbles or large clumps may be detected as a spike at low intensity values as there are more dark pixels [as shown in Fig. 3b, c, corresponding to histogram (c) in Fig. 4]. Thus, a limit to the number of pixels with an intensity value lower than, say 50, is set as a threshold for rejecting images, and thus, the corresponding spectra. Larger bubbles which fill the channel, however, may not be detected this way; Fig. 3d, which was obtained for a large bubble filling the entire field of view, looks very similar to that of a good reading, as shown in Fig. 3a. However, their corresponding histograms (Fig. 4b, a), respectively) may be used to distinguish the two, through analysis of the standard deviation of all pixels in an image. It can be seen that in all the histograms there are a peak number of pixels at an intensity value of around 150, and this peak is, in general, more frequent for good images, due to darker regions caused by small lumps of chassis in the diluted hair dye. In a single reading, there is thus less spread in the pixel values leading to a lower standard deviation around the mean for good readings, and thus, we may set a maximum threshold for image rejection, which in this case was set to 28, thus leading to rejection of the reading corresponding to histogram (b) in Fig. 4, with a standard deviation of 29.6. This was found to allow for the majority of poor readings to be rejected for the darkest hair dye shade. For other shades, the standard deviation threshold was adjusted due to the lighter colour of the dyes. The method was chosen for its speed and simplicity—however, more advanced image analysis methods could be adopted, for example, Fourier image analysis and feature tracking.

Fig. 4
figure 4

Figures showing pixel intensity (0–255) values against number of pixels, each corresponding to an example 5 s averaged spectrometer reading. 50 histograms are plotted for the 50 images taken by the camera in the 5 s, corresponding to 10 averaged spectrometer spectra. a is an example of a good reading, b is the typical histogram of imaging inside a bubble, and c is the obtained spectrum when a small bubble is present (the spike at the low RGB values indicates a dark bubble edge being detected)

3 Results

3.1 Absorbance measurements in a typical non-flow high volume spectrometer system

The results obtained in a typical spectrometer system may be used as a control to compare to the results obtained using the microfluidic channels. Figure 5 shows the expected relationship between the absorbance of a sample of brown hair dye at 1 mm path length (i.e. in a conventional cuvette) and wavelength over a time of 9 min in the conventional spectrometer system, with one reading taken every minute. We see that over time the absorbance increases, as we would expect, and the shape of the absorbance spectrum shows less absorbance at longer wavelength, which mirrors the optical properties of the dye shade, which absorbs blue light and reflects red and yellow light.

Fig. 5
figure 5

Absorbance spectra over a 9-min period (with readings at 1-min intervals) for a sample of brown hair dye, taken with the standard spectrometer system

Figure 6 shows the relationship between the rate constant \(k^{\prime }\) and the wavelength, for six different hair dye shades, ‘a’ being the darkest shade (brown) and ‘f’ being the lightest (blonde). The rate constant values at all wavelengths are much lower for lighter shades than for darker shades, most noticeably for the darkest shade ‘a’. This relationship between rate constant and wavelength sets a standard for all other hair dye batches to be compared to, similar to other monitored reactions in industry.

Fig. 6
figure 6

Relationship between rate constant and wavelength for six different hair dye samples: af, where a is the darkest shade and f is the lightest shade, taken with the standard spectrometer system

3.2 Absorbance measurements for a non-reactive dye

The experiment was carried out for a flow channel with the same path length as the spectrometer, initially with a non-reactive red food dye (E163 and E160c) to test the linearity of the system, as shown in Fig. 7. We can see that over 9 min there is a very small increase in absorbance over all wavelengths. This could be attributed to either changes in the LED light levels over time (an increase in resistance due to increased temperature could have reduced the light levels) or due to a small amount of excess water being flushed out of the system, causing a change in the overall dilution of the food dye. More likely, however, is the possibility of the food dye adsorbing to the channel surface over time, which we expect would lead to a small increase in absorbance; this may also occur with the hair dye chassis. This change is approximately \(5\%\) of the maximum absorbance per unit path length change for the standard spectrometer system over 9 min, suggesting the change may have a slight but predictable effect on the absorbance values obtained.

Fig. 7
figure 7

Absorbance spectra over a 9-min period (with readings at 1-min intervals) for a sample of diluted red food colouring, taken through a 1-mm-path-length flow channel. Error bars are too small to be resolved

3.3 Absorbance measurements for a wide flow channel

For a flow channel with the same path length as the spectrometer (though with a lower volume), the absorbance values obtained were expected to be similar, with some differences due to the use of water as a background reference. Figure 8 shows the obtained absorbance spectra over a period of 9 min for a sample of brown hair dye while the dye is flown through the system. The sample is introduced to the system via extracting a small amount of the mixed solution into a Luer lock syringe and then injecting into the microfluidic channel slowly; after 30 s from when the solution was mixed the timer is then started. The slightly larger values of absorbance may in part be attributed to the delay involved in the liquid reaching the sensing area of the channel, which takes longer than pipetting the solution into a spectrometer chamber.

Fig. 8
figure 8

Absorbance spectra over a 9-min period (with readings at 1-min intervals) for a sample of brown hair dye, taken through a 1-mm-path-length flow channel. Error bars are too small to be resolved

Figure 9 shows the relationship between the rate constant and the wavelength for all hair dye shades using the flowing system. There is some discrepancy compared to the spectrometer rate constant relationships shown in Fig. 6; the relationships are consistent for darker shades but less so for lighter hair colour shades. This may be attributed to the flowing of material in the channel. While very poorly mixed material is evident from images taken from the Ethernet camera, the material studied over time is constant in the spectrometer set-up and constantly changing for the flow set-up. It is possible that more readings need to be taken, or a different dilution method should be used. It is also likely that due to the use of a different reference material (water), a new standard set of spectra must be defined, and differences are more apparent in lighter shades as these have a lower absorption coefficient.

Fig. 9
figure 9

Relationship between rate constant and wavelength for six different hair dye samples: af where a is the darkest shade and f is the lightest shade, taken through a 1-mm-path-length flow channel

3.4 Absorbance measurements for a very thin flow channel

In the case of a much thinner flow channel, there was some difficulty involved in obtaining a set of good readings. Figure 10 shows the obtained absorbance spectra over a period of 9 min for a sample of brown hair dye while the dye is flown through the thinner channel, for (a) a sample of hair dye where there were no rejected readings due to bubbles, and (b) a sample where there were many rejected readings. The rejected readings are clear outliers in the absorbance plot; for sample (b) the method had clearly failed due to bubbles and the data were rejected with the camera program. For sample (a) the data was not rejected. An overall greater increase in absorbance is evident for this thin flow channel, which could be due to one or more of the dye components of the hair dye chassis sticking to the sides of the channel walls, like the dye in Fig. 7. This would have more of an overall effect on the absorbance per unit path length in a thin channel than in a wide channel for the same amount of adsorbed dye.

Fig. 10
figure 10

a Absorbance spectra over a 9-min period (with readings at 1-min intervals) for a sample of brown hair dye where no bubbles were detected, taken through a 47-\(\upmu \hbox {m}\) -path-length flow channel. b Absorbance spectra taken over a 9-min period at 1-min intervals for a different sample of brown hair dye where there were a large amount of bubbles detected. Data have been smoothed for clarity

Figure 11 shows the rate constants obtained for a range of good readings from the same tube of brown hair dye over a wavelength range of 450–650 nm. These plots show a basic resemblance to that of Fig. 5, as shown in the inset. However, the rate constant is reduced by a factor of 10 when calculated for the small absorbance values obtained in the thin channel. When calculated per unit path length, we find that the rate constant is actually higher compared to the rate constant in the wide channel, again possibly due to the greater effects of dye adsorbing to the walls in the smaller channel. Thus, the rate constant is related to the path length of the channel, and new rate constants must be defined depending on the channel width. This is not unexpected as the absorbance increases more rapidly when more dye is present in the wider channels, and possibly it might be necessary to redefine Eq. 1 to take this into account. Two-thirds of the plots lie within one standard deviations of the mean. This presents a more significant deviation from the mean than for a larger channel. This may be attributed to the lowered signal to noise from the use of a thinner channel which inevitably leads to lower absorbance values and also possibly to minor measurement errors in the mixing, which is much more of a problem at small scales. We may thus deduce that the results obtained in a thin channel are poorer than those obtained in a wide channel, and thus, the channel dimensions are important in reactions such as these.

Fig. 11
figure 11

Rate constant plotted against wavelength for 9 samples of the same brown hair dye shade, while using the thin channel. The shaded area represents the range of rate constant values which are within \(\sigma \) and \(2\sigma \) of the mean. Inset: the rate constant/wavelength relationship for a wide channel

4 Conclusions

We find that our absorbance spectrometer system obtains the expected rate constant/wavelength relationship for hair dye development over time (when compared with the standard spectrometer) and the occasional random errors, due to bubbles and lumps in the sample, decrease when the optical path length of the channel is increased. The largest variation in both our microfluidic method and the conventional cuvette and spectrometer method is due to the variability of the complex multiphase sample being analysed. Thus, when determining the major sources of error in the experiment, the accuracy of the method is dependent on how well the sample has been mixed and the variability between samples tested. The precision on the method, or the minimum detectable absorbance, is dependent on instrumental factors such as the detector noise on the spectrometer and the variability of the LED light source. This suggests that the technique has potential as a viable method of testing mixed-phase reactions in a larger automated microfluidic system. The method may thus have the potential to replace conventional absorption spectroscopy methods for quality control and formulation optimisation, though the ‘standard curve’ and rate constant in such a system may not be exactly the same as for bulk measurements due to added complications from using a microfluidic channel. For example, a problem is encountered due to the production of a gaseous by-product which interferes with the obtained spectra; this is mitigated substantially through both using a camera to monitor the gas production and using wider channels. The latter requires more compound to be used and thus the channel dimensions must be carefully chosen to minimise the volume of fluid used in the reaction. The production of gas bubbles could also be reduced through the use of a different pumping method other than syringe pumps, such as gas pressure powered flow, to prevent agitation of the fluid which causes further bubbles to be formed. Finally, chemical methods such as reducing the amount of peroxide–catalyst added to the solution could be used to chemically reduce the amount of gas formed, though this would also reduce the rate of the reaction, thus increasing the time taken for testing, and this must be balanced against whether time or accuracy is more crucial in the testing of the sample. The new method thus has flexibility for use in a range of reactions, though the specific testing protocol may need to be modified from that used on conventional bulk instrumentation.