Introduction

Greenhouse gas emission is one of the main problems that humankind needs to address to achieve a more environmentally friendly lifestyle. The transportation industry is the second-largest source of greenhouse gas emissions [1, 2]. So this has lent to promoting strategies such as more restrictive policies that assure an improvement of fossil fuel efficiency or switching to alternative energy sources. For the former, the use of lighter materials than ferrous alloys, for example, aluminum alloys. Nevertheless, the lower resistance of these materials limited their use to parts that experience less mechanical stress [3]. The union of two metals in direct contact with a common electrolyte promotes the galvanic corrosion of the one with a more negative corrosion potential. To illustrate, when a layer of an electrolyte is placed over the galvanic couple formed by an aluminum alloy in contact with carbon steel, the reduction of oxygen occurs over the carbon steel surface (Eq. 1); meanwhile, the oxidation of aluminum occurs over the anode surface (Eq. 2). Due to the high acidity of Al3+ cation, it rapidly reacts with water, decreasing the electrolyte’s pH (Eq. 3).

$${\mathrm{O}}_{2}+2{\mathrm{H}}_{2}\mathrm{O}+4{\mathrm{e}}^{-}\rightleftarrows 4{\mathrm{OH}}^{-}$$
(1)
$$\mathrm{Al}\rightleftarrows {\mathrm{Al}}^{3+}+3{\mathrm{e}}^{-}$$
(2)
$${\mathrm{Al}}^{3+}+{\mathrm{nH}}_{2}\mathrm{O}\rightleftarrows \mathrm{Al}{\left(\mathrm{OH}\right)}_{\mathrm{n}}^{3-\mathrm{n}}+{\mathrm{nH}}^{+}$$
(3)

It has been estimated that corrosion causes economic loss of around 4% of the global gross domestic product [4], which makes it necessary to understand and prevent corrosion processes. There are several instrumental techniques that can be used to characterize corrosion phenomena, including scanning Kelvin probe [5], scanning electrochemical microscopy [6, 7], microcapillary electrochemical droplet cells [8], and atomic spectroelectrochemistry [9], all of them are costly and require highly specialized technical training. On this regard, several sensors have been developed to reduce costs and facilitate operation [10]. It is worth mentioning the sensors developed by the GRECCO group, where pH indicators were used to follow the evolution of acid and alkaline fronts over an agar gel electrolyte layer during experiments of galvanic corrosion [11, 12]. The use of agar gel electrolytes has several advantages over the previously mentioned techniques, including easier manipulation, longer water retention, and convection reduction that allows the tracking of chemical species when pH indicators are immobilized on the electrolyte. To illustrate, a methyl red indicator has been used to track the acid pH front caused by the hydrolysis of Al3+ ions produced during the galvanic corrosion of aluminum alloy coupled with carbon steel. In that work, the authors also studied the use of thymol blue indicator to track the basic front produced by the reduction of oxygen over the surface of carbon steel coupled with aluminum alloys and gave experimental evidence of the predictions made by numerical modeling of the corrosion process [13]. Moreover, this kind of sensor has also been used to evidence the local acidification of the electrolyte during pitting corrosion of stainless steel [14]. To the best of our knowledge, no other chemical species, such as chromophores or complexometric indicators, have been studied to evidence the presence of different ions than hydronium or hydroxyl.

In the literature, there are several substances used as complexometric indicators (xylenol orange) or chromophores (8-hydroxyquinoline, aluminon, and alizarin red S) for complexometric titrations and spectrophotometric determination of aluminum, among them, aluminon (aurintricarboxylic acid ammonium salt) and alizarin red S (alizarin sulfonic acid sodium salt) are particularly interesting because the rapid reaction and development of color with Al(III), low detection limits, and no toxicity [15, 16]. Furthermore, in recent years, the use of these chromophores has increased to the development of innovative methods to detect and quantify Al(III) in aqueous matrices by the change of color produced for the complexometric reactions [17, 18]. Combining these innovative methodologies with strategies where digital images composed of the primary colors red, green, and blue (RGB images) are processed to detect and measure the change in the color observed in the sample [19] is possible to develop low-cost strategies to evidence the presence of Al(III) species in a sample. The present work follows a similar strategy of immobilizing an Al(III)-sensitive chromophore but using an agar gel electrolyte and RGB image processing to obtain a colorimetric sensor for Al(III) during the galvanic corrosion phenomenon. The construction of a sensor based on a chromophore selective to Al(III) immobilized in a gel electrolyte to follow the production of Al(III) species during the galvanic corrosion of an aluminum alloy coupled with carbon steel was developed. Using RGB image processing as a semi-quantitative method to track the production of Al(III) was established.

Experimental methods

Materials and equipment

All reagents were used as received by the manufacturer (Sigma-Aldrich unless another manufacturer is specified). For solutions preparation, the following reagents were used: sodium acetate (≥ 99%), sodium hydroxide solution (1 mol/L), hydrochloric acid solution (1 mol/L), aluminum chloride hexahydrate (99%), iron chloride (III) hexahydrate (> 98%), and iron (II) sulfate heptahydrate (> 99%). Additionally, sodium chloride (Fermont, ACS reagent), agar (PanReac AppliChem, suitable for microbiology), aluminum atomic absorption standard solution (1000 ppm, Fluka), alizarin red S (certified by the Biological Stain Commission), and aurintricarboxylic acid ammonium salt (aluminon, ACS reagent) were used for the colorimetric sensor preparation and calibration. Triple distilled water was used for all experiments.

A Thermo Scientific Orion Star A329 potentiometer equipped with a combined glass membrane electrode and a conductivity probe was used to measure the pH and conductivity of the solutions. A Thermo Scientific Evolution 201 spectrophotometer with quartz cuvettes was used to record UV–vis spectra.

Gel electrolyte preparation

The sensor consisted of a chromophore immobilized in a gel electrolyte phase as previously reported elsewhere [13]. In order to prepare the gel electrolyte, 0.3 g of agar were dissolved in 20 mL of NaCl 0.06 mol/L solution at room temperature. Then the mixture was heated to 90 °C for 15 min under magnetic stirring to activate the agar. Once the mixture cooled to 70 °C, a volume of 0.5 mL of a chromophore solution (aluminon or alizarin red S at 0.1 wt%) was added and homogenized under magnetic stirring. Afterward, the mixture was poured into a Petri dish (5 cm of diameter) and let it cool down at room temperature for 30 min to form a gel. Finally, the gel electrolyte was cut into rectangular prism pieces of 40 × 6 × 3 mm3.

Chromophore selection

To identify a suitable chromophore for the rapid detection of Al(III) ions during the galvanic corrosion of the couple aluminum alloy coupled with carbon steel a series of aqueous solutions mixing Al(III) with chromophores were prepared. An Al3+ 2 × 10−3 mol/L stock solution was prepared through proper dilution of the Al(III) 1000 ppm standard solution. In a 10.0-mL volumetric flask, 1.0 mL of the Al3+ stock solution was mixed with 1.0 mL of a 2 × 10−3 mol/L solution of the chromophore (aluminon or alizarine red S) and 5.0 mL of a sodium acetate 0.12 mol/L buffer solution (the pH was adjusted to 4.5 with HCl). Then water was added until the 10.0 mL mark. The effect of Fe2+ and Fe3+ as interfering species was evaluated; 1.0 mL of the previous solution was mixed with 1.0 mL of water and 100 µL of a 5 × 10−3 mol/L solution (either Fe2+ or Fe3+). The UV–vis spectrum was recorded from 300 to 750 nm. The concentration of the chemical species, pH values, and interfering ions were selected according to the information reported for the sensibility of spectrophotometric methods [15, 16] and the concentrations of Al(III) species calculated by the mathematical model previously reported by our research group [12, 13].

Since the gel electrolyte could influence the color development, 100 µL of either of the metal cation solutions previously prepared were added to cubic samples of the sensor (approximately 1 × 1 × 1 mm3) to evaluate the color development in the gel electrolyte phase. Images were recorded with a digital camera (YOMYM 40 to 1000 × endoscope, 2 MP resolution).

Sensor calibration

To calibrate the color change response of the sensor, the mixture of the gel electrolyte was exposed to different concentrations of Al3+ using a standard solution for atomic absorption spectroscopy ranging in concentration from 0.5 to 20 µmol/L. One drop of the gel for each concentration was poured into a blank sheet (calibration sheet) and then placed in an illumination-controlled box. Using a digital camera, a photo of the calibration sheet was recorded. The procedure was conducted in triplicate. Using the software Fiji for image processing, the RGB values for each standard were obtained, and the Euclidean distances against the blank were calculated with Eq. 4, where R, G, and B are the intensity of the red, green, and blue channels for the sample images, respectively, and R0, G0, and B0 are the corresponding intensities for the blank images [19, 20]. These values (Euclidean distances) were used as the analytical signal to construct the calibration curves. All the analyses were performed in triplicate and controlling the pH.

$$ED= \sqrt{{\left(R-{R}_{0}\right)}^{2}+{\left(G-{G}_{0}\right)}^{2}+{\left(B-{B}_{0}\right)}^{2}}$$
(4)

Application of the sensor for the galvanic corrosion of aluminum-steel couple

Two electrodes of 50 × 12 × 2 mm3, one made of aluminum alloy 7075 and the other made of carbon steel, were abraded from 120 to 1200 grit with SiC paper, cleaned with ethanol, and then with acetone to have freshly and non-passivated surfaces. After that, both electrodes were assembled as a galvanic couple using copper foil tape to ensure electric contact. The setup was placed into an illumination-controlled box, and then a piece of the gel electrolyte was evenly collocated on the top of the electrodes (Fig. 1). Immediately, a photograph every 30 s was recorded for 60 min in a similar way as the procedure described before [13, 21]. Subsequently, the images were processed with the software Fiji.

Fig. 1
figure 1

Scheme of the galvanic cell formed between carbon steel and aluminum alloy electrodes with a layer of a gel electrolyte on the top surface of the galvanic couple

In the same way, to test the sensor in a real sample from the transportation industry, the experiment was conducted with a setup where the aluminum alloy electrode was made of a piece of an aluminum steering rack.

Results and discussion

Preliminary studies

It is well known that the ions Al3+ can form colored complexes with the chromophores aluminon and alizarin red S preferentially in a pH between 4 and 5 [15,16,17,18, 22, 23]. In order to evaluate the effect of possible interfering ions during the galvanic corrosion of couple formed between aluminum alloys and steel, a series of solutions containing one chromophore and Al(III) in an acetate buffer solution at pH 4.5 was prepared. These solutions were exposed to equal concentrations of Fe(II) and Fe(III), and their UV–vis spectra were recorded as described in the “Sensor calibration” section (chromophore selection). In Fig. 2, the UV–vis spectra are sowed. It can be clearly identified the formation of the complex Al(III)-aluminon (maximum absorbance at 525 nm, red coloration) and the complex Al(III)-alizarin (maximum absorbance at 478 nm, orange coloration). When FeSO4 was added to the complexes, no evident changes occurred; only a tiny diminishment of the absorbance was observed due to the dilution of the original solution.

Fig. 2
figure 2

UV–vis spectra for the mixtures at pH 4.5 of the chromophore (black), chromophore with AlCl3 (red), chromophore with AlCl3 and FeSO4 (blue), and chromophore with AlCl3 and FeCl3 (magenta) where the chromophore is a aluminon or b alizarin red S

On the other hand, when FeCl3 was added, the maximum and signal broadening was observed for both complexes, indicating the interference of ions Fe(III) by forming complexes with the chromophores. Previously, the formation of the complex between Fe(III) and aluminon was reported by Bobtelsky and Ben-Bassat [15]. In the same way, the complex between Fe(III) and alizarin was previously reported by Fain et al. [16]. The most probable interfering species during the experiment of galvanic corrosion is Fe(II), which can be produced by acid or pitting corrosion of the steel. Fortunately, Fe(II) did not show interference. Nevertheless, in the presence of oxygen, Fe(II) can be transformed into Fe(III), which has indeed been demonstrated as an interfering species.

The use of gel electrolytes in electrochemical applications has been implemented with advantages such as moisture retention, temperature resistance, and good conductivity [24, 25]; nonetheless, some properties could differ in contrast with an aqueous medium. To study the possible interferences in the colorimetric sensor pieces of the gel electrolyte containing aluminon or alizarin red S were exposed to 10 µL of the Mn+ stock solutions (Fig. 3). A red color was developed immediately after the gel containing aluminon was put into contact with the Al(III) stock solution. More than 5 min passed until the orange color of the complex between Al(III) and alizarin appeared. A dark purple color appeared within 2 min when Fe(III) was added to the gel (either aluminon or alizarin), indicating the formation of the complexes. No color changes were observed with Fe(II).

Fig. 3
figure 3

Photography of the gel electrolyte containing aluminon (top gels) or alizarin red S (bottom gels) before (left gels) and after (right gels) exposition to metal cations

From the preliminary studies, aluminon was selected as the more suitable chromophore to detect Al(III) because of the faster color development in gel form and more contrasting color change. In castable aluminum alloys, however, other elements such as Si, Zn, Cu, and Mg are present [26]. Fortunately, no evidence of Si complexing with chromophores is reported and the experiments performed in the presence of Mg(II) in the same concentration as Al(III) (2 × 10−3 mol/L) did not show a color change. Nonetheless, it is a work in progress in our research group to determine the effects that Cu and Zn could produce in the findings reported in this work.

Sensor calibration and working interval evaluation

For the Al(III) colorimetric sensor preparation, aluminon was selected as the chromophore. The performance of the colorimetric sensor and the optimization were done through image processing with the software Fiji. The working interval was evaluated at aluminon concentrations ranging from 2.6 to 8 × 10−5 mol/L in an acetate buffer at pH 4.5. The electrolyte was exposed to Al(III), varying from 3 × 10−6 to 2 × 10−4 mol/L. The pH value was selected because 4.0–4.5 is the optimal pH range for the complex formation according to Winter et al. [22]. From previous studies, Montoya et al. calculated that the pH in the electrolyte on top of an AA7075 electrode decreases to 3.2. [13]. Considering that the electrolyte’s pH during the galvanic corrosion is not constant along the electrolyte, it is essential to investigate the effect of the pH over the development of the sensor.

In Fig. 4a, the representation of the Euclidean distances as a function of Al(III) concentration is presented for 3 different content of aluminon. A linear variation of the analytical signal was observed for all cases (working interval). It can be clearly observed that the inferior limit of the working interval decreases as the aluminon concentration increases. It is worth to notice that the sensitivity of the device is proportional to the aluminon concentration. To avoid the formation of color lakes between aluminon and Al(III) that could decrease the performance of the sensor, no concentrations of aluminon larger than 8 × 10−4 mol/L were tested [27]. In this regard, a loss in the linearity at lower Al(III) concentration is observed (approximately 140, 120, and 100 µmol/L, respectively) as long as the aluminon concentration increases. The best response was obtained with the sensor containing aluminon at 80 µmol/L; therefore, the evaluation of the pH effect was performed only at that aluminon concentration. The calibration curves at pH 4.5 and 3.2 are shown in Fig. 4b, a similar behavior is observed in both cases. For pH 3.2, a deviation of linearity et al.(III) concentration lower than 25 µmol/L is observed. Since in the experimental conditions, Al3+ must be the predominant species in pH values lower than 5, this linearity deviation could be attributed to aluminon acid–base equilibria [28] or the digital camera resolution. Besides that, we can conclude that no significant changes are presented in the expected pH working interval. In aqueous media, an optimal pH value of 4–5 has been reported since in this interval coexist; on the one hand, the aluminon with the deprotonated carboxylic acid groups and, on the other hand, the Al3+ ion with hydroxide complexes [29].

Fig. 4
figure 4

Agar-based aluminum sensor a working range as a function of aluminon concentration (26 µmol/L in black, 53 µmol/L in red, and 80 µmol/L in blue), and b calibration curves for the sensor containing aluminon in concentration 80 µmol/L at different pH values: 4.5 (blue) and 3.2 (magenta)

Application of the sensor for the galvanic corrosion of aluminum-steel couple

A rectangular piece of 40 × 3 × 6 mm3 of the sensor was placed on top of an aluminum-steel galvanic and a series of digital photographs were recorded as described in the “Experimental methods” section. The sensor composition employed for this section was 1.5 agar electrolyte gel (NaCl 0.06 mol/L) with aluminon at 80 µmol/L. Within the first minutes after placing the sensor on the top of the setup, a red color started to appear on the section in contact with the aluminum surface near to the galvanic surface. The red color rapidly extended along the whole aluminum surface and into the electrolyte increasing the color intensity over time. Throughout processing the digital photographs using Fiji, with the calibration curve described in the previous section, a 2D Al(III) concentration color map was created for each photograph. The evolution of Al(III) concentration on the gel electrolyte as a function of time for the galvanic couple AA7075-carbon steel is presented in Fig. 5. It can be clearly seen that when the galvanic corrosion process starts, the Al(III) is produced near to the galvanic junction and its rate of production is faster in that zone which is in good agreement with previous reports [12]. It can also be observed that Al(III) slowly internalized in the carbon steel zone probably as an effect of the diffusion and homogeneous chemical reactions. This effect was previously described by Montoya et al. [13] via numerical modeling of the same galvanic system.

Fig. 5
figure 5

Determination of the evolution of Al(III) concentration as a function of time using RGB processed images of an aluminon immobilized in agar sensor as a function of time. Dotted lines represent the galvanic junction

Finally, the AA7075 electrode was replaced by another aluminum electrode, with the same geometry, made of an aluminum steering rack in order to evaluate the sensor performance over a real sample. In Fig. 6, the 2D color maps for the real sample are shown. The slower Al(III) production rate is a clear difference between the AA7075 electrode and the real sample. These results match perfectly with findings recently reported [26] whereby using the same galvanic couples and the same conditions it was found that the cast aluminum alloy corrodes between four and eight times faster than the wrought alloy. The difference in composition between both alloys may explain such an effect. Aluminum steering racks are typically made of castable aluminum alloys with high content of silicon (between 2 and 11 wt% [30]). The AA7075 alloy has a low content of Si and is rich in Cu, Mg, and Zn. At first glance, AA7075 could have a better corrosion resistance because of its higher copper and zinc contents [31,32,33]. However, it is important to note that the kinetics of the corrosion reactions can also be influenced by the presence of other factors, such as the products formed, the pH, the temperature, and the microstructure of the surface [34]. Additionally, experience shows that aluminum casting alloys generally have better corrosion resistance than wrought alloys due to the oxide film of the foundry skin is normally more resistant [35]. Thereby, it can be expected a less aggressive galvanic corrosion in the case of the aluminum steering rack than the AA7075.

Fig. 6
figure 6

Color mapping of Al(III) concentration evolution as a function of time for the galvanic corrosion of carbon steel—aluminum steering rack

It is noteworthy that in both figures (Figs. 5 and 6), the results are in tune with those predicted by previous numerical works in the concentration scale as well as in spatial distribution [12, 26, 36]. At this point, more than the experimental observations are needed to conclude if the sensor is selective to one or several species of Al(III) from the expected ones, according to the media. Nonetheless, the profile observed is consistent with the total concentration of Al(III) predicted by the numerical predictions.

As a final remark, it is worth noticing that even though the agar gel electrolyte retains moisture for extended periods, after 60 min of experimentation, a slight diminishment of the volume was observed, indicating that water evaporation could affect the result obtained if the temperature increases during the corrosion process. On the other hand, once the sensor is prepared, it is stable for several weeks under low temperatures (< 15 °C).

Conclusions

An easy and low-cost sensor for the detection of Al(III) during galvanic corrosion experiment was successfully developed immobilizing a chromophore (aluminon or alizarin red S) on a gel electrolyte based on a NaCl agar gel; a faster color change was achieved with aluminon making it the best option to track Al on real-time. The sensor detected Al(III) concentrations in the range of 5–100 µmol/L with a linear response under acid pH (3.2 to 4.5) once the concentration of aluminon was optimized to be 80 µmol/L. Additionally, no interferences of Fe ionic species were observed at the experimental conditions. 2D Al(III) concentration color maps were obtained via a Euclidean distances methodology combined with RGB image processing. The sensor was efficiently tested for the detection and tracking of galvanic corrosion over time using a model and a real sample (AA7075 and aluminum steering rack, respectively). The higher content of Si on the steering rack alloy presumably retards the corrosion process, but further studies in the presence of Si as interfering species in aqueous media are needed. It would also be worthwhile to investigate the suitability of the sensor for the effect of the NaCl concentration as well as the thickness of the electrolyte layer, which are relevant properties on galvanic corrosion applications. However, it is important to point out that according to several numerical predictions made in our research group (and reported in multiple papers in the last 5 years), all the Al(III) concentrations obtained in this work are in a proper range. For the first time, the tracking of aluminum species was achieved by implementing an agar gel electrolyte. These results open the door to the development of low-cost sensors that facilitate the study of corrosion and aid in preventing the effect of this phenomenon.