University of Birmingham Photofunctionalizable Hydrogel for Fabricating Volume Optical Diffractive Sensors

. A transmission amplitude grating is subsequently fabricated in a ≈ 100 µ m thick photofunctionalizable hydrogel film by reaction of the free amines generated in the photoexposed regions with pH-responsive fluorescein isothiocyanate. The volume hydrogel grating described herein is shown to be suitable for real-time sensing of pH as an exemplar analyte. This work will have a significant impact on the fabrication of diffractive optical structures in thick films of hydrogels that are highly promising for biomolecular sensing in disease diagnosis and healthcare monitoring.

DOI: 10.1002/macp.201900228modulation of the intensity of light transmitted in a specified direction as a result of a change in the geometrical dimensions, absorption, and/ or refractive index of the alternating strips caused by analytes. [5]The specificity is achieved by incorporating analyte-sensitive moieties (or ligands) in the material used to make the alternating strips of the gratings.The use of hydrogels is beneficial because they provide a 3D network to host large quantities of ligands. [6]5b,8] Alternatively, a continuous film of photosensitive hydrogel is spatially patterned by selective photodegradation using light. [9]A second step is then required to fill the gaps between the hydrogel strips containing analyte-sensitive moieties with a nonabsorbing material.This second step is needed because the different refractive index between the strips and gaps creates a phase grating, which increases the background signal.Both soft-and photolithography are also not suited for creating high aspect ratio structures in soft materials such as hydrogels.Patterning of thick films of hydrogels is required to obtain sufficient intensity contrast between light transmitted from absorbing and non-absorbing strips, which in turn determines the diffraction efficiency (i.e., ratio of intensity of transmitted light in first to zero diffracted orders).
Photofunctionalizable hydrogels present a huge and currently unexplored opportunity for the fabrication of diffractive optical sensors, including amplitude gratings by spatial patterning of analyte-sensitive moieties in the entire depth of the material.Photo functionalizable hydrogels comprise of functional groups such as amines caged via photolabile moieties such as nitrobenzyl derivatives. [10]Typically, a two-step approach, where first, an amine-containing hydrogel is formed and second, amine groups are blocked with nitrobenzyl derivatives, is used to obtain photofunctionalizable hydrogels.Often the nitrobenzyl derivatives are used in combination with sensitizers such as thioxanthone to permit the use of widely available 405 nm light sources.A majority of the nitrobenzyl and thioxanthone derivatives reported in literature, however, have limited solubility and stability in water.These water-insoluble photolabile moieties and sensitizers are suitable for obtaining photofunctionalizable hydrogels with applications in drug delivery, [11] tissue engineering, [12] and Photofunctionalizable Hydrogels Volume amplitude gratings made of mesoporous hydrogels are beneficial for sensing, but are difficult to fabricate because they involve creating high aspect ratio features in soft materials.A novel photofunctionalizable hydrogel is reported and its suitability for fabricating grating sensors is demonstrated comprising of features with an aspect ratio of ≈3.2.To make a photofunctionalizable hydrogel with high optical quality that can be patterned using widely available light sources, a water-soluble photoactive monomer and sensitizer are synthesized.A transmission amplitude grating is subsequently fabricated in a ≈100 µm thick photofunctionalizable hydrogel film by reaction of the free amines generated in the photoexposed regions with pH-responsive fluorescein isothiocyanate.The volume hydrogel grating described herein is shown to be suitable for real-time sensing of pH as an exemplar analyte.This work will have a significant impact on the fabrication of diffractive optical structures in thick films of hydrogels that are highly promising for biomolecular sensing in disease diagnosis and healthcare monitoring.

Introduction
Diffractive optical structures such as gratings are beneficial for sensing applications because they allow real-time monitoring, easy read-out, and are low cost.The gratings comprise of multiple strips of alternating materials of different complex refractive indices.For example, an amplitude grating comprises an array of absorbing and non-absorbing strips.Light transmitting through these alternating strips experience a differential change in intensity generating a diffraction pattern.Optical grating sensors have been reported for measuring a variety of analytes including pH, [1] lead ions, [2] thrombin, [3] and viruses. [4]he basic principle of operation of the grating sensors is the coatings with antimicrobial as well as antifouling capabilities, [13] but not for diffractive optical sensors that demand hydrogels with low scattering losses.Additionally, the use of organic solvents has negative effects on the size and interconnectivity of pores, and hence the benefits of improved sensitivity and LOD offered by porous hydrogel sensors may not be realized.
This work, for the first time, reports a photofunctionalizable hydrogel for the fabrication of a diffractive optical sensor based on transmission amplitude grating in an ≈100 µm thick film.This was done by synthesizing a hydrogel monomer, 2-(dimethylamino)ethyl methacrylate (DMEMA) where the amine functional groups were protected with a 4,5-dimethoxy-2-nitrobenzyl chloroformate (NVOC) derivative obtained by reacting NVOC with 2-bromoethylamine.The water-soluble photoactive mono mer, NVOC-EA-DMEMA, was copolymerized with acrylamide using bisacrylamide as a crosslinker to obtain a photofunctionalizable hydrogel in a single step.A poly(ethylene glycol) group was incorporated into thioxanthone to obtain a watersoluble sensitizer (ThX-PEG) that extended the photo active wavelength range to 405 nm.The free amine groups produced as a result of photodeprotection were subsequently used to immobilize a pH-responsive dye, fluorescein isothiocyanate (FITC), for measuring the concentration of hydrogen ions.The detection read-out was based on monitoring changes in the intensity of the first diffracted order as solutions of different pH were introduced on the grating.The photofunctionalizable hydrogels reported in this work opens up possibilities for fabricating volume-diffractive optical sensors with applications in real-time detection of biomolecules for disease diagnosis and healthcare monitoring.

Results and Discussion
We used a well-studied photolabile group, NVOC, for synthesizing our photofunctionalizable hydrogels.Similarly, ThX is a widely reported triplet sensitizer that provides an efficient means to populate the photoreactive state of NVOC derivatives using light of long wavelength (≈405 nm vs 350 nm) and hence has been used in this work.We initially synthesized NVOC-allylamine monomer, but it was only sparingly soluble in water.Subsequently, we achieved water-soluble photoactive hydrogel monomer and sensitizer by incorporating quaternary ammonium and PEG groups with an average M n of 900 g mol −1 into NVOC and ThX, respectively.

Water-Soluble NVOC and ThX Derivatives
Figure S1, Supporting Information, shows that the absorption spectra of synthesized NVOC derivatives are comparable to NVOC [14] with an absorption maximum at ≈347 nm.The synthesized ThX-PEG had an absorption maximum of ≈400 nm, which is consistent with the literature reported value for ThX derivatives. [15]The ThX-PEG is fluorescent with an emission maximum at ≈500 nm (Figure S1, Supporting Information) where the excitation wavelength was 400 nm.The absorption and emission spectra of ThX-PEG overlap only between 440 and 460 nm.Thus, isotropic fluorescence emission from ThX-PEG is unlikely to excite other ThX-PEG molecules and hence cause NVOC cleavage in unilluminated areas.

NVOC-Allylamine
The NVOC-allylamine monomer was poorly incorporated into the hydrogel.Based on the extinction coefficient of NVOCallylamine monomer in solution (ε allyl = 6376 M −1 cm −1 at 347 nm) and absorption spectra of the photofunctionalizable hydrogel (results not shown), the concentration of NVOCallylamine was ≈12.5 times lower in the hydrogel than precursor solution (≈0.08 mg mL −1 vs 1 mg mL −1 ).Literature suggests that allylamine is incorporated in low molar ratios into the copolymer of acrylamide and allylamine as a result of significant differences in the reactivity ratios of the two monomers. [16]Similarly, the reactivity ratio of NVOC-allylamine and acrylamide may be sufficiently different, resulting in the poor incorporation of the photolabile groups in the hydrogel.
The hydrogel-containing NVOC-allylamine was exposed to 365 nm light through a photomask of an array of circles and the free amine groups were reacted with FITC to visualize the pattern.Exposure to 365 nm light for 20 min deprotected significant numbers of amine groups that were then reacted with FITC resulting in an increase in the gray scale value recorded using a monochrome camera (which is indicative of fluorescence intensity) of the exposed region (Figure 1a and Figure S2a, Supporting Information).The gray scale value and hence the density of photodeprotected amines were proportional to the exposure time with the highest value observed at 50 min exposure time.Exposure to 405 nm light for 60 min, however, resulted in deprotection of a few amines as evident by the relatively limited difference in the gray scale value of the exposed and unexposed regions (Figure 1b and Figure S2b, Supporting Information).405 nm light was less effective in deprotection of amine groups because the absorbance of NVOC-allylamine is much lower at 405 nm than at 365 nm.As shown in Figure 1b, the addition of ThX-PEG resulted in increasing the rate of deprotection at 405 nm with a significant degree of deprotection after only 5 min and saturation at 30 min exposure.This implies that the synthesized water-soluble ThX-PEG was an effective sensitizer for NVOC-allylamine allowing photopatterning via light of 405 nm.

NVOC-EA-DMEMA
Photofunctionalizable hydrogels were prepared using the precursor solutions containing 5 mg mL −1 of the photoactive monomer.The absorption spectra of polyacrylamide without and with the photoactive monomer (Figure S3, Supporting Information) recorded after a thorough wash in buffer validated that NVOC-EA-DMEA has been successfully copolymerized with acrylamide:bisacrylamide.The concentration of NVOC-EA-DMEMA in the resulting hydrogels was then estimated.The absorption spectra of different concentrations of NVOC-EA-DMEMA solutions were measured and its extinction coefficient (ε DMEMA ) was determined to be 4702 M −1 cm −1 at 347 nm.The absorption spectra of the photofunctionalizable NVOC-EA-DMEMA hydrogel prepared using different concentration of APS are provided in Figure S4, Supporting Information.The baseline was wavelength-dependent suggesting that the hydrogel had scattering losses in addition to the absorption of NVOC-EA-DMEMA.After the baseline correction, the absorption values and ε DMEMA at 347 nm were used to estimate the concentration of NVOC-EA-DMEMA in the hydrogel.The concentration of NVOC-EA-DMEMA in the hydrogel prepared using 1×, 5×, 10×, and 20× APS was estimated to be 1.4,4.9, 5.2, and 5.6 mg mL −1 , respectively.On using higher APS concentrations, the incorporation of NVOC-EA-DMEMA in the hydrogel was stoichiometric.The gelation time for NVOC-EA-DMEMA was much longer than polyacrylamide hydrogels using APS 10× but was comparable for higher APS concentration (20×).Additionally, the volume of N,N,N′,N′-tetramethylethylenediamine (TEMED) was increased from 1.25 to 12.5 µL in 1 mL precursor solution resulting in hydrogels with reduced scattering, as evident by their absorption spectra provided in Figure 2a.The remaining work was carried out using the photofunctionalizable hydrogels containing NVOC-EA-DMEMA and prepared using 10× APS and 10× TEMED.

Photolysis Kinetics
The LEDs emitting 365 and 405 nm light were used to perform the preliminary work on photopatterning hydrogels.The LEDs are finite size emitters, and hence cannot be perfectly collimated.The use of a physical mask with the LEDs resulted in poor edge definition because of the imperfect collimation and the distance of the mask from the hydrogel (≈3 mm).The photolysis kinetic studies and fabrication of hydrogel gratings was, therefore, performed using a micromirror projector because it provides a uniform intensity distribution and can be focused onto the hydrogel, resulting in good  edge definition and uniform exposure.These exposures were carried out in the presence of ThX-PEG and semicarbazide (ScZ). [17,18]s shown in Figure 2a, the absorption at 347 nm decreases exponentially as the exposure time is increased with a time constant of 91 ± 11 s.The refractive index of the hydrogel with protected amine groups and after 10 min of exposure time was 1.3359 and 1.3339, respectively.Figure 2b also shows that the refractive index of the hydrogel decreases exponentially as the exposure time increases with a time constant of 54 ± 10 s.The difference in the time constants between absorbance and refractive index is because absorbance is measured through the entire thickness of the hydrogel, while refractive index is measured in a thin layer (≈100 nm) at the surface in contact with the prism of the refractometer.The surface that was placed in contact with the prism was closest to the incoming beam during exposure using the micromirror projector and hence received the highest irradiance resulting in faster deprotection.

Fluorescence Imagining
Grating patterns were exposed using the digital projector, then visualized by reacting the free amines with FITC followed by fluorescence imaging.A typical fluorescent image of a grating fabricated in an ≈35 µm thick hydrogel film using an exposure power and time of 372 mW cm −2 and 30 s, respectively, is provided in the inset in Figure 3a.The Fourier transform of the intensity profile of a section of the image (marked by the red box in the inset) that covers two different grating pitches resulted in peaks at two spatial frequencies, that is, 0.0226 and 0.0455 µm −1 .The corresponding grating pitches were estimated to be 44.24 and 21.98 µm, respectively, and are in good agreement with the light patterns, that is, 2-and 1-pixel wide lines and spaces where one pixel is 10.8 µm.
Based on the photolysis kinetics results discussed previously, an exposure time of 30 s is estimated to have resulted in the deprotection of ≈28% of the total NVOC-protected amine groups present in the hydrogel.These deprotected amine groups when reacted with FITC provided sufficient contrast allowing the visualization of the patterns using a fluorescence microscope.Longer exposure times were required to photodeprotect significant proportion of amine groups in the hydrogel, but in this case, the spatial resolution was limited to ≈21.6 µm.The spatial resolution was limited in case of long exposure times because the light scattered from the NVOC-EA-DMEMA hydrogel films resulted in the photodeprotection of some of the functional groups in the unexposed regions, resulting in reduced contrast.
To further understand the extent of incorporation of NVOC-EA-DMEMA into the entire volume of the hydrogel, the gratings were also fabricated in hydrogel films with thickness of ≈100 µm using an exposure power and time of 372 mW cm −2 and 120 s, respectively, followed by the attachment of FITC molecules to the photodeprotected amine groups.The fluorescence profile throughout the thickness of the hydrogel was captured using a confocal laser microscope at a z-step of 1 µm with a grating pitch of 345.6 µm.Figure 3b confirms that the grating was created throughout the entire volume of the hydrogel.The

(5 of 8)
edges were tapered with an angle of ≈14° and the hydrogel film was ≈75 µm thick.The ratio of the gray scale values between the exposed and unexposed regions after FITC immobilization was ≈2.4.

Diffraction Studies
The amplitude contrast between the photodeprotected amine groups that reacted with FITC and the unexposed regions in ≈35 µm film was insufficient to result in a diffraction pattern.The photodeprotection was performed using an exposure power of 372 mW cm −2 and time up to 120 s.The amplitude contrast was, therefore, improved by increasing the thickness of the films to ≈100 µm.Additionally, the scattering losses were reduced by exposing the entire area of the hydrogel grating comprising alternate regions of amine groups attached to FITC and NVOC to 405 nm light for 120 s to remove the remaining NVOC.This implies that the resulting hydrogel grating consisted of free amine groups and those attached to the FITC.The corresponding diffraction patterns of a hydrogel grating recorded on a photodiode at 532 and 650 nm are provided in Figure 4 where the ± 1 and 0 orders are marked.The lack of any diffraction at 650 nm (Figure 4), where the dye does not absorb, shows that we have created a purely amplitude grating.The grating was formed by exposing the hydrogel to a pattern of bright and dark lines each of width of ≈21.6 µm for 120 s, reacting with FITC and flood exposure to 405 nm light for 120 s.As shown in Figure 4, the angular separation between the 0 and either +1 or −1 orders is ≈0.71°, which is in agreement with a value of 0.706° estimated based on theory.Hence, we demonstrated that the photodeprotection of functional groups in the volume of hydrogels followed by their reaction with a dye is a viable method for fabricating a transmission amplitude grating.

Application in Real-Time Sensing
We used the hydrogel gratings to measure the pH of solutions to demonstrate their potential for sensing applications.A typical diffraction pattern of a grating recorded using a camera is provided in inset (i) of Figure 5. Figure 5 and inset (ii) show that the intensity of ± 1 diffraction orders increased as the pH of the solution was changed from pH 5 to pH 9.This is because the absorbance of FITC goes up as pH changes from pH 5 to pH 9, as shown in Figure S5, Supporting Information.Thus, the pH of solutions may be determined by monitoring the intensity of ± 1 diffracted orders in combination with the calibration curve provided in inset (ii) of Figure 5.It is important to be able to measure pH because it serves as a marker for disease diagnosis, optimizing treatments, and monitoring health. [19]For example, the pH of healthy skin is in the range of 4 to 6, but becomes basic (typically, pH 7 to 8) in case of an injury.pH of chronic wounds has been reported to oscillate between pH 7 and 8 as the healing is either impaired or stalled.Thus, pH is an important marker of both diagnostics and theranostic interest in wound applications. [20]The reported hydrogel grating allows pH measurements in physiologically relevant range (i.e., between pH 5 and pH 8).Both polyacrylamide and fluorescein are non-toxic, making sensors of these materials eminently suitable for clinical use.Additionally, the use of the hydrogel grating to measure pH is beneficial because unlike conventional absorption spectroscopy, small changes in the intensity of the diffracted orders are measured on a dark background, thus potentially improving the signalto-noise ratio.The standard deviation of the noise on the normalized intensity was 1.69 × 10 −4 , while the average intensity of the ± 1 orders was 0.0624, giving a signal-to-noise ratio of 123 based on three standard deviations of the noise.The reported hydrogel volume grating sensor can potentially be tailored to measure other analytes of interest by immobilizing suitable target-responsive dyes to the free amine groups in the photofunctionalizable hydrogel.Target-responsive dyes have been reported for a wide variety of analytes ranging from small (e.g., pH as demonstrated in this study) to macro molecules (e.g., proteins). [21]The immobilization of the target-responsive dyes in the hydrogel grating implies that large number of binding sites will be available for the analyte, resulting in improved measurement sensitivity and LOD.To be able to exploit this benefit of improved measurement sensitivity and LOD for analytes such as proteins, it is essential that the hydrogel is porous to macromolecules.This work demonstrated the incorporation of NVOC-EA-DMEMA in 5% w:v polyacrylamide hydrogels, which are reported to have pores with size in the range of 2 to 15 nm based on swelling, diffusion, and dynamic light scattering studies. [22]Future work will investigate the effect of the incorporation of NVOC-EA-DMEMA in poly acrylamide hydrogels on their porosity to macromolecules.

Conclusion
A novel photofunctionalizable hydrogel has been developed for selective immobilization of pH-sensitive dye in ≈100 µm thick films to fabricate a transmission amplitude grating.Hydrogels offer a large internal surface-to-volume ratio allowing immobilization of analyte-sensitive moieties in high quantities.Additionally, porous hydrogels allow analytes to diffuse into and interact with analyte-sensitive moieties immobilized in the bulk of the material, thereby improving the measurement sensitivity.The suitability of photofunctionalizable hydrogels for fabricating diffractive optical structures in thick films has so far been limited because the photolabile protecting groups and sensitizers are often only soluble in organic solvents, which contributes to a significant increase in scattering losses in hydrogels by disrupting the pore structure of hydrogels.Additionally, the photolabile groups are used to block the free functional groups after hydrogel formation resulting in a two-step process.
A fully water-soluble chemistry was used for the synthesis of photofunctionalizable hydrogel and its subsequent patterning via widely available 405 nm light source.This in turn resulted in hydrogels with low scattering losses suitable for fabricating volume diffractive optical (in this case, transmission amplitude grating) sensors, and hence is an advancement over state-of-art photoactive materials.The use of an ≈100 µm thick film of hydrogel was essential to generate sufficient contrast in light transmitting through alternate absorbing and nonabsorbing strips to generate a diffraction pattern.We characterized the photolysis kinetics and spatial resolution of the photofunctionalizable hydrogel and fabrication approach used.
This photochemistry was subsequently used to fabricate a transmission amplitude grating consisting of alternating strips without and with pH-sensitive dye.The grating was then used for the sensing of hydrogen ion concentration by monitoring changes in the intensity of first diffracted orders.This sensing approach is beneficial because, unlike conventional absorption spectroscopy, we are detecting small changes in intensity on a dark background, thus improving the signal-to-noise ratio of the measurement.
The reaction scheme for the synthesis of water-soluble NVOC derivative was adapted from a report by Liu et al. and is provided in Figure S6b, Supporting Information. [13]560 mg (≈2.0 mmol) of NVOC was dissolved in 20 mL of anhydrous DCM under N 2 atmosphere.Then, an excess amount of 2-bromoethylamine hydrobromide (2 g, ≈9.8 mmol) and 4 mL (≈39.5 mmol) of anhydrous TEA were added to the reaction medium.The reaction was allowed to stir at room temperature for 18-24 h under N 2 atmosphere following which the reaction was stopped and solvent extraction was performed to obtain the raw product in DCM.The organic layer was dried over anhydrous sodium sulfate and evaporated using a rotary evaporator (Buchi, R100) to obtain a solid yellow residue.The product (compound II) was further purified by silica gel column chromatography (PET ether/ethyl acetate, 4:1 v:v).The product was kept in the dark and the NMR spectra were acquired using Bruker 300. 1 H NMR (CDCl 3 , 300 MHz): δ 7.72 (s, 1H), 7.08 (s, 1H), 5.62 (s, 2H), 4.14 (s, 2H), 3.93−3.87(s, 6H).300 mg of compound II (≈0.8 mmol) and 700 µL of DMEMA (≈4.4 mmol) were dissolved in 20 ml of ACN.The mixture was stirred under N 2 atmosphere for 24 h at 60 °C.After the reaction, the solvent was removed by rotary evaporator.The water-soluble NVOC derivative (NVOC-EA-DMEMA, compound III) was precipitated by diethyl ether, washed with anhydrous ether, and stored in the dark at 4 °C.
156 mg of compound IV was dissolved in 20 mL of THF.Excess potassium carbonate was added to the solution which was then heated at 65 °C in an oil bath.After 5 min, 700 mg of PEG-OTs was added to the reaction mixture and it was refluxed for 12 h.The mixture was filtered to remove potassium salts and the supernatant concentrated using a rotary evaporator.The residue was dissolved in 3−4 mL of DCM, following which 40-50 mL of diethyl ether was added and the solution was cooled in an ice bath.Finally, the yellow precipitate of water-soluble thioxanthen-9-one derivative (ThX−PEG, compound V) was filtered and stored at 4 °C.Spectra of Water-Soluble NVOCEA-DMEMA and ThX−PEG: The absorption spectra of water-soluble NVOC-EA-DMEMA and ThX−PEG (in the presence of ScZ for the latter) were recorded between 280 and 700 nm with a resolution of 1 nm using a Jenway 6715 UV-vis spectrometer.The fluorescence spectrum of thioxanthen-9-one solution in water was also recorded, which is discussed in Section 2.3.1.
Preparation of the Photofunctionalizable Hydrogel: Glass slides were cut into squares of ≈25.4 mm × 25.4 mm using a diamond scribe and cleaned in Decon 90 solution, water, and ethanol for 30 min each in an ultrasonic bath (Ultrawave U300H).The glass squares were immersed in 0.5% v:v allyltrichlorosilane in toluene for 30 min, washed in toluene, and dried before use.
A solution of total volume of 1 mL containing either 1 mg of NVOCallylamine in 250 µL THF or 5 mgmL −1 of NVOC−DMEMA, 125 µL of 40% w:v acrylamide/bis-acrylamide, 1.25 µL of TEMED, and 12.5 µL of 10% w:v APS was prepared in N 2 -degassed water.The effect of APS and TEMED on the formation of the hydrogel was studied by varying their concentration.
The precursor solution was cast between the glass square and a plastic cover separated with a spacer of required thickness (35 and 100 µm) at room temperature under dark.After the solution polymerized, the plastic cover was removed and the hydrogel films deposited on the glass substrate were soaked in deionized water and stored in dark.
Characterization of the Photofunctionalizable Hydrogel: Effect of Water-Soluble Thioxanthen-9-one Derivative: 100 µm thick photofunctionalizable hydrogel films were deposited on glass substrates and exposed to 365 nm (Nichia NVSU233A-U365, 1030 mW) and 405 nm (Lumileds LHUV-0405-A065, 1295 mW; both RS Components, Corby, UK) light through a photomask for up to 120 min.The photomask was either a clear circle of diameter of 6 mm or an array of clear circles on a grid of 3 mm and diameter of 2 mm on a dark background.The films were then washed in 100 mm phosphate buffer, pH 8.5, and immersed in FITC solution prepared in the same buffer.After a thorough wash with phosphate buffer, the patterned hydrogels were imaged.
Alternatively, the hydrogel films were soaked in a solution containing 250 mg of ScZ and 80 mg of ThX−PEG in 20 mL water for 2 h.The films were exposed to 405 nm light through the photomask with an array of circles for 40 min, immersed in FITC solution, washed, and visualized.
The fluorescence images were obtained using a home-built setup where the hydrogel samples were illuminated with a collimated light beam from an LED (LED490-06, Roithner Lasertechnik GmbH, Vienna, Austria).The transmitted light perpendicular to the incoming beams was passed through an interference filter (520 IL 25, Comar Optics, Cambridge, UK) and recorded using a camera (LU125M-10, 1280 × 1024 pixels, 6.7 µm pixel size, Lumenera, Ontario, Canada).Alternatively, the fluorescence images were taken using Axio Imager M2 connected to Axiocam 503 camera (1936 × 1460 pixels, 4.54 µm pixel size; both Zeiss) and analyzed using Fiji-Image J.The 3D fluorescence imaging was performed via a confocal laser microscope (Leica SP8, Germany) with an excitation wavelength of 488 nm (Ar+ laser) and recorded by a multiband spectral detector.
Photolysis Kinetics: 100 µm thick films on glass substrate and 1 mm thick self-supporting hydrogels were used for the absorption and refractive index measurements, respectively.
The hydrogel films immersed in ScZ and ThX−PEG solution were exposed to 405 nm light such that a region in the film was unexposed and others were exposed for the desired duration using a micromirror projector, LUXBEAM LE4960H-HY-HD-405 (1920 × 1080 pixels, 10.8 µm size square pixels, 744 mW cm −2 , Visitech, Germany).
The films were washed in water and then the absorption spectra and refractive index for each region of hydrogel films were recorded using Jenway 6715 UV-Vis spectrometer and a refractometer (RFM960-T, Bellingham and Stanley) with an accuracy of 1 × 10 −5 RIU, respectively.
Fabrication and Characterization of Optical Gratings: The stepwise preparation of the optical gratings is schematically illustrated in Figure S7, Supporting Information.The grating was formed by exposing the hydrogel to a pattern of bright and dark lines, each of width of ≈21.6 µm, using a micromirror projector for 120 s followed by reacting with FITC and flood exposure to 405 nm light for 120 s.The resulting FITC gratings were characterized using fluorescence imaging.The diffraction pattern of the hydrogel grating was also recorded.
The intensity of the ± 1 diffracted orders of the FITC-doped hydrogel gratings was measured at two wavelengths using a home-built setup consisting of monochromatic laser light sources (CW532-005 532 nm, 5 mW laser, and LDM650/3LJ, 650 nm, 3 mW; both Roithner Lasertechnik GmbH, Vienna, Austria) mounted on a fixed rail such that the beam was incident on the hydrogel grating at 0°.The transmitted light was passed through a cylindrical lens of focal length of 80 mm followed by an ≈0.5 mm wide slit, and the intensity was measured using a photodiode (10 mm diameter silicon photodiode, Centronic OSD100-6, RS components, Corby, UK) digitized using a 16 bit ADC.The photodiode was mounted on a rail connected to a goniometer to control its angular position.
Similarly, the diffraction patterns were recorded using a camera (UI-3580LE, 4.92 Megapixels, IDS Imaging, Obersulm, Germany) placed parallel to the plane of the grating.The intensity of the ± 1 diffraction orders was monitored at 532 nm as different pH solutions were introduced on the hydrogel grating.Fluids were pumped through the flow cell using a peristaltic pump (Minipuls 3, Gilson, Bedfordshire, UK) at a flow rate of 0.2 mL min −1 .A 275 µm thick double-sided adhesive tape with a 5 mm wide and 1 cm long cut-out was sandwiched between a transparent poly(methyl methacrylate) plate with two through holes and the hydrogel grating, to make a flow cell.

Figure 1 .
Figure 1.Intensity profile of NVOC-allylamine hydrogel exposed to light of wavelength of a) 365 nm and b) 405 nm without and with ThX-PEG for different durations (where LED was used for exposure, gray scale value is indicative of fluorescence intensity, and the corresponding fluorescent images are provided in Figure S2, Supporting Information).

Figure 2 .
Figure 2. a) Absorption spectra and b) refractive index at ≈589 nm of the photofunctionalizable hydrogel exposed to 405 nm light for different durations (where the inset in (a) shows the absorption at 347 nm vs exposure duration and power density of the micromirror project is 372 mW cm −2 ).

Figure 3 .
Figure 3. a) Fourier transform of the intensity profile over a region of the image shown in the inset and b) plane and side fluorescent images of the hydrogel grating recorded using confocal laser microscope.

Figure 4 .
Figure 4. Diffraction pattern of a hydrogel grating in 100 mm phosphate buffer, pH 8.5, where 532 nm laser and photodiode was used as a light source and detector, respectively.

Figure 5 .
Figure 5. Intensity of ± 1 diffracted orders as a function of solution pH where insets are, i) diffraction pattern captured using a camera; ii) plot of intensity of ± 1 diffracted orders versus pH (where the gray scale value is indicative of absorbance).