Automated local electrochemical characterization on metals with complex shape and practice-related surface state

Various electrochemical techniques exist to study corrosion processes locally. Generally, sample preparation is required to ensure smooth surfaces, which may limit the applicability of experimental findings to engineering conditions. To overcome these limitations, we use a probe with a soft porous diaphragm that establishes electrolytic connection to unprepared metal surfaces. We develop a setup that combines this probe with a robotic device to ensure reproducible probe positioning. Results illustrate that through adjusting the force at the soft probe, the contact area can be modified. The robotic device can position the probe on non-flat, complex-shaped samples such as cylindrical, corrugated bars (reinforcing steel). As the porous diaphragm tends to become contaminated in the course of subsequent measurements, an automated probe cleaning procedure is implemented. Finally, automation of the measurements can allow for high-throughput local characterization, to deliver local characterization data suitable for statistical and spatial analysis.


Introduction
Many metallic materials used in practice present local heterogeneities on different size scales such as inclusions [1][2][3], grain boundaries [3], heat-affected zones in welding [4], residual stress distributions, or mill-scale. While electrochemical techniques offer many advantages to study corrosion phenomena and for material characterization, "bulk electrochemistry" (the entire sample immersed and measured) may not always fully reveal the differences and processes at the local scale. For this reason, several techniques of localized electrochemical characterization have been developed [1][2][3][5][6][7][8][9][10][11]. They can be divided between "immersive techniques" with the studied sample fully immersed in an electrolyte and the "point measuring techniques" where only a part of the studied material is in contact with the test electrolyte (Fig. 1).
The "immersive techniques", such as Scanning Vibrating Electrode Technique (SVET) [5], Scanning Reference Electrode Technique (SRET) [6], Scanning Electrochemical Microscopy [SECM] [7], Local Electrochemical Impedance Spectroscopy (LEIS) [8], or Scanning Kelvin Probe (SKP) [9], are able to detect local variations of localized corrosion processes. These techniques allow the qualitative identification of different zones of an electrode such as anodic and cathodic reaction locations. Under some conditions, they even permit the determination of local reaction rates. However, a major disadvantage of these "immersive techniques" is thehardly avoidablemutual polarization of the (possible) different areas of an electrode. As soon as the sample is immersed, such mutual polarization will arise and lead to timedependent modifications of the local surface states. Depending on the duration of local measurements, it may not be possible to capture comparable time states across the entire surface, which may hamper the interpretation of the measurement results. Furthermore, any technique involving polarization of selected working electrode areas with the immersive techniques is questionable, due to the lateral spread-out of the applied electrical field and limited efficiency in approaches to control this.
The "point measuring techniques" are based on a different principle. Here, only a part of the studied electrode is in contact with the electrolyte, and electrolytically connected to the reference and counter electrodes. Different setups have been developed, and are still in an ongoing improvement process, based on the point measuring techniques [1,3,11]. These techniques have different spatial resolutions and different requirements for the sample surface preparation. The "microelectrochemistry" technique uses thin capillaries filled with electrolyte [1]. The area tested is confined with a silicon rubber placed at the end of the capillary. This method allows a good control of the tested area, but requires very flat and smooth surfaces. Other techniques are based on capillary droplet cells [3,11]. The tested area, corresponding to the area where the droplet is in contact with the sample, is less well controlled. All traditional electrochemical techniques, e.g. Cyclic Voltammetry (CV) or Electrochemical Impedance Spectroscopy (EIS), can be performed on that restricted area [1]. The "point measuring techniques" are able to give results from the different electrode areas directly, and mutual polarization between the different areas is strongly limited.
The above-mentioned measuring techniques generally have a spatial resolution ranging from nm to mm [1,3,11]. They allow investigation of the effect of local characteristics such as inclusions or other microstructural features [2,3]. A drawback of these techniques is the high experimental effort necessary to prepare the sample to achieve a smooth surface. Furthermore, the sample preparation modifies the surface, potentially creating an electrode/electrolyte different from the one encountered in practice.
To perform local electrochemical characterization on rough and corrugated surfaces, the used local electrochemical sensor needs to be able to adapt to this uneven surface. For this reason, the option of a local electrochemical sensor with a soft porous diaphragm to ensure electrolytic connection with the tested surface has been proposed [12,13]. Nevertheless, the accuracy of positioning and controlling the contact area remains a challenge, because such point measurements are generally done manually. Further open questions are related to the effect of contamination of the soft porous diaphragm arising from contacting the studied sample and how this possibly influences subsequent measurements.
Here, we developed an automated system that combines a point measurement sensor for the local electrochemical characterization with a robotic device, to ensure reproducibility and accuracy in positioning of the sensor and controlling the contact area. Moreover, automation allows the integration of sensor cleaning procedures between the individual measurements to minimize effects related to sensor tip contamination in the course of the measurements. Finally, automation of the measurements is seen as an opportunity to allow for highthroughput local characterization and thus to deliver local characterization data suitable for statistical and spatial analysis.
One of the motivations for the development of a setup for automated local electrochemical characterization (ALEC) on materials with complex shape and practice-related realistic surface state was to use it to characterize reinforcing steel bars in the context of chloride induced corrosion of steel in concrete. This type of corrosion presents a mechanism with a localized aspect with pitting of passive layer [14]. Macrocells with anodic and cathodic areas lead to high corrosion rate and rapid loss of material on the active areas. This localized aspect of the chloride induced corrosion of steel in concrete is difficult to capture and study with bulk electrochemical methods in which the studied electrode is entirely immersed in an electrolyte. However, local characterization with "point measuring techniques" can be used to identify areas with different pitting susceptibility at the surface of reinforcing steel.
The different components combined in the presented setup, such as an articulated-arm robot, a force sensor, a potentiostat and a local electrochemical sensor are presented. The automation and communication between all the devices are explained in detail. Example results are presented to illustrate the capabilities of the presented apparatus.

Experimental setup
The method developed combined different components in order to perform an automated local electrochemical mapping of metal samples of various shapes, from flat and smooth surfaces to practice relevant complex surfaces. In a first section, the different individual apparatus characteristics and functions in the presented setup are described. Subsquently, the way they interact in the developed automated procedure is described.

Positioning articulated-arm robotic device
The positioning robotic device used is a Mitsubishi RV-2AJ [15]. This is an industrial articulated-arm robot with a load capacity of up to 2 kg, five joints and five degrees of freedom. Each joint has one freedom of rotation around its axis. The robotic device holds and positions the local electrochemical sensor at the surface of a tested sample for local electrochemical characterization.
An objective for the developed setup was to build it as versatile as possible in terms of test sample shape. The articulated-arm robot is able to position the local electrochemical sensor at any point within its working space. The electrochemical sensor needs to be always positioned on the electrode with the porous diaphragm facing downwards, see Section 2.1.4 for additional details on the local electrochemical sensor. This orientation ensures a constant immersion of the two electrodes of the sensor and electrolytic connection with the test sample. For flat samples the only requirement is therefore to place the test sample within the robot working space with the surface to characterize facing up.

Stepper motor
For cylindrical samples, an additional degree of freedom was necessary to reach each point on the surface of the sample while keeping the same downward electrochemical sensor orientation. This additional axis of freedom was implemented by the addition of a stepper motor connected to two drill chucks holding the studied sample, see Fig. 2. The stepper motor used in the setup is a Nema 17 with 200 steps per revolution, connected to a stepper driver Polulu A4988.

Force sensor
An S-beam force sensor is installed between the robot tool flange and the local electrochemical sensor. The force sensor used in the presented setup is a KD24S.20 N sensor connected to a GSV6K amplifier, see Fig. 3 b. The sensor can measure forces betweenand + 20 N with a resolution of 0.02 N in the vertical axis of the S-beam. It was mounted between the robot tool flange and the local electrochemical sensor to measure the force applied axially on the local electrochemical sensor, see Fig. 3 a.

Electrochemical equipment
The local electrochemical sensor used for local measurements is an electrochemical cell designed specifically for our setup. The sensor is based on the "ec-pen" developed by the Swiss Society for Corrosion Protection [12], Fig. 4. Our sensor consists of a transparent cylindrical container of around 20 mL that can be filled with different electrolytes. Two electrodes with electrical connection through the lid are immersed in the electrolyte. An Ag/AgCl electrode can be used as reference electrode when the electrolyte inside the sensor contains chloride ions. A platinum wire is used as counter electrode. A porous diaphragm tip is present at the bottom of the cylindrical container. Different porous diaphragms can be used as long as they satisfy the function of electrolytical conductivity without leaking of the electrolyte. To avoid leaking of the electrolyte from the cylindrical container three O-rings are placed at the bottom end of the sensor, see Fig. 4. Two different porous diaphragm tips have been used during this study and are presented in more details in Section 3.1.1. The diaphragms used are made of PolyEthylene and they are both treated to be hydrophilic, to allow the passage of aqueous electrolyte. Additionally, the softness of the porous diaphragm permits to ensure a proper contact area between rough surfaces and the local electrochemical sensor.
The area of the metal wetted by the electrolyte corresponds to the area of contact between the porous diaphragm and the studied electrode. Thus, this contact zone is the working electrode. The contact area and thus the size of the working electrode depends on the shape of the porous diaphragm tip and the force applied on it, see Section 4.1. for more details.
The three electrodes, counter and reference electrodes of the sensor plus the wetted area of the tested sample as working electrode, are connectable to any electrochemical device and can be used to perform electrochemical measurements. Two and three electrode cell electrochemical characterization techniques are possible. The potentiostat used in this work is a Gamry E1010 interface. This specific potentiostat was chosen for its ability to be controlled via the LabView interface instead of using the standard software provided by the manufacturer, to allow for automation of the experimental characterization method. More details on the automation can be found in Section 2.2.

Hardware architecture (overview)
All the devices presented previously are ultimately connected to a  The local electrochemical sensor is held in place by a clamping system using screws to fix or remove the sensor. One piece of that clamping system is directly screwed to the S-beam force sensor in a way that the measured force is the force applied axially to the porous diaphragm tip of the sensor. The S-beam force sensor itself is also connected to the articulated-arm robot tool flange with the help of screws. Those three elements, namely the articulated-arm robot, the force sensor, and the local electrochemical sensor are assembled together in a way that the sensor and porous diaphragm axis's are always perpendicular to the X,Y plane of the robot working space, with the porous diaphragm tip facing down.
The local electrochemical sensor electrodes are connected through electrical wires to the Gamry 1010 E potentiostat. An electrical connection is also established with the studied sample (working electrode). Soldering, screw connection, or simple alligator clipping can be used to ensure an electrical connection between the tested samples and the working electrode cable of the potentiostat. Electrical isolation of the cylindrical samples from the drill chucks and rotative system is ensured by embedment of both ends in a non-conductive resin.  The potentiostat is connected through USB connection with the computer. The articulated-arm robot is connected to the computer through a RS232 connection. The stepper motor and force sensor, via the amplifier, are connected to an Arduino microcontroller with simple electrical wires. The microcontroller is then connected the computer with USB connection.

Automation
The presented local electrochemical characterization setup has been automated in search of improving the positioning performance (controlled sensor-sample contact, accurate positioning, reproducibility) and to increase the measurement capacity (large number of measurements). The automation was implemented using LabVIEW environment. LabVIEW is using a visual programming language and is broadly used to control instruments and record data. LabVIEW programs are usually referred as virtual instruments (VI). For sake of simplicity, the developed VIs are referred in this contribution as programs. The developed setup can be divided into two main parts that are exchanging information and commands. One program is controlling the positioning of the local electrochemical sensor and one program is controlling the electrochemical procedures performed with the local electrochemical sensor, see Fig. 7. Fig. 7 shows a simplified operational flowchart of the sequence of steps to perform ALEC. Two main programs, sensor positioning and electrochemical measurement program are running in parallel. In addition to these two main programs, the sensor positioning program needs to communicate with two codes running on the articulated-arm robot and Arduino microcontroller. These parts are not shown in Fig. 7.

Software architecture (overview)
For both main programs, some inputs from the user are necessary. In the sensor positioning program, the shape of the test sample needs to be defined, a starting position coordinates needs to be provided (SPP.0). The spacing between measurement locations and the number of local measurements, defining the size of the area locally characterized, are also needed. Cleaning or calibration details might also be necessary if such steps are implemented. More details can be found in Section 3.2.2.
All the communications between the electrochemical and positioning programs, green and red arrows in Fig. 7, are done through global variables with a Global VI containing all these global variables.

Sensor positioning program (SPP)
The positioning program is the main controller of the articulated-arm robot, the force sensor, and the stepper motor. It also serves as user interface to introduce the necessary user data inputs and start the data acquisition experiments. The main task of the sensor positioning program is to position and hold the local electrochemical sensor at the desired location until the electrochemical characterization is complete. To do so, it needs to control the articulated-arm robot position and, in the case of a cylindrical sample, the stepper motor position to rotate the sample to the desired orientation. It also needs to monitor the force value that is applied on the local electrochemical sensor to make sure that an electrolytic connection between the test sample aimed position and the reference and counter electrodes is established. Monitoring the force applied on the local electrochemical sensor also permits to avoid deterioration of the porous diaphragm tip due to too high applied force leading to deformation of the porous diaphragm. Finally, controlling the force allows modification of the wetted area.
The sensor positioning program randomizes the order of the location measurement (SPP.1) to minimize the influence of possible drift during the experiment time, e.g. change of electrolyte's pH in contact with the sample.
The next location where the local electrochemical sensor needs to be placed is reached in a two steps manner. First a movement of the articulated-arm robot, and if necessary of the stepper motor, to move the local sensor few millimeters above the aimed position (SPP.3). In a second step, the local sensor is approached from the surface in a step-bystep manner (SPP.4). After each increment movement in Z direction, the force value is checked and compared with the force value defined as trigger to start the electrochemical characterization procedure (SPP.5).
Once the measured force reaches the defined trigger value, the sensor positioning program blocks the position of the local electrochemical sensor (SPP.6). It is worth noting that during the electrochemical data acquisition, the position of the local electrochemical sensor is kept constant. The sensor positioning program also needs to communicate with a second program controlling the electrochemical characterization, by transmitting an output signaling that the electrochemical procedures can be started, "ec-sensor in position = True" in Fig. 7. The knowledge of the correct positioning of the local electrochemical sensor where the electrochemical characterization is performed is also crucial to associate efficiently the local electrochemical results with their position. To do so, numerical global variables are also transmitted from the sensor positioning program to the electrochemical measurement program, "Position of the ec-sensor" in Fig. 7. The position of the local electrochemical sensor needs to be maintained (SPP.7) until an input from the electrochemical measurement program signaling that the electrochemical procedures are complete, "Data acquisition complete = True" in Fig. 7. After completion of the electrochemical characterization procedures, depending on the user specifications, the local sensor is either directly moved towards the next measurement location (SPP.3), or first subjected to a cleaning procedure (SPP.10) and then moved towards the next measurement location (SPP.3). More details on the cleaning procedure can be found in Section 3.2.2.
To control the articulated robot arm, the stepper motor, and to receive data from these devices and the force sensor, the positioning program communicates with the Arduino microcontroller and the articulated-arm robot. Two loops are running on these two devices and are not represented in the simplified operational flowchart, Fig. 7; however, they are briefly discussed below.  motor. The Arduino microcontroller code is written in the Arduino Integrated Development Environment (IDE) in #C.

Articulated-arm robot code.
The articulated-arm robot runs on its own software and similarly to the microcontroller works on a loop principle. In this loop, the robot code waits for a serial input from the main controller. This input contains the coordinates of the next wanted position for the local electrochemical sensor, in the global robot coordinate system, and the type of movement to reach this next position, e.g. path trajectory and speed. If a displacement is needed, the second step is the execution of the movement. Lastly, once the movement is finished, the new position of the articulated-arm robot is read and stored to be read as an input for the main controller, i.e. the positioning program.

Electrochemical measurement program (EMP)
The electrochemical measurement program controls the potentiostat that performs the electrochemical procedures. Similarly to the sensor positioning program, the electrochemical measurement program provides a user interface to define input data necessary to run the experimental electrochemical characterization procedures (EMP.0).
The electrochemical measurement program waits (EMP.1) for the input from the sensor positioning program, namely the information that the local electrochemical sensor is at the aimed position, "ec-sensor in position = True" (EMP.2). Once this is the case, the electrochemical procedure(s) defined by the user can be performed (EMP.3). The recording of the electrochemical values is saved (EMP.4) along with the corresponding position of the local electrochemical sensor position during the measurement, "Position of ec-sensor". This position is known thanks to the information on the coordinates of the articulated-arm robot position, and stepper motor position in the case of cylindrical sample. When the defined electrochemical procedures are completed and the data acquisition is finished (EMP.5), an output is sent to the sensor positioning program to move the local electrochemical sensor to the next measurement location, "Data acquisition complete = True" in Fig. 7. The electrochemical measurement program reinitializes all the electrochemical parameters (EMP.6) and returns to the waiting mode (EMP.1) for the next measurement location.

Materials and methods
This section is divided in the different test cases performed for the presented contribution. For each test case, materials used and applied methods are described. All presented experiments were performed at room temperature (±20 • C).

Materials
To test the influence of the applied force on the wetted area, ink was used to mimic the electrolyte. The ink used was the 4001 brilliant black ink from Pelikan®. Steel (St 12.03) plates were used as received to represent metallic materials to be electrochemically characterized.
The influence of the porous diaphragm geometry was also investigated by using two different types of porous diaphragm tip. One diaphragm is the XS45611 ETP-Y bullet nib produced by POREX©, referred as POREX tip in the rest of this contribution. The second is the PE 002-014 produced by Polystar Technologies, referred as Polystar tip in the following. Both porous tips geometries are visible in Fig. 8. The tips are made of polyethylene (PE). The POREX tip average pore size is between 40 and 80 μm, its pore volume is greater than 35 %, and it has a minimal stiffness of 10 N. The average pore size of the Polystar tip is between 60 and 80 μm. All information given here are provided by the producers.

Methods
The articulated-arm robot was used to approach and place the local sensor in contact with the steel plate. The value of the force threshold used to block the position of the local sensor and trigger the electrochemical procedures was varied. For the study of the wetted area with respect to the applied force, no electrochemical procedure was performed. The position of the local electrochemical sensor was blocked at a defined applied force and contact was maintained for 30 s. In the case of the POREX tip, 4 contacts were done per targeted applied force; in the case of the Polystar tip, 11 contacts were done per targeted applied force. The stain of the ink on the steel plate left after removal of the load was defined as the wetted area between the porous diaphragm and the steel plate.
Images of the ink print left on the steel plate were acquired with a LEICA M60 optical microscope. The ink print image processing was conducted in the software "FiJi" (ImageJ). The inked area was manually drawn and the size of this area was given by the "ROI manager" tool.

Materials
Two cases were used to demonstrate the accurate positioning of the local electrochemical sensor by the presented setup.
One case illustrates the positioning on a flat and smooth surface. The sample consisted of a steel (St12.03) plate partially covered with a zinc (EN988) sheet. A window of 2 cm by 2 cm, covering both metals, was characterized with the presented setup, see Fig. 11 a.
A second case illustrates the positioning on a cylindrical corrugated surface. A ribbed reinforcing steel bar type class B according to EN 1992-1-1:C005 was used. The bar diameter was of 12 mm and the total length was 10 cm. Prior to the electrochemical characterization the steel bar was sandblasted and rinsed with acetone, see Fig. 13 b.
In both cases, the electrolyte used in the sensor for the electrochemical characterization was a solution containing 0.1 M NaOH (pH 13) and 0.01 M NaCl.

Methods
In both cases, the electrochemical procedure was an open circuit potential, OCP, measurement. At each measurement location, the OCP was recorded for 60 s for the flat and smooth surface sample, and 180 s for the cylindrical corrugated surface sample, before going to the next measurement location. Fig. 8. Sketches of the POREX and Polystar tips geometries.
As the shape of the samples was different, flat and smooth surface and cylindrical corrugated surface, different positioning methods were used. For the flat sample, the bottom left corner of the characterized area, see Fig. 11 a, was used as starting point for the characterization. This position was first reached by manual control of the articulated-arm robot and coordinates were fed to the positioning program. The measurement grid was defined as 22 points in each direction (X and Y) with a distance between two adjacent points of 1 mm. The force threshold to trigger the electrochemical characterization was selected in such a manner that it corresponded to a test area of ca. 0.7 mm2. Electrochemical results were saved together with their measurement location in the form of X,Y, and Z coordinates in the global robot coordinate system.
For the cylindrical sample, a section of 4 cm length of the rebar was characterized. Similarly to the flat sample a starting point was specified manually towards the negative side of the Y coordinate of the robot working space and a nominal position of the stepper motor of zero. The coordinates of the starting point were fed to the positioning program. The used measurement grid was chosen to obtain measurement locations distant from each other by 2 mm in the longitudinal direction and around the perimeter of the cylinder. Therefore, the number of points around the perimetric surface was 19 points for an "ideal" (no ribs) perimetric distance of 37.7 mm (π*d with d = 12 mm). The distance between two adjacent points was 1.98 mm and the angle difference between two points was equal to ca. 19 • . The angle movement was performed by the stepper motor and the change in longitudinal position was performed by the articulated-arm robot. The force threshold chosen to have the initiation of the electrochemical characterization corresponded to a test area of ca. 0.75 mm2. Electrochemical results were saved together with their measurement location in the form of Y and Z coordinates in the global robot coordinate system and ϕ, the angle nominal position of the stepper motor.

Polarization experiments and automated sensor cleaning procedure
Electrochemical methods involving polarization are suitable to obtain information on corrosion state and kinetics of metals as well as the type of corrosion products formed. Some polarization methods are considered non-destructive, e.g. linear polarization resistance or electrochemical impedance spectroscopy, others are destructive because they modify extensively the studied system, e.g. Tafel extrapolation, cyclic voltammetry, or pitting potential measurements.
This polarization during a measurement may lead to anodic dissolution, oxidation and reduction processes that can give rise to contamination of the sensor's porous tip. Such contamination may influence subsequent measurements. To avoid these possible adverse effects of polarization measurements, an automated cleaning method was developed. To assess and illustrate its efficiency, pitting potential measurements were performed without and with the developed automated cleaning procedure. The following section describes in detail the automated cleaning method and materials used.

Materials
A steel (St 12.03) plate, passivated for 24 h in a 0.1 M NaOH solution, rinsed with water and acetone prior to the local electrochemical characterization, was used. Different zones of the steel plate were characterized for each experiment.
The electrolyte used for the electrochemical characterization was a a solution containing 0.1 M NaOH, pH 13, and 0.1 M NaCl; giving a 1:1 ratio for Cl-/OH-. In the case of the automated cleaning procedure, the cleaning solution contained 0.1 M NaOH, 0.1 M NaCl and 0.004 M Ethylenediaminetetraacetic acid (EDTA).

Methods
A starting point was defined on the steel plate, that point being the characterized location with the value towards the negative side in the X and Y direction. Each adjacent points were distant from each other's by 2 mm in X and Y directions. The measurement grid size was varied to have different amounts of measurements (18,56, and 108 points). The force threshold chosen to initiate the electrochemical characterization  The basic electrochemical procedures to obtain pitting potentials were an OCP measurement of 60 s followed by an anodic polarization from − 0.05 V vs OCP to + 0.8 V vs Ag/AgCl 0.1NaCl . This protocol was rigorously applied at each point in the case illustrating polarization measurements without automated cleaning method.
Different approaches are possible to mitigate pollution of the porous diaphragm tips of the electrochemical sensor. Depending on the electrochemical procedure, limitation of created corrosion products can be implemented. For example, if the objective is to obtain local pitting potentials, a limit in recorded current can be implemented to stop the polarization procedure when this limit is exceeded. Nevertheless, this cannot completely eliminate the production of corrosion products. Another approach is to clean the porous diaphragm after each measurement, namely by removing precipitated corrosion products. Precipitated iron corrosion products can be dissolved with the help of chelating agents such as EDTA.
These two ways of improvement were used in the developed pollution mitigation procedure. A current limit of 0.2 μA was implemented in the electrochemical procedure to limit further polarization once pitting was initiated. Cleaning of the porous diaphragm was performed in a two steps manner. After completion of the electrochemical data acquisition on point i, the robotic arm moved the sensor to a beaker, where the porous diaphragm tip was immersed during 60 s in a cleaning solution containing 4 mM of EDTA. This promoted the complexation of iron oxides and thus removed them from the porous diaphragm. To limit the modification of the electrolyte in the porous tip, EDTA containing solution was subsequently pressed out of the porous diaphragm by application of contact, until 0.3 N, between the porous diaphragm and a textile sponge. The porous diaphragm tip was then immersed during 60 s in a rinsing solution identical to the local electrochemical sensor's electrolyte. To avoid the presence of an electrolyte droplet on the sensor's tip, that would increase the tested working electrode area, the porous diaphragm tip was dried by positioning the sensor on a second textile sponge, again with a force of 0.3 N, prior to the next local characterization. Finally, the articulated-arm robot moved the sensor to the next measurement location i + 1. Illustration of the cleaning procedure is visible in Fig. 9. Experiments without pollution mitigation were performed without current limit and without automated cleaning procedure. Experiments with pollution mitigation were performed with a limit current implemented in the anodic polarization procedure, and automated cleaning of the porous diaphragm tip between each measurement. It is worth to mention that no ohmic drop compensation method was used during polarization procedures. This was justified on the basis of results presented in a previous contribution [18], where with a test solution similar as the one used in the present experiment, namely 0.01 M NaOH and NaCl and 0.1 M NaOH and NaCl, the apparent tip resistance was found to be around 25 -50 kΩ. This value was 2 -3 order of magnitude lower than the polarization resistance of comparable electrodes being studied. The apparent tip resistance was also orders of magnitude lower than the input impedance of the used potentiostat, i.e. 10 12 Ω. Therefore, the resistance of the porous tip and its impact on the apparent ohmic drop was considered to not affect the measurement.

Wetted area vs applied force
The geometries of the two types of porous diaphragm tip tested are presented in Fig. 8. An example of ink print left by the tip on the metal sample is visible in Fig. 10, together with the overview of the results of the influence of the applied force on the wetted or inked area.
As expected, the inked/wetted area increases with the applied force, Fig. 10. The area wetted by the POREX tip is smaller than the area wetted by the Polystar tip, e.g. at 0.3 N ca. 0.5 mm 2 , and 1.25 mm 2 for the POREX and Polystar tip respectively. The influence of the force variation is different on the wetted area by the two porous tips. The area wetted by the Polystar tip increases steeply as soon as the applied force increases, from ca. 1.25 mm 2 at 0.3 N to ca. 2 mm 2 at 0.7 N. On the other hand, the increase of the area wetted by the POREX tip is less pronounced, from ca. 0.5 mm 2 at 0.3 N to ca. 1 mm 2 at 2.1 N. The initial difference in inked/wetted area at low applied force is due to the difference in shape between the two porous tips. The different influence of the applied force variation is probably due to differences in softness between the two tips. At similar applied force more deformation occurs for the Polystar tip than the POREX tip. From the error bars, it is apparent that in both cases the relationship between force and wetted area is well reproducible.
The use of porous diaphragm tips with different geometries and physical properties, e.g. softness, combined with variation of the applied force allows us to vary the size of the area wetted. The spatial resolution of the local electrochemical characterization can be adjusted. In our examples, this area varies from ca. 0.5 mm 2 to ca. 2.25 mm 2 . Thus, different porous diaphragm geometries may be used to extend this window area in both directions, smaller and larger resolution, for ALEC.

Positioning of the local electrochemical sensor
For the interpretation of local electrochemical surface characterization, an accurate positioning and a correct recording of the local electrochemical sensor position on the material to be tested is crucial.
The accuracy of the positioning of the local electrochemical sensor by the articulated-arm robot is illustrated with two examples. One example uses a flat and smooth surface sample; the second uses a cylindrical corrugated surface sample.

Flat and smooth surface
A flat sample that consisted of a steel plate partially covered with a zinc sheet was used, see Fig. 11 a. The corresponding electrochemical map obtained with the measured OCPs is visible in Fig. 11 b. X and Y axes correspond to the recorded value of X and Y coordinates of the articulated-arm robot in the global robot coordinate system. Some examples of the recorded OCP vs time are visible in Fig. 11 c with framed squares in Fig. 11 b indicating their measurement locations. The OCP vs time curves exhibit significant variations, i.e. ± 100 mV during the first 30 -40 s, before reaching a steady state. These variations, e.g. amplitude and direction, are attributed to the heterogeneity of the metallic surfaces. The OCPs shown in Fig. 11 b, for each location was the average of the last 20 s of OCP measured when steady state was reached.
The electrochemical map, Fig. 11 b, and the box plots, Fig. 11 d, clearly show two different zones of potentials corresponding to the two different metals characterized. A central zone with potentials around -1 V vs Ag/AgCl 0.01NaCl corresponding to the zinc sheet, and two zones with OCP values around − 0.35 V vs Ag/AgCl 0.01NaCl , corresponding to the steel.
For each category, a wide distribution of the measured potential is observable. The local OCPs measured at steel locations vary between − 0.576 and − 0.057 V vs Ag/AgCl 0.01NaCl , and the OCPs measured at zinc locations vary between − 1.257 and − 0.632 V vs Ag/AgCl 0.01NaCl . The median values obtained for the two metals are in accordance with available values in literature in similar conditions, i.e. alkaline solution with presence of chlorides [16,17]. Some of the values located in between the two boxes might be due to locations where the studied wetted area, or working electrode, comprise both metals with different area ratio leading to different measured mixed potentials. The presented results illustrate that our method is able to capture such local electrochemical variation at the surface of metals. Fig. 12 a presents the obtained electrochemical map based on OCP values measured. The X axis corresponds to the perimetric position, with 0 corresponding to the stepper motor position at 0 • . The Y axis corresponds to the Y coordinate of the articulated-arm robot in the robot global coordinate system, and hence reflects the position of the local electrochemical sensor on the length of the reinforcing steel bar, while electrochemical data acquisition was going on. The 2D map, Fig. 12 a, represent the 3D "unfolded cylinder". Accurate positioning of the local electrochemical sensor at the surface of a corrugated sample was checked on the basis of the recorded coordinates in the global robot system coordinate. The distance from the rebar axis, r, was calculated for each measurement location based on the Y, Z, and ϕ values, Fig. 13 a. Photographs of the corresponding characterized areas are visible in Fig. 13 b. Fig. 13 a clearly displays pattern of the rebar topography. It illustrates the alternation of ribs and valleys at the surface of the tested sample. This result shows that the developed setup is able to position the local electrochemical sensor accurately at the surface of a cylindrical corrugated sample.

Automated electrochemical polarization procedures and correlated issues
In the following section, the efficiency of the developed automated cleaning method is illustrated with comparison of results obtain without and with the cleaning method.

Porous tip pollution
When successive polarization procedures on different locations are performed, the antecedent measurements can compromise the following measurements. Illustration of the tip pollution phenomenon is done with experiments of local anodic polarization on a steel plate electrode surface that had been passivated during 24 h in a NaOH 0.1 M solution. More details on the method can be found in Section 3.3.2.
Fig. 14 a displays the recorded value of OCP and E pit with respect to the measurement order for the automated local electrochemical anodic polarization measurements without any porous tip cleaning. E pit was arbitrarily defined as the potential at which the recorded current reached a value above 0.1 μA, i pit . Note however, that polarization was not stopped at E pit , see Fig. 15. Fig. 14 b displays a photograph of a porous diaphragm tip after 18 measurements performed with the noncleaning method.
Pollution of the diaphragm is clearly visible with the presence of corrosion products in the porous diaphragm tip and particularly at the location that had been in contact with the studied sample. The corresponding electrochemical measurements, part A in Fig. 14 a, clearly show that after a few measurements the OCP and E pit are almost equal illustrating an active behaviour of the characterized working electrode, part B in Fig. 14 a. Fig. 15 shows polarization curves for the first 4 measurements performed for the 18 points experiment with the non-cleaning method of the porous tip. The areas measured first have a clear passive behaviour, Area 1, 2, and 3, with a region with increase of the applied potential and flat-recorded current. Once a stable pitting has occurred, Area 3, the following measurements, Area 4, behave active without region of stable current with increase of potential. All polarization curves measured after 4th measurement were similar to the curve Area 4. A decrease of the measured OCP is also visible after stable pitting has occurred. The values measured after the first occurrence of pitting are attributable to the corrosion products accumulated in the sensor's porous diaphragm tip and not to the newly tested area.
The change of values obtained after ca. 50 measurements, parts labeled C in Fig. 14 a, for the E pit , and the higher variation of the measured OCPs, may be attributed to clogging or drying of the porous diaphragm leading to a poor electrolytic connection between the sensor electrodes and the working electrode.
These results clearly show that successive local polarization experiments, although each on a fresh area of the sample, lead to pollution of the porous diaphragm with corrosion products formed during polarization. This pollution of the porous diaphragm causes adverse effects on the following measurements. If one wants to use polarization methods for ALEC, one must thus take care of the state of the porous diaphragm condition. A possible approach to overcome this problem is discussed in the following section. Fig. 16 a presents the recorded values of OCP and E pit on the same steel plate at different locations obtained with automated cleaning of the electrochemical sensor tip, see Section 3.3.2. No significant change of the measured OCP is visible with increasing number of measurements. OCP and E pit values are also split apart during the entire time of the experiments. E pit was defined as the potential at which the recorded current reached a value above 0.1 μA. Most of the characterized locations exhibit E pit values above 0.45 V vs Ag/AgCl 0.1NaCl , corresponding to the potential where the oxygen evolution reaction starts. Thus, most of the characterized areas present a passive film that did not show pitting signs in the performed experiment.

Automated cleaning method to mitigate porous tip pollution
A photograph of a porous diaphragm after 108 local electrochemical characterizations is shown in Fig. 16 b. Thanks to the cleaning procedure color changes of the porous diaphragm could be reduced to a minimum. No accumulation of solid corrosion products was visible at the zone of contact with the tested sample. The tested working electrode at each location was therefore, free from the influence of previously created corrosion products.
Comparing OCP measurements obtained without and with cleaning procedure and the OCP results obtained on the same steel plate type in Section 4.2.1, one can see that the results in Fig. 16 a agree well with the results shown in Fig. 11 b and d (note the different reference electrode scale). On the other hand, the scatter as well as the absolute value of the OCP recorded in Fig. 14 a are not in agreement with the results from Fig. 11 b and d. From the results presented in Fig. 16, attentive care of the porous diaphragm conditions seems to permit to perform ALEC using polarization procedures.

Conclusion
In this work, the development of an automated setup to perform local electrochemical characterization of metal samples with complex shape is reported. Based on the description of the setup and the results of different experiments, the following features of the setup are highlighted: • The setup is versatile concerning the shape of the sample to be tested.
Flat samples and cylindrical, corrugated samples (e.g. reinforcing steel bars) can be electrochemically mapped (Figs. 12 and 13). • Thanks to the soft porous diaphragm, rough and smooth surfaces can be characterized (Figs. 11 and 12). Thus, samples can be  characterized with limited surface state modification compared to their state in practice-related conditions. • The resolution of the characterized areas can be adjusted thanks to modification of the porous diaphragm geometry in combination with controlled applied force. In the present work wetted areas could be varied from ca. 0.5 mm 2 to ca. 2.25 mm 2 (Fig. 10). • The grid size and spacing between neighboring measurement points can be adjusted. • The electrolyte of test can be modified to change the studied system, as long as chloride ions are present to ensure the stability of the integrated Ag/AgCl reference electrode. • Various electrochemical procedures can be used to locally characterize the working electrode, ranging from relatively fast open circuit potential measurements to more complex electrochemical characterization such as pitting potential measurements or other techniques. • The setup includes an automated sensor cleaning procedure that minimizes effects related to contamination of the sensor tip from antecedent measurements (Fig. 9). Such effects were demonstrated to rapidly influence the subsequent point measurements if no measures are taken to clean the sensor from accumulating corrosion products (Figs. 14 and 15). • The entire local electrochemical characterization process is automated and requires very limited manpower to be performed, thus allowing for high-throughput mapping and characterization.
Many parameters of the setup can be adjusted and offer the opportunity to use the setup in the future in different domains. As an example, the setup was recently used in the characterization of point-by-point wire and arc additively manufactured steel bars [18]. Fig. 16. a, OCP, ◊, and E pit , x, obtained for 18 (red), 56 (green), and 108 (blue) consecutive point measurements on a steel plate with cleaning of the porous diaphragm tip between all measured points; b close-up picture of a porous diaphragm tip after 108 characterization procedures, each consisting of 60 s OCP measurements, followed by anodic polarization from -0.05 V vs OCP to 0.8 V vs Ag/AgCl 0.1NaCl or until the current reaches 2.10 -7 A, with cleaning of the porous diaphragm tip.