Introduction

In general, photochromism can be introduced as a reversible switching between two isomers of different colors under light irradiation (generally, visible or UV). In addition to their different absorption spectra, the two isomers of a photochromic switch may have different chemical and physical properties such as wettability, dielectric constant, redox potential, polarity, and conductivity. In the recent decades, the photochromic compounds have been increasingly studied by the researchers due to their ability to change the parameters involved. The reversible photo-switches are the mixtures of two photoisomeric species that can be inter-transformed by lights of different wavelengths. In some compounds, isomerization in one of the directions that can take place thermally. In the procedures that are fast enough, this photo-switching can even be beneficial where the UV light applied in this isomerization direction leads to photodegradation [1, 2].

During the past years, the photo-responsive substances have been studied numerously due to their various potential usages including artificial muscles [3], optical memory devices [4,5,6], displays and switches [7,8,9], photochromic lenses [10, 11], drug delivery [12, 13], and soft-actuators [14]. Such substances have the ability to absorb lights of specific wavelengths leading to an intra- or inter-molecular alteration. These variations in the molecular configuration and structure are typically along with alterations in the optical features, dipole moment, and molecular charge [15]. Spiropyran (SP) is one of the most usual instances of a photochromic molecule, which is colorless and hydrophobic with a low polarity. This closed-ring isomer can transform into the greatly polar open-ring isomer merocyanine (MC) upon exposure to a UV light; however, the visible light can induce an inverse reaction (MC–SP conversion) (Fig. 1). Furthermore, various other external stimuli including the temperature [16], acids and bases [17], and metal ions [18, 19] can promote this reversible isomerization. Temperature and light are two key appealing environmentally friendly elements in the daily applications.

Fig. 1
figure 1

Spiropyran-merocyanine interconversion

Ozhogin and his co-workers have studied the effect of carboxylic and aldehyde substituents on the photochromic properties of spiropyran molecules. Their findings show that these substitutions increase their photocolorability and enhance the lifetime of the merocyanine form [20]. Also, some other spiropyrans with electron-withdrawing substituents have been synthesized and their various properties such as their photochromic behavior have been investigated [21]. In this work, the new photochromic 1′,3′,3′-trimethylspiro[chromene-2,2′-indoline] derivatives were synthesized. 2,3,3-trimethyl-3H-indole was prepared by the reaction of isopropyl methyl ketone with phenylhydrazine via the Fischer synthesis according to the literature [22, 23]. 1,3,3-trimethyl-2-methylene-5-nitroindoline was reacted with the corresponding salicylaldehyde derivatives in order to prepare the final photochromic 1′,3′,3′-trimethylspiro[chromene-2,2′-indoline] derivatives. The products obtained were characterized by the FT-IR, 1H-NMR, and 13C-NMR spectroscopic techniques. In order to investigating their photochromic properties, the UV–visible spectroscopic analyses of the methanolic solutions of the synthesized spiropyran derivatives are studied in the spectral range of 250–750 nm before and after exposure to a UV lamp (in the spectral range of 360–400 nm).

Experimental

Materials

Salicylaldehyde, phenylhydrazine, 3-methylbutan-2-one, nitric acid, and acetic acid (glacial) were supplied from the Merck, and used as received. 3- and 5-nitrosalicylaldehyde were prepared according to the literature [24, 25] via the classical nitration of salicylaldehyde by nitric acid.

Synthesis of 1,3,3-trimethyl-2-methylene-5-nitroindoline (1)

1,3,3-trimethyl-2-methylene-5-nitroindoline (1) was prepared in two steps. Step 1: 2,3,3-trimethyl-5-nitro-3H-indole was obtained via the nitration of 2,3,3-trimethylindole according to the literature [26, 27] with a few changes. For this purpose, 2,3,3-trimethylindole (5 g, 31 mmol) was added dropwise to concentrated H2SO4 (30 mL) and cooled down to 0–5 °C. Sodium nitrate (2.67 g, 31 mmol) was added portion by portion over 30 min. The reaction mixture was stirred for an additional 30 min, and then was poured into crushed ice (200 g) and neutralized by the addition of solid sodium hydroxide. The solid precipitate formed was collected by filtration, and was then recrystallized in acetone/H2O, 50:50 (v/v), to yield an orange crystal as the product (6 g, 94%). mp, 118–120 °C (ref, 116–118 °C); 1H-NMR (300 MHz, CDCl3, 25 °C, TMS) δ (ppm): 1.38 (s, 6H, 2CH3), 2.37 (s, 3H, CH3), 7.62 (d, 1H, J = 9 Hz), 8.17 (d, 1H, J = 3 Hz), 8.26 (dd, 1H, J = 9, 3 Hz). 13C-NMR (75 MHz, CDCl3, 25 °C, TMS) δ (ppm): 15.97, 22.73, 54.51, 117.16, 120.04, 124.53, 145.64, 146.73, 158.99, 194.16. FT-IR (KBr), ν (cm−1): 3091, 3025, 2973, 2935, 1600, 1521, 1513, 1452, 1423, 1330, 1243, 1207, 1112, 1052, 908, 846, 802, 740; Anal. Calcd. for C11H12N2O2: C, 64.70; H, 5.88; N, 13.72; Found: C, 64.76; H, 5.94; N, 13.77. Step 2: 1,3,3-trimethyl-2-methylene-5-nitroindoline was prepared according to the literature [28]: 2,3,3-trimethyl-5-nitro-3H-indole (2 g, 1 mmol) was dissolved in 10 mL of acetonitrile, and then CH3I (2.8 g, 3 mmol) was added to the mixture in one portion. The reaction mixture was stirred at room temperature for 48 h. The precipitate formed was filtered off and washed with a little fresh acetonitrile and dried under vacuum. The precipitate (2.5 g) was dissolved in distilled water (20 mL) at room temperature, and a solution of K2CO3 (1.5 g in 10 mL of H2O) was added, and the mixture was stirred for 60 min. The dark-red precipitate formed was filtered off and washed with cold water and dried under, vacuum. 1.5 g of 1,3,3-trimethyl-2-methylene-5-nitroindoline (70%) was obtained. mp, 91–93 °C (ref, 89–91 °C); 1H-NMR (300 MHz, CDCl3, 25 °C, TMS) δ (ppm): 1.39 (s, 6H, 2CH3), 3.16 (s, 3H, CH3), 4.13 (d, 1H, J = 3 Hz), 4.16 (d, 1H, J = 3 Hz), 6.55 (d, 1H, J = 9 Hz), 7.96 (d, 1H, J = 3 Hz), 8.15 (dd, 1H, J = 9, 3 Hz). 13C-NMR (75 MHz, CDCl3, 25 °C, TMS) δ (ppm): 29.08, 29.70, 43.47, 78.95, 103.93, 118.10, 126.27, 138.18, 139.98, 151.59, 161.23. FT-IR (KBr), ν (cm−1): 3100, 2950, 2857, 1660, 1604, 1519, 1475, 1386, 1328, 1297, 1120, 1085, 935, 813; Anal. Calcd. for C12H14N2O2: C, 66.05; H, 6.42; N, 12.84; Found: C, 66.11; H, 6.48; N, 12.96.

Synthesis of 2-hydroxy-5-nitroisophthalaldehyde (2a)

5-nitrosalicylaldehyde (2 g, 12 mmol) was dissolved in 20 mL of anhydrous trifluoroacetic acid (TFA). Hexamethylenetetramine (2 g, 14.3 mmol, 1.2 eq) was then added to the mixture. The reaction mixture was stirred for 48 h at 110–120 °C. After cooling, HCl (1 M, 20 mL) was added, and the mixture was stirred for another 1 h. The precipitate formed was filtered off, washed with cold water, and dried under vacuum. The crude product was recrystallized in acetone/water 50:50 (v/v). 1.65 g of 2-hydroxy-5-nitroisophthalaldehyde (yield, 72%) was obtained. mp, 143–145 °C; 1H-NMR (300 MHz, CDCl3, 25 °C, TMS) δ (ppm): 8.89 (s, 2H, aromatic), 10.34 (s, 2H, –CHO), 12.29 (s, 1H, OH). 13C-NMR (75 MHz, CDCl3, 25 °C, TMS) δ (ppm): 123.20, 132.14, 140.77, 166.95, 190.48. FT-IR (KBr), ν (cm−1): 3299, 3095, 3050, 2879, 1698, 1685, 1617, 1587, 1550, 1446, 1398, 1347, 1295, 1197, 1106, 971, 719, 611; Anal. Calcd. for C8H5NO5: C, 49.23; H, 2.56; N, 7.18; Found: C, 49.30; H, 2.63; N, 7.23.

Synthesis of 4-hydroxy-5-nitroisophthalaldehyde (2b)

Compound (2b) was prepared in two steps. Step 1: 2.52 g (18 mmol, 1.2 eq) of hexamethylenetetramine was added to a solution of 4-hydroxybenzaldehyde (1.83 g, 15 mmol) in 20 mL of TFA. The reaction mixture was then stirred at 85–90 °C for 24 h. After cooling to room temperature, 20 mL of concentrated hydrochloric acid was added, and the mixture was stirred for 2 h. The solvent was distilled under reduced pressure. The crude product was recrystallized in acetone/water 50:50 (v/v). 1.25 g of 5-formyl-2-hydroxybenzaldehyde (yield, 55%) was obtained. mp, 109–111 °C; 1H-NMR (300 MHz, CDCl3, 25 °C, TMS) δ (ppm): 7.16 (d, 1H, J = 9 Hz), 8.10 (dd, 1H, J = 9, 3 Hz), 8.18 (d, 1H, J = 3 Hz), 9.97 (s, 1H, -CHO), 10.04 (s, 1H, –CHO), 11.58 (s, 1H, OH). 13C-NMR (75 MHz, CDCl3, 25 °C, TMS) δ (ppm): 118.86, 120.35, 129.26, 136.54, 137.20, 166.28, 189.36, 196.23. FT-IR (KBr), ν (cm−1): 3174, 2834, 2751, 1695, 1664, 1614, 1563, 1482, 1369, 1270, 1159, 925, 846, 775, 715, 613; Anal. Calcd. for C8H6O3: C, 63.52; H, 3.97; Found: C, 63.60; H, 4.02. Step 2: 1 g (6.6 mmol) of 5-formyl-2-hydroxybenzaldehyde was added in small portions to a mixture of nitric acid (1 mL, 68%) and concentrated sulfuric acid (2 mL) at − 5 °C, and the mixture was stirred for 1 h. The reaction mixture was poured on 100 g of crushed ice. The yellow solid precipitate formed was filtered off and washed with cold distilled water. The crude product was recrystallized in acetone/water 50:50 (v/v). 1.18 g of 4-hydroxy-5-nitroisophthalaldehyde (yield, 91%) was obtained. mp, 125–127 °C; 1H-NMR (300 MHz, CDCl3, 25 °C, TMS) δ (ppm): 8.64 (s, 1H), 8.89 (s, 1H), 10.05 (s, 1H, -CHO), 10.47 (s, 1H, -CHO), 11.97 (s, 1H, OH). 13C-NMR (75 MHz, CDCl3, 25 °C, TMS) δ (ppm): 125.68, 128.43, 131.92, 135.91, 137.27, 159.90, 187.71, 189.02. FT-IR (KBr), ν (cm−1): 3062, 2861, 1695, 1664, 1608, 1531, 1436, 1355, 1292, 1247, 1174, 1159, 983, 935, 821, 767, 732, 696, 646; Anal. Calcd. for C8H5NO5: C, 48.94; H, 2.56; N, 7.14; Found: C, 49.02; H, 2.61; N, 7.20.

General procedure for synthesis of photochromic 1′,3′,3′-trimethylspiro[chromene-2,2′-indoline] derivatives (3a-d)

2.18 g (10 mmol) of 1,3,3-trimethyl-2-methylene-5-nitroindoline was added in small portions to a solution of the salicylaldehyde derivatives (10 mmol) in 10 mL ethanol. The reaction mixture was stirred at 40 °C for 24 h. The reaction progress was monitored by TLC (1:3 ethyl acetate and n-hexane). The yellow precipitate formed was filtered off and washed with a little amount of fresh ethanol and dried in vacuo (Scheme 1).

Scheme 1
scheme 1

Synthesis of the photochromic 1′,3′,3′-trimethylspiro[chromene-2,2′-indoline] derivatives

1′,3′,3′-trimethyl-8-formyl-5′,6-dinitrospiro[chromene-2,2′-indoline] (3a)

Yellow solid (55% yield): mp, 205–207 °C; 1H-NMR (300 MHz, CDCl3, 25 °C, TMS) δ (ppm): 1.31 (s, 3H, CH3), 1.44 (s, 3H, CH3), 2.96 (s, 3H, CH3), 6.02 (d, 1H, J = 12 Hz), 6.63 (d, 1H, J = 9 Hz), 7.12 (d, 1H, J = 12 Hz), 8.02 (d, 1H, J = 3 Hz), 8.25 (m, 2H), 8.60 (d, 1H, J = 3 Hz), 10.15 (s, 1H, -CHO). 13C-NMR (75 MHz, CDCl3, 25 °C, TMS): δ (ppm): 20.14, 25.76, 28.99, 52.33, 106.09, 107.40, 118.31, 120.30, 121.16, 122.73, 124.43, 126.36, 126.87, 128.70, 136.47, 141.54, 152.29, 152.58, 160.16, 185.98. FT-IR (KBr), ν (cm−1): 3072, 2925, 2869, 1691, 1650, 1606, 1529, 1496, 1454, 1382, 1320, 1265, 1186, 1110, 1101, 914, 796, 738, 684; Anal. Calcd. for C20H17N3O6: C, 60.76; H, 4.30; N, 10.63; Found: C, 60.81; H, 4.37; N, 10.69.

1′,3′,3′-trimethyl-6-formyl-5′,8-dinitrospiro[chromene-2,2′-indoline] (3b)

Yellow solid (53% yield): mp, 203–205 °C; 1H-NMR (300 MHz, CDCl3, 25 °C, TMS) δ (ppm): 1.29 (s, 3H, CH3), 1.45 (s, 3H, CH3), 2.92 (s, 3H, CH3), 6.00 (d, 1H, J = 12 Hz), 6.61 (d, 1H, J = 9 Hz), 7.13 (d, 1H, J = 12 Hz), 7.91 (d, 1H, J = 3 Hz), 8.00 (d, 1H, J = 3 Hz), 8.22 (dd, 1H, J = 9, 3 Hz), 8.27 (d, 1H, J = 3 Hz), 9.93 (s, 1H, -CHO). 13C-NMR (75 MHz, CDCl3, 25 °C, TMS): δ (ppm): 19.66, 25.83, 28.92, 52.15, 106.17, 107.84, 118.26, 120.77, 121.64, 126.25, 128.20, 128.66, 128.96, 130.67, 136.57, 137.28, 141.47, 151.88, 152.40, 188.53. FT-IR (KBr), ν (cm−1): 3072, 3064, 2931, 2827, 1695, 1643, 1606, 1509, 1322, 1270, 110, 1014, 917, 817, 754; Anal. Calcd. for C20H17N3O6: C, 60.76; H, 4.30; N, 10.63; Found: C, 60.79; H, 4.38; N, 10.66.

1′,3′,3′-trimethyl-5′,6-dinitrospiro[chromene-2,2′-indoline] (3c)

Yellow solid (75% yield): mp, 201–203 °C; 1H-NMR (300 MHz, CDCl3, 25 °C, TMS) δ (ppm): 1.26 (s, 3H, CH3), 1.38 (s, 3H, CH3), 2.90 (s, 3H, CH3), 5.89 (d, 1H, J = 12 Hz), 6.58 (d, 1H, J = 9 Hz), 6.83 (d, 1H, J = 9 Hz), 7.04 (d, 1H, J = 12 Hz), 7.99 (d, 1H, J = 3 Hz), 8.07–8.11 (m, 2H), 8.23 (dd, 1H, J = 9, 3 Hz). 13C-NMR (75 MHz, CDCl3, 25 °C, TMS): δ (ppm): 19.80, 25.72, 28.87, 51.87, 105.76, 105.92, 115.57, 118.11, 118.30, 120.14, 122.92, 126.18, 126.27, 129.10, 136.92, 141.01, 141.52, 152.87, 158.76. FT-IR (KBr), ν (cm−1): 3068, 2969, 2925, 1648, 1608, 1577, 1504, 1326, 1263, 1182, 1124, 1085, 1018, 954, 817, 742; Anal. Calcd. for C19H17N3O5: C, 62.12; H, 4.63; N, 11.44; Found: C, 62.19; H, 4.69; N, 11.49.

1′,3′,3′-trimethyl-5′,8-dinitrospiro[chromene-2,2′-indoline] (3d)

Yellow solid (72% yield): mp, 196–198 °C; 1H-NMR (300 MHz, CDCl3, 25 °C, TMS) δ (ppm): 1.26 (s, 3H, CH3), 1.44 (s, 3H, CH3), 2.89 (s, 3H, CH3), 5.87 (d, 1H, J = 10.5 Hz), 6.55 (d, 1H, J = 9 Hz), 6.98 (t, 1H, J = 7.5 Hz), 7.03 (d, 1H, J = 10.5 Hz), 7.35 (dd, 1H, J = 7.5, 1.5 Hz), 7.74 (dd, 1H, J = 9, 1.5 Hz), 7.98 (d, 1H, J = 3 Hz), 8.20 (dd, 1H, J = 9, 3 Hz). 13C-NMR (75 MHz, CDCl3, 25 °C, TMS): δ (ppm): 19.81, 25.77, 28.81, 51.70, 105.79, 105.99, 118.22, 119.65, 119.97, 121.00, 125.47, 126.19, 129.30, 131.41, 136.95, 137.21, 141.07, 147.30, 152.76. FT-IR (KBr), ν (cm−1): 3068, 2971, 2925, 2873, 1652, 1606, 1521, 1498, 1459, 1361, 1322, 1268, 1180, 1105, 1018, 989, 919, 813, 738; Anal. Calcd. for C19H17N3O5: C, 62.12; H, 4.63; N, 11.44; Found: C, 62.18; H, 4.71; N, 11.48.

Results and discussion

In this work, some derivatives of 1′,3′,3′-trimethylspiro[chromene-2,2′-indoline] bearing the formyl and nitro groups were synthesized. The indole section was the same for all of these spiro compounds. 1,3,3-trimethyl-2-methylene-5-nitroindoline (1) was prepared in two steps. Step 1: 2,3,3-trimethyl-5-nitro-3H-indole was obtained via the nitration of 2,3,3-trimethyl-3H-indole. In the FT-IR spectrum of this compound, the absorption bands observed at 1521 and 1330 cm−1 are typical for the asymmetric and symmetric stretching modes of N–O bonds, respectively, and confirm the presence of the nitro group in 2,3,3-trimethyl-5-nitro-3H-indole. Step 2: The reaction of 2,3,3-trimethyl-5-nitro-3H-indole with methyl iodide resulted in the formation of 1,2,3,3-tetramethyl-5-nitro-3H-indolium iodide. This salt was dissolved in distilled water, and was deprotonated using an aqueous solution of K2CO3 to produce 1,3,3-trimethyl-2-methylene-5-nitroindoline as the final product. In the 1H-NMR spectrum of this compound, the proton resonance of the diastereotopic methylenic protons at 4.13 ppm and 4.16 ppm, the proton resonance of the 2CH3 protons at 1.39 ppm, and the N–CH3 protons at 3.16 ppm with three proton resonance aromatic protons confirmed the successful synthesis of 1,3,3-trimethyl-2-methylene-5-nitroindoline.

2-hydroxy-5-nitroisophthalaldehyde (2a) was prepared via the formylation of 5-nitrosalicylaldehyde with hexamethylenetetramine in anhydrous TFA. In the FT-IR spectrum of this compound, the absorption bands at 1698 cm−1 and 1685 cm−1 are related to the stretching resonance of the two C=O groups along with the proton resonance of the two aldehyde protons at 10.34 ppm, helping to confirm the structure of this compound. The synthesis of 4-hydroxy-5-nitroisophthalaldehyde was performed in two steps. First, 4-hydroxyisophthalaldehyde was prepared via the Duff reaction of 4-hydroxybenzaldehyde with hexamethylenetetramine in TFA. The FT-IR spectrum of this compound showed two absorption bands at 1695 and 1664 cm−1 related to the stretching resonance of the two C=O bonds of the 1- and 3-crabaldehyde groups, respectively. Also, the proton resonance of the two aldehyde protons at 9.97 and 10.04 ppm and the appearance of two carbaldehyde peaks at 189.36 and 196.23 ppm in the 13C-NMR spectrum of compound (2b) confirmed the successful synthesis in step 1. In the second step, 4-hydroxy-5-nitroisophthalaldehyde was prepared via the nitration of 4-hydroxyisophthalaldehyde in a HNO3/H2SO4 medium. The absorption bands observed at 1531 cm−1 and 1355 cm−1 related to the N–O bond (asymmetric and symmetric stretching modes, respectively) in the FT-IR spectrum of 4-hydroxy-5-nitroisophthalaldehyde confirmed the presence of the –NO2 group in this compound.

The photochromic 1′,3′,3′-trimethylspiro[chromene-2,2′-indoline] derivatives were prepared by the reaction of 1,3,3-trimethyl-2-methylene-5-nitroindoline with the corresponding salicylaldehyde derivatives. The FT-IR spectra of the spiropyran compounds showed the absorption bands at 1691 cm−1 (3a) and 1695 cm−1 (3b) related to the stretching resonance of the C=O bonds of unreacted aldehyde groups. The stretching resonance of the C=C bond in the pyran ring was observed at 1650 cm−1 (3a), 1643 cm−1 (3b), 1648 cm−1 (3c), and 1652 cm−1 (3d). Also, the proton resonance of unreacted aldehydes at 10.15 ppm (3a) and 9.93 ppm (3b) and the appearance of carbon resonance related to these groups at 185.98 ppm (3a) and 188.53 ppm (3b) in the 13C-NMR spectra of compounds 3a and 3b confirmed their structures.

Photochromism of 1′,3′,3′-trimethylspiro[chromene-2,2′-indoline] derivatives

In the recent years, the spiropyran derivatives have been among the most well-known photochromic compounds that have attracted the attention of many chemists. Various external stimuli including the UV irradiation, temperature, acids and bases, and metal ions can promote the isomerization of the closed-ring spiropyran (SP) form to the open-ring merocyanine (MC) form. We were interested in investigating the effect of UV irradiation on the isomerization of SP to MC. Also, we were interested in studying the effect of the aldehyde group on this isomerization. For these purposes, dilute solutions (0.5 mM) of the compounds 3a, 3b, 3c, and 3d in methanol were prepared. These solutions were exposed to UV irradiation (360–400 nm) for 15 min, which changed the color of the solutions. In the UV–visible spectra of compounds 3a and 3b, the absorption bands shifted to longer wavelengths due to the presence of the aldehyde group on the benzopyran ring (Fig. 2). We believe that the presence of the nitro group on the indole ring causes an instability in the MC form. However, the concerted presence of the nitro and aldehyde groups on the benzopyran ring causes more stability in the MC form in the compounds 3a and 3b compared to the compounds 3c and 3d. The return delay times of the compounds 3a and 3b after UV irradiation were studied. The λmax values for the compounds 3a and 3b were returned to their previous values (before UV irradiation) after 3 min. The absorption graph for the compound 3a became quite similar to that before UV irradiation in the UV–visible spectrum after 3 min, while this was happened after 9 min for the compound 3b.

Fig. 2
figure 2

UV–visible spectra of compounds 3a-d before and after exposure to UV irradiation

Conclusions

In this work, we introduced the synthesis of two new 1′,3′,3′-trimethylspiro[chromene-2,2′-indoline] derivatives, 3a and 3b. In these photochromic compounds, the presence of the electron-withdrawing nitro group in the para position of the nitrogen atom of the indole section causes an instability in the open-ring merocyanine (MC) form. This unstable form prefers to isomerize to the closed-ring spiropyran (SP) form, while the presence of the electron-withdrawing nitro and aldehyde groups on the benzopyran ring stabilizes the MC form. In these compounds, the absorption bands in the UV–visible spectra shifted to the longer wavelengths (red shift). The UV–visible spectra of compounds 3a and 3b changed further after UV irradiation compared to the compounds 3c and 3. It can be said that they have a more stable MC form. The negative charge of phenolate can be delocalized in the benzopyran section due to the presence of the electron-withdrawing nitro and aldehyde groups on this part of the molecule and causes a stability in the MC form. However, the presence of only one electron-withdrawing nitro group on the benzopyran section of compounds 3c and 3d could not stabilize the MC form as much as the compounds 3a and 3b. The UV–visible spectra of compounds 3c and 3d did not change after UV irradiation as much as the compounds 3a and 3b.