## 3 Materials and Methods  
3_A__A__A__-tetraaminodiphenyl oxide was prepared in accordance with [17]. \(T_{\text{m}}\) = 149-151 \({}^{\circ}\)C. Analysis: calculated for C\({}_{12}\)H\({}_{14}\)N\({}_{4}\)O: C--62.59%, H--6.13%, N--24.34%. Found: C--62.53%; H--6.18%; N--23.98% (according to the literature data \(T_{\text{m}}\). = 149-151 \({}^{\circ}\)C [17])._  
_1,3-Bis(3_A__A__-diaminophenoxy)benzene was prepared according to [18]: \(T_{\text{m}}\) = 169-171 \({}^{\circ}\)C. Analysis: calculated for C\({}_{18}\)H\({}_{19}\)N\({}_{4}\)O\({}_{2}\): C--67.10%, H--5.57%, N--17.34%. Found: C--66.89%, H--5.52%, N--17.36%._  
_1,4,5,8-Naphthalenetetracarboxylic acid dianhydride was used as anhydride, and 1,3-bis(1,8-dicarboxnaphtholy-4)benzene dianhydride was synthesized according to the procedure described in [18]. \(T_{\text{m}}\) is above 360 \({}^{\circ}\)C. Analysis: calculated for C\({}_{30}\)H\({}_{14}\)O\({}_{8}\): C--73.00%, H--2.61%. Found: C--72.40%, H--2.97%._  
For the synthesis of SPNBI, 6 \(\times\) 10\({}^{-3}\) mole of the corresponding bis-naphthalic anhydride sulfuric acid (9 mL, \(c\) = 98%, \(d\) = 1.8 g/mL) was added, and the mixture was stirred until a homogeneous mass formation. For the reaction mixture, 6 \(\times\) 10\({}^{-3}\) mole of the corresponding tetraamine was added and stirred under argon flow, and then oleum (3 mL, \(c\) = 56 wt.%) was added to the mixture. The temperature of the reaction mixture was increased up to 70 \({}^{\circ}\)C. After the termination of the exothermic reaction, the reaction mixture was heated at 120 \({}^{\circ}\)C in argon atmosphere. At certain intervals, the reaction solution was poured into distilled water; the precipitated polymer was filtered off and washed with distilled water until neutral reaction. After that, the polymer was washed with acetone and dried in vacuum at 80 \({}^{\circ}\)C to constant weight. To prepare salts in accordance with the previously developed procedure [6; 28], SPNBI-I,III, containing 5.9 wt.% of sulfur was mixed with 10% aqueous solutions of K\({}_{2}\)CO\({}_{3}\), Ca(Ac)\({}_{2}\), and CrCl\({}_{3}\), respectively. The reaction mixture was stirred for 10 days at room  
Figure 7: AFM images of the coatings prepared from SPNBI-I,III (**a**) and its K (**b**), Ca (**c**), and Cr (**d**) salts. temperature, the residue was repeatedly washed with water until neutral reaction, and dried at T =150 \({}^{\circ}\)C to constant weight. The degree of substitution of hydrogen atoms into the sulfo groups was estimated based on the amount of metal included in the polymer found by the method of flame emission spectrometry. Salts containing 8.0 wt.% of K, 4.2 wt.% of Ca, and 3.0 wt.% of Cr were prepared. FTIR spectra were recorded for KBr pellets on a Thermo-Nicolet Nexus 670 Fourier transform IR spectrophotometer (ThermoFisher Scientific, Ramsey, MN, USA) to control the completeness of the synthesis. Cross-polarization magic angle spinning (CP/MAS) solid state 13C NMR spectra were recorded on a Varian Unity INOVA 500 (Varian, Inc., Palo Alto, CA, USA) at 125.758 MHz. The samples were spun in a 3.2 mm rotor at 12-13 kHz. A contact time of 1.5 ms, a repetition time of 3 s, and a spectral width of 400 ppm were used for the accumulation of 1000-1500 scans. Chemical shifts were calibrated indirectly through the adamantane signal at 38.3 ppm relative to TMS. Solution phase 13C NMR spectra were acquired using Bruker Avance AV-300 (75 MHz) spectrometer (Bruker Optik GmbH, Ettlingen, Germany) in D2 SO4. Chemical shifts are reported in ppm and referenced to the tetramethylsilane. Thermogravimetric measurements (TGA) were performed on Derivatopaph-C (MOM, Budapest, Hungary) using samples having weight of about 15 mg at a heating rate of 10 \({}^{\circ}\)C/min in air. To prepare polymer coatings on QCM sensors, we used electron beam dispersion of solid polymers in a vacuum (EBD) [23].