Caffeine, although only first isolated in 1819, has been extensively consumed as caffeinated nutrients throughout eastern and western cultures for over a thousand years1,2. Its widespread consumption is attributed to its stimulating effects in the nerve cells3. Caffeine from beverages such as Cola could enhance the performance of athletes4, as well as reduce the possibility of type 2 diabetes5. However, caffeine is yielding either positive6 or negative effects7 in various types of cancer. It may also cause headache, abnormal heart rhythms, especially in children and pregnant women with caffeine allergy8,9,10,11,12,13,14. In addition, due to its abundant existence in domestic wastage, caffeine was found to be an important indicator of natural water system pollution by domestic drain15,16. Therefore, it is urgent to develop a convenient sensor tool to detect caffeine.

Traditional caffeine detection methods include thin-layer chromatography (TLC)17, high-performance liquid chromatography-mass spectrometry (HPLC-MS)18, quartz balance19 and immunoassay20. However, these methods require expensive instruments and sophisticated handling that are not convenient for public usage21. Chemosensors provide great prospects for caffeine identification. Recently, Waldvogel group reported the first artificial caffeine receptor, which is based on hydrogen bonding22. Subsequent research modified this receptor to achieve better binding affinity and selectivity23,24,25,26,27. Nevertheless, these interactions only occur in organic solvent which is not eligible in real life usage. The Reinhoudt group then reported an aqueous phase caffeine sensor based on the chelation between its metal centre and the 5-nitrogen of caffeine28. But its absorbance shift is not visible through naked eyes, thus requiring an absorbance detector. On the other hand, the Severin group reported an aqueous phase fluorescence turn-off caffeine sensor, HPTS, which binds caffeine based on π-stacking29. The authors tested this sensor in different samples by extraction method, yet the incorporation of toxic organic solvent (chloroform) and the fluorescence turn-off feature renders difficulties in real-life application. Although they further developed a similar-structure ratiometric caffeine fluorescence sensor and incorporated it into a caffeine detection strip30, it would still require more than 20 minutes for caffeine detection in beverages. Moreover, the relatively low fluorescence response adds difficulties to direct caffeine observation.

To achieve fast, sensitive and convenient caffeine detection, we developed an aqueous phase fluorescence turn-on caffeine sensor based on the screening of diversity-oriented fluorescence libraries (DOFL) and rational modification of the selected hit compound. This sensor exhibits tremendous fluorescence enhancement towards caffeine, which can be clearly seen even with naked eyes. To make caffeine visible for common people, we further develop a caffeine detection kit which is able to purify and concentrate caffeine from different samples. The sensor could respond to caffeine and show bright orange-red colour like a warning sign. Combining both fluorescent sensor and the detection kit, customers can easily tell the caffeine content in their beverages, in less than one minute.


Design of a BODIPY-based caffeine sensor

Figure 1 exhibits the structure of our caffeine sensor. It was achieved from screening of diversity-oriented fluorescence libraries (DOFL) and rational modifications31. One compound (BD-185) which exhibits fluorescence increase to caffeine has been discovered by an unbiased DOFL screening system. BD-185 contains a bromo-substituted indole motif conjugating to the BODIPY core and exhibits remarkably bright emission upon treatment with caffeine. To figure out the role of bromine-containing indole, we synthesized 4 derivatives of BD-185, which only modify the indole moiety. Among them, the BODIPY compound bearing a fluorine atom yielded highest fluorescent intensity towards caffeine (Fig. S1 to S5). Therefore, it was selected as the final caffeine sensor and named as Caffeine Orange (CO). CO exhibits dissociation constant (KD) of 16.81 mM and detection limit of 50 μM (Fig. S6). The concentration-dependent colour changes could be observed under the irradiation of a green laser pointer at 532 nm by naked eyes (Fig. 1b). We then tested this interaction under different conditions. In organic solvents there was no caffeine dose-dependent fluorescence responses since (Fig. S7). However, when we dried the organic solutions, the fluorescence responses recovered and the fluorescence intensity was even stronger than the aqueous solution (Fig. S8). To our knowledge, this is the first report on BODIPY-based fluorescence turn-on caffeine sensor that works both in aqueous solution and in dry state.

Figure 1
figure 1

Fluorescence responses of CO against caffeine.

(a) Fluorescence spectra of CO (10 μM) with different concentration of caffeine in water under excitation of 532 nm green light. Inset is the structure of CO. (b) photographs of CO (10 μM) aqueous solutions containing caffeine concentrations from 0 mM to 50 mM under the irradiation of a 532 nm green laser beam.

Determination of the binding event

To elucidate how CO and caffeine interact, we first injected a mixture of CO and caffeine into the HPLC-MS. Two separate peaks were observed (Fig. S9), which indicates that there is no covalent interaction between CO and caffeine. Next, we performed Fourier transform infrared spectroscopy (FT-IR) (Fig. S10a) in an attempt to identify the likely non-covalent interaction between CO and caffeine. Figure S10b shows the peak at 3,379 cm−1 shifts to 3,289 cm−1 and broadens. It refers to hydrogen bond between N–H group of CO and caffeine32. The shifted peaks of 790 cm−1, 1,165 cm−1 and 1,504 cm−1 are due to π-stacking, which causes bending vibration and ring torsions (Fig. S10c)33,34,35.

To further confirm this hydrogen bond and π-stacking interactions, we performed NMR titration experiments. Figure 2a shows that the indole N–H proton shifts from 8.60 ppm to 9.58 ppm, which indicates the formation of hydrogen bond between CO and caffeine22. Majority of the aromatic protons of CO exhibit upfield shift of around 0.1 ppm as caffeine amount increases (Fig. 2b). In fluorine NMR spectra, the upfield chemical shift of indole F from −121.5 ppm to −121.6 ppm demonstrates the involvement of F atom in the interaction (Fig. S11a). Figure 2b & Figure S11b exhibit that caffeine aromatic proton and three methyl protons all show upfield shift of around 0.05 ppm. The NMR titration results confirm the mutual shielding effect of caffeine rings on CO molecule. Hence, we can infer that these two molecules interact by π-stacking and hydrogen bond interactions.

Figure 2
figure 2

NMR titration experiments of CO against caffeine.

(a)1H NMR titration of CO with caffeine (amine). From bottom spectrum to top spectrum, they represent different molar ratios of CO against caffeine, from pure CO (n = 0) to much caffeine excess (n = 32). n is the equivalent of caffeine to CO. (b)1H NMR titration of CO with caffeine (7.70–6.30 ppm range). Inset refers to the proton labelling scheme. The detailed NMR condition has been depicted in Methods.

BODIPY dyes are known to self-assemble and self-quench in aqueous solutions36,37. To understand how CO fluoresces upon addition of caffeine, we first conducted dynamic light scattering (DLS) analysis. Figure S12 indicates that CO aggregates in aqueous phase with an approximate radius of 20 nm, which corresponds with previously published results36. Next, to confirm the existence of CO aggregates and to analyse the condition of CO in the presence of caffeine, we performed imaging by transmission electron microscopy (TEM). As shown in Fig.S13, the size of CO-caffeine complex increases with the addition of caffeine. This indicates that the ambient environment of CO is changed with the addition of caffeine. CO-caffeine interaction disassembles the aggregates of CO molecules and leads to the formation of larger complexes. Thus, the self-quench of CO in aqueous solution is reverted and its intrinsic fluorescence shows up.

Selectivity test and development of caffeine detection kit

To test the possibility of developing CO into a feasible caffeine detection kit, we tested its selectivity against other bio-related molecules and caffeine analogs, which may interfere with its fluorescence response. Through in-house screening, we found that CO exhibits superior selectivity towards caffeine, which rules out the likelihood of interference during detection (Fig. S14 & Fig. S15, Table S1). Moreover, CO demonstrates good selectivity for various caffeine analogs, such as theophylline and theobromine, which have been difficult to differentiate by previously reported caffeine receptors (Fig. 3a, Fig. S16). Caffeine yielded a 2-fold and 5-fold fluorescence enhancement as compared to theophylline and theobromine, respectively, while none of the other caffeine analogs exhibit substantial fluorescence response towards CO. Thus, we can safely differentiate caffeine from theophylline and theobromine, based on their remarkably different fluorescence responses. Furthermore, the caffeine amount in beverages significantly outnumbers theophylline and theobromine, which means that CO can be reliably developed into a selective and sensitive caffeine detection kit38.

Figure 3
figure 3

CO selectivity and its application to detect caffeine amount.

(a) Selectivity of CO (10 μM) against different caffeine analogs (1 mM). (b) Fluorescence spectra of CO (10 μM) incubated with normal coffee and decaf after extraction processing. (c) Photographs of CO (10 μM) solutions containing eluents from different coffees (left: normal coffee; right: decaf) under irradiation of a green laser pointer (532 nm). Values are represented as means and error bars as standard deviations (n = 3).

To make caffeine visible, we developed a caffeine detection kit to extract caffeine from beverages with complicated impurities and tested its eligibility to differentiate normal coffee and decaffeinated coffee. A syringe inserted with reverse phase materials was used for the elimination of auto-fluorescent impurities. A short C4 column rinsed with 75% ethanol (EtOH)/H2O was first loaded with coffee samples and then washed with K2CO3 (1 mM) and deionized water, followed by eluting with 15% EtOH/H2O. The eluent was collected and mixed with CO and small amount of EtOH (final CO concentration is 13.5 μM, EtOH amount 15%). Under the irradiation of a green laser pointer (532 nm), coffee and decaf samples showed remarkable colour differences. Coffee gave a reddish orange colour, while a yellowish green hue is observed for the decaf sample (Fig. 3c, Fig. S17 & S18). The amount of caffeine in both coffee and decaf samples can also be accurately measured with the help of fluorescence standard curve (Fig. 3b, Fig. S19 & S20). Furthermore, the whole extraction and detection process can be completed within a minute, making it highly practical in real-life caffeine detection. This further demonstrates the feasibility of developing CO into a portable caffeine detection kit and quantifying the caffeine amount in various beverages (Details in Methods and movie supporting information 1).

To test the applicability of our caffeine detection kit, we estimated the caffeine amounts of various beverages and compared them with the actual caffeine amounts acquired from HPLC measurements (Fig. 4 upper, Table S2). As shown in the Fig. 4, results from the HPLC and the fluorescence data correlate very well, thus we confirm that this caffeine detection kit could achieve rapid, as well as sensitive measurement of caffeine. For the convenience of general users, we constructed a caffeine concentration-dependent colour bar with high amount of caffeine exhibiting red colour and low amount of caffeine showing green colour (Fig. 4 lower). Since different amounts of caffeine show different colours in our detection kit, by comparing the observed colour with the reference bar, we can easily estimate the amount of caffeine present in the sample. This is referred to as a “traffic-light caffeine amount designator”, with the reddish orange colour indicating a stop sign for people who cannot uptake caffeine, Yellow colour as a warning and green colour indicating a safe zone. Thus, users could rapidly make a decision as to enjoy the beverage or not.

Figure 4
figure 4

The comparison of caffeine concentration acquired from HPLC and fluorescence methods.

Y-axis indicates the caffeine concentration and X-axis indicates different types of drinks. Grey bars indicate caffeine concentration derived from HPLC and colourful bars indicate caffeine concentration derived fluorescence, both after extraction processing. The bar below is correlating with the colour that different concentrations of caffeine in the drinks could expose. Values are represented as means and error bars as standard deviations (n = 3).

Development of automated caffeine detection system

To fully utilize our traffic-light caffeine sensor, we setup an automated system by incorporating microfluidics technique. The whole extraction process can be fully automated using a centrifugal device. As shown in Fig. 5a, the disc (dia. = 12 cm) has chambers for coffee sample (1.2 mL), 75% EtOH (400 μL), K2CO3 (200 μL), deionized water (DI) water (200 μL), 15% EtOH (200 μL) and CO (0.1 mM, 22 μL). The detail of the disc fabrication and the valve actuation mechanism is reported elsewhere39,40,41. In brief, the microfluidic channels and chambers are fabricated by CNC-micromachining and the device is composed of three pieces of polycarbonate disc. The 5 mm thick middle disc has a through-hole for C4 column, which is prepared by packing the C4 particles between the frits. The top disc has sample injection holes and the ferrowax microvalves are actuated on demand by laser irradiation.

Figure 5
figure 5

Microfluidics device that can be utilized for automated caffeine amount determination in beverages.

(a) The photograph of a disc for fully automated caffeine detection. The disc design shows detailed microfluidic layout. The number indicates the order of the valve operation and arrows indicate the flow of reagents. The red circles with numbers are normally closed-laser irradiated ferrowax microvalves and the blue circles with numbers are normally open-laser irradiated ferrowax microvalve. (b) The CCD images of the spinning disc at each reaction steps. (c) The calibration curve obtained using the lab-on-a-disc and caffeine solution with known concentration. Each data points are an average of 4 samples tested with 4 different discs. (d) Caffeine concentration measured by fully automated lab-on-a-disc with real beverage samples; Decaf (Caffe Vergnano 1882), Coca-Cola, Red Bull (energy), Coffee (Angelinus Americano) and Espresso (Nespresso Roma). Values are represented as means and error bars as standard deviations (n = 3).

As the disc spins (3,000 rpm, 1 min), 75% EtOH solution is transferred to C4 column, while big particles in the coffee sample sediment in the sample chamber. After opening valve #1 by laser irradiation, 1 mL of supernatant particle-free coffee sample is transferred into the C4 column chamber and the input channel is blocked by closing valve #2. Then, the C4 column is washed by K2CO3 and DI water by actuation of valves #3 and #4, respectively. Then, the channel to the waste chamber is closed by laser irradiation on valve #5 and the caffeine is eluted and transferred to the detection chamber by actuation of the valves #5 and #6. The eluted caffeine is mixed with pre-stored CO and the final concentration is measured under excitation at 532 nm with an optical fiber-coupled spectrophotometer. The total spin process takes about 5 minutes and can be further reduced by modifying the spinning velocity (Table S3). Figure 5b shows CCD images at each step (movie supplementary information 2). The calibration curve obtained using samples with known caffeine concentration showed good dynamic range and reproducibility (Fig. 5c). Figure 5d shows data measured with real beverage samples using the lab-on-a-disc. Hence, using this lab-on-a-disc device, caffeine extraction and detection can be fully automated and users can easily measure caffeine amount.


DOFL has shed light on sensor development in the past decade42,43,44. Through the high-content screening of more than 8,000 fluorescent compounds that cover the whole UV-Vis spectrum, we found the prototype caffeine sensor (BD-185). The structural diversity of our fluorescent compounds renders us confidence that the interaction between BD-185 and caffeine is specific and selective, yet we would like to investigate more deeply into the binding event. First we ruled out the possibility of single BODIPY interaction, since this fluorescent core has been widely explored at most of the positions in our DOFL and only the indole-bound dye shows response towards caffeine. Thus we next selected out all of our indole-bound BODIPY dyes and test their responses. Figure S4 clearly exhibits that any modification to the effective structure, such as when the Br atom of indole is replaced with methoxy, methyl or simply removed, will result in disappearance of fluorescence responses. Though limited by the indole diversity, we have already learned that Br atom plays an important role in the interaction. As is already known, heavy atoms lead to low fluorescence quantum yield45. Furthermore, if Br participates into the interaction through intermolecular binding, it is reasonable to infer that lighter atoms could achieve stronger interactions. Thus we tried to replace Br with Cl and F and successfully observed stronger fluorescence responses and binding affinity (KD(Br) > KD(Cl) > KD(F), Fig. S6).

Two aqueous sensors were reported by Severin group, both of which utilize π-stacking as the driving force for binding caffeine29,30. CO, on the other hand, interacts with caffeine not only through π-stacking, but also through hydrogen bonding and electrostatic interactions, as exhibited by FT-IR and NMR. However, π-stacking and other non-covalent forces are well-known to cause fluorescence quenching due to the formation of low-lying dark excited states45. Thus it is extremely difficult to induce substantial fluorescence turn-on phenomenon based on π-stacking. BODIPY dyes are well-known to exhibit self-assembling/self-quenching phenomenon in the aqueous phase. Combining these two properties, we designed this turn-on sensor. The interaction of CO and caffeine is strong enough to disassemble CO aggregate and force large excess of caffeine to circle around the CO molecules as shown by TEM. Inside caffeine protective layer which is highly hydrophobic, CO molecules could fully stretch and maximally reduce inter-/intramolecular energy loss and thus its fluorescence emission could be observed.

The centrifugal microfluidic discs has emerged as a promising tool for point-of-care diagnostics devices to miniaturize and automate biochemical assays46. For example, “Sample-in and answer-out” type of fully automated immunoassays and blood chemistry analysis have been demonstrated on a centrifugal microfluidic disc starting from whole blood39,40,47. It has been also applied to environmental applications to test water and soil quality. Lafleur et al. measured organic pollutants directly on the sorbent materials after pre-concentration in a solid phase extraction (SPE) microcolumn on a disc48. However, to the best of our knowledge, a fully automated integration of SPE protocols including sample injection, binding, washing, elution and detection has never been demonstrated before. In the lab-on-a-disc used in this study, the sorbent materials are packed not in the radially located microcolumn, but between supporting frits located between the top and the bottom discs, which provide reduced flow velocity for the efficient SPE extraction. In addition, the outlet from the SPE chamber has the serpentine channel to control the flow resistance. With the lab-on-a-disc developed in this study, users can have on-site information about the caffeine amount simply by spinning the disc with just one manual step of injecting the beverage sample on a disc.

Prior to this caffeine “traffic-light” designator, no practically applicable and customer-friendly caffeine detection methods have been reported. The detection kit developed in our group has several advantages: (I) it is easy to construct and simple to handle. The whole kit requires just one syringe equipped with reverse-phase materials and several washing solutions. Its incorporation into automated system has enhanced the handling even greater. (II) The detection process is safe and customer-friendly. No organic solvent is involved in the extraction process. (III) The caffeine extraction procedure is very fast, taking less than one minute. The customers can apply the kit as soon as they wish to enjoy the beverages or measure any sample. (IV) The detection kit shows great adaptability. It has been proven that the detection could extract caffeine from different beverages that are both chemically and physically complicated. Partial purification could not only remove most of the auto-fluorescent impurities, but also is very timesaving. The remarkable selectivity of CO could greatly reduce the efforts to purify the samples. (V) The dose-dependent colour bar renders direct visualization of caffeine amount in the sample. Thus the detection could function like a pH paper and clearly guide the customers to make decision. (VI) The automated microfluidics system serves as an upgraded version of portable caffeine detector and produces an even safer and convenient approach for caffeine monitoring.

In summary, we report the first BODIPY-based fluorescence turn-on caffeine sensor that works in aqueous solution. The fluorescence colour changes with caffeine concentrations and shows a traffic-light distinction. The interaction properties of CO with caffeine has been systematically explored with LC-MS, FT-IR spectroscopy, NMR, DLS and TEM approaches. The results demonstrate that the change of CO ambient environment driven by hydrogen-bond and π-stacking between CO and caffeine molecules renders CO a remarkable fluorescence turn-on feature and good selectivity. A caffeine detection kit was developed in order to purify beverage samples and achieve the quantitative measurement of caffeine. To facilitate the usage of our caffeine detection kit in real life, we tested its eligibility for numerous beverages and constructed a “traffic-light caffeine amount designator”, which could help estimate caffeine amount even faster. Furthermore, the whole process can be automated using microfluidics devices. The caffeine sensor and detection kit not only can help enhance product safety during the extensive consumption of caffeine, but also serve as a practical path of uniting science with real life.


Synthesis of (E)-5,5-difluoro-3-(2-(5-fluoro-1H-indol-3-yl)vinyl)-1-methyl-5H-5l4,6l4-dipyrrolo[1,2-c:2',1'-f][1,3,2]diazaborinine (Caffeine Orange)

2, 4-dimethyl pyrrole 1′ (15 mg, 68 μmol) and 5-fluoro-1H-indole-3-carbaldehyde 2′ (136 μmol, 2 equiv.) were dissolved in 2 mL acetonitrile, with 6 equiv. of pyrrolidine (48 μL) and 6 equiv. of acetic acid (32 μL). The mixture was shaken at 85°C for 5 minutes, followed by immediate cooling down to zero degree. The resulting crude mixture was concentrated under vacuum and purified by flash column chromatography on silica gel (dichloromethane-methnol: 9:1) to afford 3′ as a dark purple solid (10 mg, 27 μmol, 40% yield, 99.9% purity, Figure S1). 1H NMR (500 MHz, CDCl3): δ 8.64 (s, 1H), 7.65 (s, 1H), 7.60 (dd, J = 9.5, 2.1 Hz, 1H), 7.55 (d, J = 2.6 Hz, a), 7.53 (s, 2H), 7.30 (dd, J = 8.8, 4.3 Hz, 1H), 7.09 (s, 1H), 7.01 (td, J = 8.9, 2.3 Hz, 1H), 6.87 (d, J = 3.5 Hz, 1H), 6.75 (s, 1H), 6.44 (dd, J = 3.4, 2.2 Hz, 1H), 2.31 (s, 3H); 13C NMR (125 MHz, CDCl3): 160.59, 159.91, 158.02, 144.59, 138.29, 136.85, 133.86, 133.41, 132.72, 129.24, 125.87, 124.07, 121.04, 117.05, 115.70, 115.60, 114.77, 112.61, 112.53, 111.98, 111.77, 105.74, 105.55; 19F NMR (282 MHz, CDCl3): 19F NMR (282 MHz, CDCl3) δ -121.50 (td, J = 9.3, 4.4 Hz), -143.21 (dd, J = 63.5, 31.9 Hz); HRMS (C20H15BF3N3Na): calc. [M + Na]+: 388.1207, found [M + Na]+: 388.1208.

1H &19F NMR titration test

6.7 mg CO compound was dissolved in CDCl3 solvent; the concentration was determined to be 18.4 mM and its1H &19F NMR were first measured on a Bruker DRX 500 NMR spectrometer and Bruker DRX 300 NMR spectrometer. Then the solution was added to a tube pre-filled with 3.6 mg caffeine, mixed well and then transferred back to the original NMR tube. Caffeine concentration was estimated to be 18.4 mM and CO-caffeine molar ratio was 1-1. After measuring its1H &19F NMR, the solution was transferred to a tube pre-filled with 3.6 mg caffeine, which made the molar ratio of CO-caffeine be 1-2. After measuring its1H &19F NMR, the solution was transferred sequentially to tubes containing 7.2 mg, 14.4 mg, 28.8 mg and 57.6 mg caffeine, which made the molar ratios be 1-4, 1-8, 1-16 and 1-32.

FT-IR measurement of CO-caffeine mixture

CO & caffeine were first dissolved in dichloromethane and then dried, hence well-dispersed mixture was formed. The mixture was added into potassium bromide (KBr) crystals and mashed to fine powder. The fine powder was made into small transparent tablets and its FT-IR spectrum was measured using SHIMADZU IRPrestige-21 Fourier transform infrared spectrophotometer.

Transmission electron microscopy observation

In TEM imaging test, different solutions were first prepared in deionized water and deposited on a thin copper-support film, followed by drying in vacuo. Images of the samples were obtained with JEOL JEM 3010 HRTEM microscope and operated at 100 kV without any contrast agent.

Measurement of dynamic light scattering

The dynamic light scattering was measured at 25°C in deionized water using quartz cell. DMSO solution of caffeine was slowly added to water (1% (v/v)) and gives 10 μM concentration. All measurements were performed in triplicate in Zetasizer Nano ZS.

Reverse-phase syringe-based caffeine extraction procedure

Reverse phase solid phase extraction (SPE) syringe was prepared by breaking two OROCHEM 3 mL C4 SPE cartridges (200 mg, 3 mL size) and inserting the reverse phase gel into a BRAUN Injekt 5 mL/Luer Solo syringe. The syringe was first blocked with one frit and input with gel; after then another frit was inserted to cover the top and packed tightly. The SPE syringe was first rinsed with 75% EtOH in H2O (2 mL) to fully swell the gel. Caffeine was adsorbed onto gel surface by pushing 5 mL of beverage samples through the SPE cartridge. The SPE cartridge was washed sequentially with 1 mL of 1 mM K2CO3 and 1 mL of H2O, followed by elution with 1 mL of 15% EtOH in water. The eluent was collected in a glass tube containing 15 μL 1 mM dye solution and 100 μL EtOH. The mixture was visualized with a green laser pointer (5 mW, 532 nm, Aurora).

Caffeine extraction procedure on a disc

Reverse phase SPE was prepared by packing 40 mg C4 gel on a disc. The reverse phase SPE was rinsed with 0.4 mL of 75% EtOH in H2O and caffeine was adsorbed on SPE by transferring 1 mL beverage through the cartridge. The SPE was washed in sequence with 1 mM K2CO3 (0.2 mL) and H2O (0.2 mL), followed by elution with 15% EtOH in H2O (0.2 mL) and mixed with 22 uL 0.1 mM dye solution.