1 Introduction

In recent years, seeking for renewable energy sources has received an increasingly attention in the shadow of fast depletion of fossil fuel reserves and the environmental pollution problems raise parallel to the application of fossil fuel. Among the different possible and equipments and solar methods using devices which convert the solar energy to electricity is one of the most widely interested method in the light of unlimited supply of solar energy [1, 2].

Besides, dye-sensitized solar cells (DSSCs) as energy converter has a low production cost make them good candidates to be vastly developed [3,4,5]. In addition, DSSCs are easy to be fabricated, short energy payback time, low sensitivity to temperature variation, flexibility, transparency, efficiency at different angles with low light intensity and low emission of CO2, and also they are more environmentally friendly than conventional inorganic solar cells made them the most effective renewable photovoltaic devices.

The DSSCs made of several compartments which the most important one is, the sensitizer plays a vital role in achieving a high power conversion efficiency (PCE). Unfortunately, conventional solar cells comprised of ruthenium complexes which made these cells so expensive. As a way out for the high cost of ruthenium-based solar cells researchers proposed, metal free organic dyes with typical structure of metal-free organic sensitizers is a donor–π-bridge–acceptor system (D–π–A) during the recent years. In brief, an appropriate donor will lead to a good light absorption spectrum and matched energy levels with both the conduction band (CB) edge of TiO2 and the redox potential of the electrolyte. Therefore, the choice of a donor moiety and its structural optimization are critical to the spectral response, charge injection efficiency and stability of sensitizers with high photovoltaic performance. Metal-free organic sensitizers have also shown promise due to their advantages such as low cost, high molar extinction coefficient, and facile molecular design. For example, Mathew et al. [6] have reported that using zinc porphyrins as dye containing metal leads to maximum PCE of 13%.

Also, more recently, an unprecedented PCE of 10.3% was reported for an organic sensitizer [7], indicating that with further strategic optimization, metal-free organic sensitizers may overtake their organometallic counterparts in terms of photovoltaic performance. Moreover, application of novel organic sensitizers such as triarylamine [8], coumarin [9,10,11]. tetrahydroquinoline [12, 13], merocyanine [14, 15], cyanine [16, 17], phenothiazine [18], indoline [19, 20], and hemicyanine [21, 22], have revealed that acceptable results can be achieved.

Among the various organic dyes, diphenylamine (DPA) is one of the most desirable agents since it has two adjacent phenyl rings connected by a methylene linker, bridged DPA is a potential donor unit in constructing a donor–π–acceptor (D–π–A) type system [23,24,25,26]. It is notable that many academic groups have investigated metal-free sensitizers, but the regarding the aforementioned facts and considering this point that design of sensitizers containing new anchoring groups is in its infancy and is one of the interesting points in the design of sensitizers four types of diphenylamine-based organic dyes DPA-Ba, DPA-Hy, DPA-Rh, and DPA-Cy with different anchoring groups are designed and synthesized (see Fig. 1). The acceptor/anchoring groups used are containing aliphatic pentyl donor groups and acceptor units which include barbituric acid, hydantoin, rhodanine-n-acetic acid and cyanoacetic acid. The photophysical, electrochemical, and photovoltaic properties of the dyes were also investigated.

Fig. 1
figure 1

Chemical structures of DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy

2 Experimental section

2.1 Equipment and materials

1H and 13CNMR spectra were recorded on a Bruker 400 Ultrashield NMR and CDCl3 or DMSO-d6 was used as a solvent. FT-IR spectra were recorded in a KBr matrix using a JASCO FT-IR 680 plus spectrometer. In addition, elemental analysis were performed using a Heraeus CHN–O-Rapid analyzer. Also, mass spectra of the products were obtained using a HP (Agilent technologies) 5937 Mass Selective Detector. Moreover, melting points were measured on an electrothermal KSB1N apparatus. Chemicals were purchased from Aldrich, Fluka and Merck chemical companies.

2.2 Synthesis and characterization of compounds

The structures and synthesis methods of diphenylamine-based dyes are shown in Fig. 1, Scheme 1, respectively. Scheme 1, shows the synthetic approach for the new chromophores DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy. To synthesis the aforementioned dyes, Vilsmeier–Haack formylation reaction and Knoevenagel reaction which are so well-known reactions are used. All of the intermediates and dyes in this study were prepared according to several classical reactions and detailed synthetic procedures that have been described in the experimental section, and involve the Wittig reaction, Vilsmeier–Haack reaction, and Knoevenagel condensation reaction. In Scheme 1, the triphenyl phosphonium benzylchloride reacted with 4-(pentyl(phenyl)amino) benzaldehyde under Wittig reaction conditions, obtaining corresponding intermediates. Then, in the next step, compound was synthesized via a Vilsmeier reaction. In final stage, Knoevenagel condensation reactions with barbituric acid, hydantoin, rhodanine-n-acetic acid and cyanoacetic acid afforded the target dyes DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy in acetic acid using ammonium acetate as a catalyst.

Scheme 1
scheme 1

The synthesis route of DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy

2.3 General procedures for the synthesis of DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy

Aldehyde (0.15 mmol) and rhodanine-n-acetic acid, cyanoacetic acid/hydantoin (0.45 mmol) were added to 10 mL of glacial acetic acid and refluxed in the presence of ammonium acetate (0.74 mmol). After cooling to room temperature, the mixture was poured into ice water. After that, the solid was filtered and washed with water. Finally, the precipitate was purified by column chromatography (hexane/ethyl acetate). Also for the synthesis of DPA-Ba, aldehyde (0.15 mmol) and barbituric acid (0.45 mmol) were added to 10 mL ethanol and refluxed. The procedure continued similar to the above method.

2.3.1 Synthesis of (N-pentyl-N-phenylaniline)

Synthesis of this compound was carried out based on a previously reported method with some modifications [27]. 1-Bromopentane (3.926 g, 0.02 mol), phenylaniline (2.0 g, 0.012 mol) and sodium hydroxide (4.0 g, 0.10 mol) were dissolved in dimethylsulfoxide (DMSO) (30 mL), followed by heating a under temperature of 110 °C under Argon atmosphere for 10 h. After cooling to room temperature, the resulting mixture was extracted with ethyl acetate/water and then dried with sodium sulphate (Na2SO4). The solvent was evaporated and the resulting liquid was purified by column chromatography on silica gel by using n-hexane (v/v) as solvent to give a pale yellow liquid yield 90.4% (3.1 g). FT-IR (cm−1): 2857, 1589, 1496, 1363, 1258, 1079, 746, 694, cm−1. 1H NMR (CDCl3, 400 MHz): δ (ppm): 7.31 (d, J = 8.0 Hz, 2H), 7.28 (t, J = 8.0 Hz, 2H), 7.03 (d, J = 8.0 Hz, 2H), 7.01 (d, J = 8.0 Hz, 2H), 3.72 (t, J = 16.0 Hz, 2H), 1.69–1.73 (m, 2H), 1.34–1.38 (m, 4H), 0.93 (t, J = 8.0 Hz, 3H); 13CNMR (CDCl3, 100 MHz): 148.18, 129.27, 121.01, 52.35, 29.54, 27.41, 22.53, 14.18; Mass: m/z 239, 169, 135, 121, 107, 93, 77. anal. calcd for C17H21N: C 85.30, H 8.84, N 5.85; found: C 85.27, H 8.80, N 5.80.

2.3.2 Synthesis of 4-(pentyl(phenyl)amino)benzaldehyde

The synthesis of this compound was carried out based on a previously reported method [28]. To a mixture of Ph2NC5H11 (2.5 g, 9.9 mmol) and DMF (40 mL) at 0 °C was added POCl3 (1.2 mL, 12.87 mmol, 1.05 eq.) dropwise with stirring. The resulting mixture was then stirred at 95–100 °C under argon atmosphere for 20 h which then TLC analysis showed that there existed no starting material in the resulting product. Similar to the aforementioned procedure for N-pentyl-N-phenylaniline, the mixture was then cooled to room temperature, poured into ice–water (150 mL) and neutralized with 4 M NaOH solution. The formed liquid was carefully collected, washed with water, dried, and purified by column chromatography on silica gel using a mixture of ethyl acetate/n-hexane (1:5, v/v) to give a pale yellow liquid (yield = 90%). FT-IR (cm−1): 2927, 2856, 1687, 1602, 1513, 1492, 1384, 1227, 1166, 821, 700; 1H NMR (CDCl3, 400 MHz): δ (ppm): 9.73 (s, 1H), 7.66 (d, J = 8.0 Hz, 2H), 7.44 (t, J = 16 Hz, 2H), 7.29 (t, J = 8.0 Hz, 2H), 7.22 (d, J = 8.0 Hz, 2H), 6.71 (d, J = 8.0 Hz, 2H) 3.68 (t, J = 8.0 Hz, 2H), 1.63–1.69 (m, 2H), 1.30–1.34 (m, 4H), 0.88 (t, J = 8.0 Hz, 3H); 13C NMR (CDCl3, 100 MHz): 190.16, 171.11, 130.08, 127.54, 126.41, 113.25, 52.63, 29.06, 26.90, 22.44, 13.99; Mass: m/z, 267, 239, 225, 211, 197, 169, 107. anal. calcd for C18H21NO: C 80.86, H7.92, N 5.24, O 5.98; found: C 80.81, H7.90, N 5.20, O 5.94.

2.3.3 Synthesis of triphenylphosphoruschloride

In the first stage of this section, benzyl chloride (PhCH2Cl, 5.34 g, 0.35 mmol) was added to a mixture of triphenylphosphorus (PPh3, 6.81 g, 1.31 mmol) and toluene (6.0 mL) at 0 °C was which then it kept at room temperature for 24 h which then the solvent removal was performed by applying vacuum. After that, the crystal solid was collected white crystal solid (yield = 96%); m.p. 145–148 °C FT-IR (cm−1): 3054, 2956, 1607, 1582, 1503, 1484, 1394, 1187, 1126, 821;1H NMR (CDCl3, 400 MHz): δ (ppm): 7.90 (t, J = 8.0 Hz, 1H), 7.72–7.70 (m, 4H), 7.56–7.69 (t, J = 8.0 Hz, 2H), 7.41 (t, J = 8.0 Hz, 1H), 7.21–7.24 (m, 2H), 6.98 (d, J = 8.0 Hz, 1H), 5.25 (d, J = 8.0 Hz, 1H); 13CNMR (CDCl3, 100 MHz): 135.56, 134.55, 133.80, 131.35, 130.61, 129.46, 129.28, 128.83; Mass: m/z, 387, 354, 278, 262, 186, 110: anal. calcd for C25H22ClP C 85.20, H 6.01, P 8.79; found: C 85.17, H 5.97, P 8.73.

2.3.4 Synthesis of (E)-N-pentyl-N-phenyl-4-styrylaniline

In this stage, 1.3 M NaOH was added to a mixture of triphenylphosphoruschloride ylides, (0.97 g, 2.50 mmol) and 4-(pentyl(phenyl)amino)benzaldehyde (0.57 g, 2.50 mmol) at room temperature gradually with continuous stirring followed by addition of CH2Cl2(3M). Then, the resulting mixture was stirred at room temperature for 30 min which TLC analysis showed that no starting material remained in the mixture. Finally, a separatory funnel was used to separate the organic phase from the water phase which then immediately dried and the formed organic layer was concentrated on calcium chloride on water protection. The solid was collected, purified by column chromatography on silica gel a mixture of ethyl acetate/n-hexane (1:5, v/v) to give a pale yellow solid (yield = 90%); m.p. 87–89 °C FT-IR (cm−1):2958, 2863, 1590, 1573, 1496, 1462, 1354, 1266, 1093, 821, 740; 1HNMR (CDCl3, 400 MHz): δ (ppm): 8.64 (d, J = 4.0 Hz, 2H), 8.26 (d, J = 8 Hz, 2H), 7.87–7.89 (dd, J = 8.0 Hz, 2H), 4.37 (t, J = 8.0 Hz, 2H), 1.92–197 (m, 2H), 1.33–142 (m, 5H), 0.93 (t, J = 8 Hz, 3H);13CNMR (CDCl3, 100 MHz): 153.31, 145.70, 131.19, 130.60, 127.69, 126.72, 126.01, 113.80, 52.33, 31.74, 29.12, 27.23, 26.76, 22.52, 14.49 Mass: m/z, 341, 279, 265, 253, 239, 223, 169, 107, 93. anal. calcd for: C25H27N: C 87.93, H 7.97, N 4.10; found: C 87.90, H 7.95, N 4.6.

2.3.5 Synthesis of (E)-4-(pentyl(4-styrylphenyl)amino)benzaldehyde

In this stage, POCl3 (1.2 mL, 12.87 mmol, 1.05 eq.) was drop wisely added to a mixture of (E)-N-pentyl-N-phenyl-4-styrylaniline (3.65 g, 9.9 mmol) and DMF (40 mL) at 0 °C followed by continuous stirring. After that, the resulting mixture was stirred at 95–100 °C under argon atmosphere for about 20 h after which TLC analysis demonstrated no remains of starting material. Then, the mixture was cooled to room temperature, poured into ice–water (150 mL) and neutralized with NaOH solution of 4 M. Finally, the liquid was collected, rinsed with water, dried, and purified by column chromatography on silica gel using a mixture of ethyl acetate/n-hexane (1:5, v/v) to give a pale yellow liquid (yield = 90%). FT-IR (cm−1): 2927, 2856, 1632, 1593, 1502, 1454, 1327, 1263, 1116, 821, 700; 1H NMR (CDCl3, 400 MHz): δ (ppm): 9.78 (s, 1H), 7.72 (d, J = 8.0 Hz, 2H), 7.57 (d, J = 8 Hz, 2H), 7.49 (d, J = 8.0 Hz, 1H), 7.32–7.34 (m, 3H), 7.33 (d, J = 8.0 Hz, 1H), 7.09 (d, J = 8.0 Hz, 2H), 7.01 (d, J = 8.0 Hz, 2H) 6.66 (d, J = 8.0 Hz, 1H), 3.66 (t, J = 8.0 Hz, 2H), 1.71–1.79 (m, 2H), 1.28–1.36 (m, 4H), 0.93 (t, J = 8.0 Hz, 3H); 13CNMR (CDCl3, 100 MHz): 190.21, 153.22, 145.07, 137.23, 131.84, 129.40, 128.89, 127.87, 126.64, 113.93, 52.65. 29.19, 27.06, 22.59, 14.19 Mass: m/z, 369, 355, 341, 265, 239, 169, 93, 77 anal. calcd for C26H27NO: C 84.51, H 7.37, N. 3.79, O 4.33; found C 84.48, H 7.34, N. 3.75, O 4.30.

2.3.6 Synthesis of (E)5(4(pentyl(4styrylphenyl)amino)benzylidene)pyrimidine-2,4,6(1H,3H,5H)-trione (DPA-Ba)

The synthesis of this compound was carried out based on general procedures, giving a pale Orange solid (yield = 87%); m.p. = 196–201 °C; FT-IR (cm−1): 3417, 3199, 3060, 2957, 1706, 1689, 1539, 1470, 1400, 1285, 1163, 1097, 1023, 879, 754, 696; 1HNMR (CDCl3, 400 MHz): δ (ppm): 11.13 (s, 1H), 11.01 (s, 1H), 8.36 (d, J = 8.8 Hz, 2H), 8.13 (d, 1H), 7.61 (d, 1H), 7.20–7.32 (m, 6H), 6. 75 (d, J = 8.0 Hz, 1H), 652 (d, J = 8.0 Hz, 2H). 386 (t, J = 8.0 Hz, 2H), 1.60 (m, 2H), 1.26–1.30 (m, 2H), 0.83 (t, J = 8.0 Hz, 3H); 13CNMR (CDCl3, 100 MHz): 168.33, 164.95, 163.03, 155.52, 153.11, 150.71, 143.86, 137.44, 130.69, 129.72, 128.08, 127.35, 120.47, 113.58, 111.63, 28.79, 27.15, 22.39, 14.37; Mass: m/z, 479, 355, 341, 265, 239, 169, 93, 77. anal. calcd for C30H29N3O3: C 75.13, H 6.10, N 8.76, O 10.01; found: C 75.10, H 6.07, N 8.71, O 9.98.

2.3.7 Synthesis of (E)-5-(4-(pentyl(4-((E)-styryl)phenyl)amino) benzylidene) imidazolidine-2,4-dione (DPA-Hy)

Similar to the previous sections, general procedures are used to synthesis DPA-Hy, giving a pale green solid (yield = 79%); m.p. = 206–209 °C; FT-IR (cm−1): 3406, 3029, 2925, 1722, 1639, 1587, 1440, 1193, 1077, 817, 752; 1HNMR (CDCl3, 400 MHz): δ (ppm): 8.41 (d, d, J = 8.8 Hz, 2H), 8.39 (d, J = 8.8 Hz, 2H), 8.07 (s, 1H), 7.64 (d, J = 8.8 Hz, 1H), 7.57 (s, 1H), 7. 40 (d, J = 3.0 Hz, 2H), 7.22–7.29 (m, 1H), 7.09 (d, J = 8.0 Hz, 2H), 6.72 (d, J = 8.0 Hz, 2H), 6.59 (d, J = 8.0 Hz, 1H), 3.78 (t, J = 16.0 Hz, 2H), 1.74–1.73 (m, 5H), 1.34–1.36 (m, 5H), 0.91 (t, J = 8.0 Hz, 3H); 13CNMR (CDCl3, 100 MHz): 143.22, 140.01, 137.02, 136.33, 131.20, 129.72, 128.77, 128.16, 127.67, 126.62, 121.97, 113.27, 108.32, 52.87, 28.98, 27.09, 22.40, 14.00; Mass: m/z 451, 367, 341, 265, 239, 169, 93, 77; anal. calcd for C29H29N3O2: C 77.13, H 6.47, N 9.31, O 7.09; found C29H29N3O2: C 77.10, H 6.43, N 9.28, O 7.06.

2.3.8 Synthesis of 2-((E)-5-oxo-4-(4-(pentyl(4-((E) styryl)phenyl) amino) benzylidene)-3-thioxoisothiazolidin-2-yl) acetic acid (DPA-Rh)

Similar to the previous sections, general procedures are used to synthesis DPA-Rh, giving a pale red solid synthesis (yield = 94%); m.p. = 213–215 °C; FT-IR (cm−1): 3434, 2925, 1704, 1687, 1571, 1504, 1365, 1322, 1182, 1105, 1052, 815, 750; 1H NMR (CDCl3, 400 MHz): δ (ppm): 8.28 (br, 1H), 7.77 (d, J = 8.0 Hz, 1H), 7.56 (d, J = 8.0 Hz, 1H), 7.36 (d, J = 8.0 Hz, 1H), 7.30 (d, J = 8.0 Hz, 1H), 7. 27 (d, J = 3.0 Hz, 2H), 7.23 (d, J = 3.0 Hz, 2H), 7.19 (d, J = 8.0 Hz, 2H), 7.06 (d, J = 8 Hz, 2H), 6.65 (d, J = 8.0 Hz, 2H), 3.72 (t, J = 8.0 Hz, 2H), 1.35–2.11 (m, 3H), 0.91 (t, J = 8.0 Hz, 3H); 13CNMR (CDCl3, 100 MHz): 192.75, 171.40, 167.72, 150.51, 147.23, 144.93, 137.24, 135.10, 134.76, 130.50, 129.34, 128.85, 127.75, 126.80, 122.57, 120.91, 117.83, 116.14, 52.58, 45.35, 29.29, 27.11, 22.50, 14.14; Mass: m/z, 542, 484, 341, 265, 239, 169, 93, 77 anal. calcd for C31H30N2O3S2: C 68.61, H5.57, N 5.16, O 8.84, S 11.82; found C 68.58, H5.54, N 5.13, O 8.80, S 11.79.

2.3.9 Synthesisof (Z)-2-cyano-3-(4-(pentyl(4-((E)-styryl)phenyl)amino)phenyl) acrylic acid (DPA-Cy)

Similar to the previous sections, general procedures are used to synthesis DPA-Cy, giving a pale yellow solid (yield = 84%); m.p. = 245–247 °C; FT-IR (cm−1): 3428, 2925, 2856, 1569, 1506, 1365, 1272, 1179, 1063, 819, 650; 1HNMR (CDCl3, 400 MHz): δ (ppm): 8.10 (d, J = 8.0 Hz, 1H), 7.91 (d, J = 4.0 Hz, 1H), 7.61 (d, J = 8.0 Hz, 2H), 7.30–7.41 (m, 4H), 7.23 (d, J = 8.0 Hz, 2H), 7. 13 (d, J = 8.0 Hz, 2H), 6.75 (d, J = 3.0 Hz, 2H), 6.66 (d, J = 8.0 Hz, 2H), 3.76 (t, J = 8.0 Hz, 2H), 1.71 (m, 3H), 1.27–1.35 (m, 2H), 0.93 (t, J = 8.0 Hz, 3H); 13CNMR (CDCl3, 100 MHz): 168.45, 155.05, 144.34, 143.85, 137.10, 135.77, 134.10, 132.23, 130.85, 129. 17, 128.77, 127.52, 126.79, 125.86, 120.73, 117.83, 117.32, 115.73, 114.06, 52.71, 29.07, 27.04, 22.46, 14.05; Mass: m/z, 436, 411, 367, 341, 265, 239, 169, 93, 77; anal. calcd for C29H28N2O2: C 79.79, H 6.46, N 6.42, O 7.33; found: C 79.75, H 6.43, N 6.38, O 7.30.

2.4 Preparation of photovoltaic devices

The TiO2 electrode was prepared according to a procedure previously published [29]. A specific amount of acetic acid (12 g, 0.2 mol) was added all at once to 58.6 mg (0.2 mol) of titanium isopropoxide at room temperature as the mixture was strring. Then, the modified precursor was stirred for about 15 min and poured into 290 mL of water as quickly as possible with vigorous stirring (700 rpm) which leads to instant formation of a white precipitation. At this point, 1 h stirring shift the system toward complete hydrolysis reaction. After adding 4 mL of concentrated nitric acid, the mixture was heated from room temperature to 80 °C within 40 min and peptized for 75 min. Water was then added to the cooling liquid mixture to adjust the volume to a final volume of 370 mL. The resulting mixture was kept in a 570 mL titanium autoclave and heated at 250 °C for 12 h. Following this step, 2.4 mL of 65% nitric acid was added and the dispersion was treated with a 200 W ultrasonic titanium probe at a frequency of 30 pulses every 2 s. The resultant colloidal solution was concentrated with a rotary evaporator to reach 13 wt% TiO2. Finally, it was triply centrifuged to remove nitric acid and then followed by triplicated washing with ethanol to produce a white precipitate containing 40 wt% TiO2 in ethanol and only trace amounts of water.

2.5 Production of DSSCs

All the anode films for the DSSCs were made under the same standard conditions [30] and are composed of a transparent layer (TiO2 with diameter of 20 nm) with 12 mm thickness and a scattered layer of TiO2 nanoparticles with a diameter of 200 nm with a thickness of 6 mm. Specifically, a doctor blade technique was utilized to prepare the photoanode (TiO2) films. Then, the electrodes were immersed in a 0.3 mM dye bath in acetonitrile: t-butanol (volume ratio, 1:1) solution for these dyes and maintained in the dark for 18 h. Afterward, to remove the non-adsorbed dyes, the electrodes were rinsed with ethanol and then were dried in air. Besides, Pt catalyst was deposited on cleaned FTO glass by coating with a drop of H2PtCl6 solution (10 mM in 2-propanol solution) under temperature of 400 °C for 15 min to prepare the counter electrode. The devices which are assembled in sandwich type cell with the dye-containing TiO2 electrode and Pt counter electrode were filled by pre-drilled holes in the counter electrodes and then sealed with a Surlyn sheet and a thin glass cover by heating.

2.6 Measurements of photoelectrochemistry and electrochemistry

In the current investigation, simulated AM 1.5 sunlight with an output power of 100 mW cm−2 was used to measure the density–voltage. Electrochemical impedance spectroscopy (EIS), was measured with the frequency range of 10−1–105 Hz under 1 sun bias illumination under open circuit conditions using computer controlled potentiostat/galvanostat (IVIUM, Compactstat). Incident photon-to-current efficiencies (IPCE) were measured with monochromatic incident light of 1 × 1016 photon per cm−2 under 100 mW cm−2 with bias light in DC mode (Jarrel Ash monochromator, using a 100 W halogen lamp). A calibrated photodiode (Thorlabs) was used to study the optical properties of layers.

2.7 Theoretical calculation methods

To visualize geometries and electronic structures of these four compounds, all these dyes were subjected to quantum chemical analysis by density functional theory (DFT) [31]. DFT calculations were performed using the B3LYP method with 6-31G (d) basis set implemented in Gaussian 03 program package [32]. To model the adsorption modes of the dyes on TiO2 anatase (101) surface, the periodic DFT calculations were carried out using the Dmol3 package as implemented in Material Studio (version 5.5). The TiO2 anatase (101) surface was modelled using a slab with a thickness of three atomic layers. Periodic boundary conditions were employed with a surface supercell of 21.77 × 15.10 Å and a vacuum layer of at least 20 Å to prevent the interactions between adjacent slabs. For these calculations, we used the generalized gradient approximation functional with Perdew and Wang (PW91) formulation. The electronic properties of core electrons were treated with DFT semi-core pseudopots in term of DNP basis set. The convergence energy tolerance, gradient, and displacement convergences were 1.0 × 10−5 Ha, 0.004 Ha Å−1, and 0.005, respectively.

3 Results and discussion

3.1 Optical properties

The UV–vis absorption spectra of sensitizers DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy are shown in Fig. 2 (see Also Table 1). In general, D–π–A organic dyes showed two principal groups of absorption bands: one due to intramolecular charge transfer (ICT) transitions in the visible region and the other due to localized ππ* transitions at shorter wavelengths [33]. The four dyes, DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy exhibited one visible absorption band that appeared at 479, 408, 469 and 455 nm, respectively, which can be ascribed to an efficient charge-separated state produced by an ICT between the donor and acceptor end groups. The higher energy peaks at 479 nm for DPA-Ba and at 469 nm for DPA-Rh can be related to the ππ* transition of the diphenylamine unit and the lower energy peaks at 455 nm for DPA-Cy and at 408 nm for DPA-Hy can be attributed to the ICT between the arylamine donating unit and acceptor/anchoring moiety, thereby producing an efficient charge separated state [34]. The molar extinction coefficients (ε) of the ICT bands of DPA-Ba, DPA-Rh, DPA-Rh and DPA-Cy were 16,100, 8590, 13,160 and 8700 M−1 cm−1, respectively (Table 1) which are higher than that of the standard N719 sensitizer (14,200 M−1 cm−1) [35]. Indicating a better light harvesting ability of these new diphenylamine based metal-free organic dyes.

Fig. 2
figure 2

Absorption spectra of the organic dyes in THF solution

Table 1 Band gap (calculated by DFT/B3LYP), absorption, and electrochemical parameters for organic dyes

When the dyes were attached on TiO2 films (Fig. 3), the absorption spectra may shift more or less compared with those in solution because of strong interactions between the dyes and semiconductor surface, which can lead to aggregates of the dyes forming on the semiconductor surface, such as H-aggregation for the blue shift or J-aggregation for the red shift. The absorption spectra on TiO2 are broadened and the maximal absorption peaks for DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy on the TiO2 film are observed at 427, 320, 478, and 409 nm, respectively. They are blue shifted by 50, 93, 9 and 46 nm compared with the solution spectra, respectively. This observed trend can be related to the deprotonation of the three dyes or the formation of H-aggregation on the semiconductor surface and one dye or the formation of J-aggregation on the semiconductor surface [36, 37]. In addition, the observed hypsochromic shifts on the TiO2 surface were related to the interaction of the anchoring group with the surface which directly reduces the energy of the π* level and the formation of H-aggregates on the TiO2 surface [38, 39]. Bathochromic the broadened absorption band and red-shifted spectra are ascribed to the interaction of the anchoring groups of the dyes with the surface of TiO2 and is commonly observed in the spectra response of the other organic dyes [40] shift on the TiO2 surface were assigned to the interaction of the anchoring group with the surface which directly increase the energy of the π* level and the formation of J-aggregates on the TiO2 surface. Thus, a difference in type of anchoring groups in the dyes may result in different arrangement of the dyes on the TiO2 surface.

Fig. 3
figure 3

Absorption spectra of the four dyes absorbed on TiO2 film

3.2 Electrochemical properties

Cyclic voltammetry in tetrahydrofuran (THF) solution was used to determine the highest occupied molecular orbital (HOMO) and lowest unoccupied molecular orbital (LUMO) of the dyes (see Table 1; Figs. 4, 5).

Fig. 4
figure 4

Cyclic voltammograms of the four dyes in THF

Fig. 5
figure 5

The schematic energy levels of DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy based on absorption and electrochemical data

To evaluate the mechanism of electron transfer and the reduction of the dye cation back to its original state for the next cycle, cyclic voltammograms were recorded in THF solution containing tetrabutylammonium hexafluorophosphate(n-Bu4NPF6) (0.1 M) as the supporting electrolyte, TiO2 films stained with sensitizer as the working electrode and Pt as the counter electrode with a scan rate of 100 mV s−1 the measured potentials versus Fe+/Fe was converted into normal hydrogen electrode (NHE) potentials [41]. The ground oxidation potentials (Eox) correspond to the HOMO while the LUMO were obtained from the values of Eox and the zero–zero band gaps (E0–0) estimated from the onset of the UV–vis absorption spectra (see Table 1). Apparently, the HOMO levels of all the dye molecules are lower than the iodide/ triiodide redox potential value (0.4 V vs. NHE), indicating that the electrolyte can efficiently regenerate the oxidized dyes. Their LUMO levels are estimated from the HOMOs and the energy gaps (E0–0), and the values are higher than the CB of the TiO2 anode (0.5 V vs. NHE), suggesting an efficient driving force for electron injection from the LUMO of the dyes to the CB band of TiO2 semiconductor.

3.3 Molecular orbital calculations

In this section, DFT calculations were performed at the B3LYP/6-31G(d) level for the geometry optimization to reach more clarification about the distinct differences in the photovoltaic performance of these dyes (see Table 1). As shown in Fig. 6, the HOMO orbitals of four dyes are delocalized throughout the whole structure, and the LUMO orbital is mainly located at the linker and extends through the anchoring unit. Obviously, the HOMO and LUMO perfectly showed the donor–acceptor character of the diphenylamine and anchoring groups.

Fig. 6
figure 6

The frontier molecular orbitals of the HOMO and LUMO levels calculated with B3LYP/6-31G(d) of the synthesized dyes

The availability of sufficient electron density at the anchoring group in the LUMO results in good electronic coupling between the excited electrons of the sensitizer in the LUMO with the vacant d-orbitals of TiO2 where they are attached to fabricate the photoanode. This indicates facile intramolecular charge separation in these molecules and results in facile electron injection after photoexcitation. In the case of DPA-Hy and DPA-Ba dyes, the LUMO levels were majorly distributed in the hydantoin moiety. This is because of the strong electron withdrawing nature of the contain five-membered rings in hydantoin (DPA-Hy) compared with the six-membered rings in barbituric acid (DPA-Ba) which, expectedly, should lead to an extension of the resonance of their systems, on the other hand, has six-membered rings resulting in lower five resonance it is expected that any extension in the resonance within the acceptor unit should lead to a shift to higher λmax. It is suggested that the contain five-membered rings hydantoin increases the electron withdrawing nature of the hydantoin which also induces ICT from the donor to the acceptor group under illumination compared with six-membered rings barbituric acid. Nevertheless, in DPA-Cy and DPA-Rh dyes, the HOMO orbital of DPA-Cy is delocalized throughout the whole structure, and the LUMO orbital mainly locates at the linker and extends through the anchoring unit. In contrast, the LUMO electrons of DPA-Rh are isolated from the carboxyl anchoring group (CH2COOH) due to the presence of the methylene group, which may suppress the electron injection efficiency from the excited dyes to the CB of TiO2. Therefore, the electron destiny of LUMO for DPA-Rh does not closely overlap with the conduction of TiO2, potentially resulting in the low electron injection efficiency from the LUMO of DPA-Rh to CB of TiO2 the result of DFT calculation is similar to DPA-Cy. From the DFT analysis, here we consider that the methylene group between the rhodanine and carboxylic acid may severely disrupt the electronic coupling of dye and TiO2, thus low erring the efficiency of photo-excited electron injection. Overall, the low photo-excited electron injection efficiency results in the relatively low JSC of DPA-Rh. The obtained results indicated that the HOMO–LUMO light irradiation leads to an excitation which can effectively moves the electron distribution from the DPA moiety to the rhodanine acetic acid, barbituric acid, cyano acetic acid/hydantoin moiety. Photo induced electrons can be efficiently transferred from the dye to the TiO2 surface by this electron separation.

3.4 Photovoltaic device performance

A glance in Fig. 7 shows the current density–voltage (J–V) characteristics of solar devices based on the four dyes. Photovoltaic parameters including the short circuit photocurrent density (Jsc), open circuit voltage (Voc), fill factors (FF) and PCE are tabulated in Table 2. According to Fig. 7, it is clear that the photovoltaic performances of the DSSCs can be clearly affected by the anchoring group in the dye molecules. The findings revealed that the PCE of the DSSCs based on the synthesized dyes experience an increase with the following trend: DPA-Hy (0.05%) < DPA-Ba(0.64%) < DPA-Rh (0.71%) < DPA-Cy (1.88%). The DSSC based on the DPA-Cy dye showed better properties with an open circuit voltage of 0.59 V, a short circuit photocurrent density of 4.71 mA cm−2 and a fill factor of 0.68 corresponding to an overall light to electricity conversion efficiency of 1.88%, (see Fig. 7). In addition, a closer examination in Fig. 7 revealed that the Jsc of the DSSCs increased as the following pattern: The Jsc of the DSSCs increased in the order of for DPA-Hy < DPA-Ba < DPA-Rh < DPA-Cy. The worth mentioning point is that the anchoring unit in the dyes are favorable for electron injection and hence photocurrent generation. The Jsc is related to the molar extinction coefficient of the dye molecule, in which a higher molar extinction coefficient has a better light harvesting ability and yields a higher Jsc. Among the examined dyes DPA-Cy has the highest light harvesting efficiency and consequently an improved Jsc (4.71 mA cm−2) due to its largest molar extinction coefficient, broader absorption spectrum and highest IPCE value among all the examined dyes.

Fig. 7
figure 7

J–V curves of DSSCs based on DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy

Table 2 The performance parameters of the DSSCs

The higher Jsc value of DPA-Cy compared with other three examined dyes can be mainly due to its relatively better light harvesting ability (broad absorption spectrum and high molar extinction coefficient) which is reflected in its better IPCE spectrum. Moreover, Voc values of the dyes are increased as the following trend: DPA-Hy < DPA-Rh < DPA-Ba < DPA-Cy. It COOH group rhodanine acetic acid showed lower Voc values compared with the COOH group cyano acetic acid and so on the contained five-membered rings in hydantoin (DPA-Hy) compared with the six-membered rings in barbituric acid (DPA-Ba) showed lower Voc values, For both DPA-Cy, DPA-Rh dyes and DPA-Ba, DPA-Hy the Voc decreases slightly with the increase of the conjugation length compared with those with the mono-anchoring dyes.

Figure 8 demonstrated the incident photon-to-electron conversion efficiencies (IPCE) which are functions of the incident wavelength for the corresponding DSSCs of the resulting organic dyes on TiO2 films. It should be noted that the IPCE values increase in the order of DPA-Ba < DPA-Rh < DPA-Cy. The onset of IPCE for the DPA-Ba device was ca. 700 nm. The amazing point is that for device based on DPA-Cy IPCE values were higher than 65% in the range of 400–530 nm with a maximum value of 68% at 420 nm, while DPA-Rh showed IPCE values of about 20% at 460 nm. On the other hand the IPCE spectra of the DSSC based on DPA-Ba was slightly lower than that of the DSSC based on DPA-Rh.

Fig. 8
figure 8

The IPCE spectra of the DSSCs sensitized with DPA-Ba, DPA-Rh and DPA-Cy

Considering the tendency of UV–vis absorption properties, the relatively higher maximum IPCE for DPA-Cy compared with the other two dyes completely obvious. Besides, IPCE spectra of the cells with the mono-anchoring dyes with group acetic acid are broader than those with mono-anchoring dyes six membered rings, promoting higher Jsc values. These obtained results revealed that it possible to inject more electrons with the assist of mono-anchoring dyes group acetic acid with broad and red-shifted spectra. Also, a glance into Fig. 9 revealed the electrochemical impedance spectroscopic (EIS) analysis of the cells which were recorded using a set up whose equivalent circuit is presented in Fig. 9. The results of 8EIS data fitting are listed in Table 3. Rct, τ and Cµ corresponded to the charge transfer process occurring at the TiO2/dye/electrolyte interface, electron life time and chemical capacitance, respectively. CPE ct-T and CPE ct-P are the parameters of constant phase element charge transfer (CPE ct).

Fig. 9
figure 9

Electrochemical impedance spectra (a Nyquist plot and b equivalent circuit for (a)) of DSSCs for the four dyes

Table 3 EIS parameters obtained from modelling the EIS results

The worth mentioning point is that, EIS is performed to elucidate the interfacial charge recombination processes in DSSCs based on the four dyes under dark conditions. The obtained results in this section were depicted in Nyquist plots which pose two different size of semicircles. In this plot, the larger semicircle at lower frequencies corresponds to the charge transfer processes at the TiO2/dye/electrolyte interface, while the smaller semicircleat higher frequencies corresponds to the charge transfer processes at the Pt/electrolyte interface. Specifically, the small circles were almost similar in all dye based DSSCs due to the use of the same counter electrode and electrolyte. On the other hand, there was a substantial difference in the large semicircles, which indicates that charge transfer behavior between TiO2 and dye or between dye and electrolyte was significantly altered, wich can be due to the surface modifications with different dyes. The interesting point can be extracted from Nyquist plot is that the radius of the middle semicircle in this plot can be an acceptable estimation of charge recombination resistance at the TiO2 surface, Rrec, The estimation of this parameter is vital and essential since the value of Rrec is a good indication of charge recombination rate. The elucidated resistance (Rrec) are 31, 311, 22 and 16 Ω for DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy, respectively. The increased Rrec values imply the retardation of charge recombination between the injected electron into the TiO2 and oxidized species (I3) in the electrolyte, further showing the superiority of the special configuration of DPA-Hy.

By performing a regression on the EIS curves, electron lifetime (τ) which another important parameter for DSSCs, could be extracted from the chemical capacitances (Cµ) and RCT using τ = Cµ × Rct. The obtained τ from regression τ fitting rvealed the following increasing trend: DPA-Hy (3.38 ms) < DPA-Rh (3.64 ms) < DPA-Ba (3.99 ms) < DPA-Cy (5.29 ms).

Also, the obtained results from EIS measurements can be utilized to interpret the difference in open circuit voltage for the four dyes. Generally, the influence of dye on VOC has mostly been attributed to electron lifetime, which is related to the tendency of electron recombination in TiO2 with the I/I3 redox couple in the electrolyte [42]. The values VOC the four examined dyes are as below: DPA-Hy (490 mV) < DPA-Rh (490 mV) < DPA-Ba (520 mV) < DPA-Cy (590 mV). The results agree well with the τ values of the devices.

3.5 Adsorption of dyes on TiO2 anatase (101) surface

In the current section, the optimized geometries of dye/TiO2 systems and corresponding bond distances as well as adsorption energies are given in Fig. 10 and Table 4. As tabulated in Table 4, all the dyes showed a rather strong adsorption onto the TiO2 surface, with binding distances of 2.18, 2.11, 2.19 and 2.09–2.04 Å for DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy, respectively. In addition, the adsorption energy, Eads is calculated using following Eq. 1:

$${E_{ads}}={\text{ }}{E_{(slab+dye)}} - {E_{slab}} - {E_{dye}}$$
(1)

where Eslab is the energy of the clean slab, Edye is the anchored dye in the gas phase, and E(slab+dye) is the total energy of the complex of the slab with anchored dye. A negative value of Eads < 0 indicated that the adsorption process is stable. Addition, closer examination in the obtained results given in Table 4, revealed that adsorption energy (Eads) of each dye/TiO2 complex was calculated to be − 2.35, − 2.49, − 1.33 and − 2.07 eV for DPA-Ba, DPA-Hy, DPA-Rh and DPA-Cy, respectively, which means that they can be chemisorbed on the surface of TiO2 since their values are sufficiently large. more interestingly, studying the HOMOs and LUMOs of dye-TiO2 complexes demonstrated that there existed a delocalized electron distribution on dye molecules in the HOMO, whereas the LUMO showed the injected electron delocalized dominantly on TiO2 surface. According to these findings, it can be concluded that the efficient electron injection from the LUMO of dyes to the CB of TiO2 substrate can be performed through barbituric acid, hydantoin rhodanine-n-acetic acid and cyano acetic acid, acceptor groups, which can probably leads to transfer of (CT) transition between dye and TiO2 by intermolecular charges which means that the that direct charge transfer is the dominant mechanism for the charge-injection process within the dye–TiO2 complex.

Fig. 10
figure 10

Frontier orbitals of the dye–TiO2 complexes

Table 4 Selected bond lengths (Å) and adsorption energies (eV) of dye/TiO2 systems

4 Conclusion

The current study, a new kind of organic dyes with diphenylamine as a donor were synthesized and systematically characterized. In addition, in the next stage of the examinations, the influence of different anchoring groups on the photophysical, electrochemical, and photovoltaic properties were investigated. Computational apparently cyanoacetic acid could enhance the PCE, which is mainly attributed to the Jsc values. The obtained results indicated that more dye that is adsorbed on the TiO2 surface, the better Jsc is expected. The cell fabricated with the mono anchoring dye DPA-Hy showed lower Voc values compared to those with the mono-anchoring dye DPA-Cy. The DPA-Cy dyes transfer more protons to the TiO2 surface upon adsorption. Thus, the high concentration of the protons changes the TiO2 surface to a more positive state, lowering the CB edges of TiO2 and lowering Voc. apparently cyanoacetic acid could enhance the PCE, which is mainly attributed to the Jsc values. Besides, the obtained results indicated that the more dye that is adsorbed on the TiO2 surface, the better Jsc would observe.

Experimental results revealed that electron transfer from the rich π-system of the donor group to the acceptor side not only can leads to a good spectral response but also it can enhance the cell efficiency in dye sensitized solar cell devices. Besides, the result revealed that the mono-anchoring dyes not only transferred more electrons to the TiO2 electrode, which increases the the Jsc value but also they can transfer red more protons to TiO2 which reduces the Fermi level of the TiO2 and Voc of the cells. As a result, the dye containing cyano acetic acid acceptor units delivers the best performance among the studied dyes, exhibiting a PCE of 1.88%, with Jsc of 4.71 mA cm−2 and Voc of 590 mV under simulated AM 1.5 irradiation (100 mW cm−2). In addition, the current investigation revealed the feasibility and applicability of the obtained results as 1 basic information for the future design of sensitizers with different anchoring groups for photovoltaic.