Design and Development of Software for the SILAR Control Process Using a Low-Cost Embedded System

: Inexpensive equipment for the deposition of semiconductor thin ﬁlms by SILAR was designed. Using a low-cost embedded system, a prototype controlled through a human–machine interface (HMI) was constructed. Simple, open-source software was used. The use of an HMI and programming based on state machines showed an improvement in the system control, program ﬂow, and efﬁciency. The system development consists of three stages: structural design, electronics, and programming of the control and HMI. This system controls the variables of the SILAR process, such as immersion time in chemical solutions, sequence of substrates, and the number of cycles. In order to test the automated SILAR prototype, copper oxide thin ﬁlms on glass substrates were processed. The copper oxide thin ﬁlms have been characterized by X-ray diffraction (XRD), UV-VIS, and SEM to investigate the structural, optical, and morphological properties, respectively.


Introduction
Obtaining chemical compounds in thin film form is very important since these compounds can have applications in solar cells [1], gas sensors [2,3], humidity sensors [4], hydrogen production [5], and water treatment [6], among others.
To facilitate the work of obtaining thin films in the laboratory, different technological developments have been carried out aimed at the automation of experimental processes. Examples of them are the developments presented by Congiu et al. [13], who automated electrodeposition, dip coating, and SILAR processes, using low-cost microcontrollers, while Garzón et al. [14,15] performed the automation of the SILAR process using microcontrollers and data acquisition cards, respectively. Moreover, Jaramillo et al. [16] reported the automation of an electrochemical synthesis of cobalt-doped zinc oxide (Zn (1−x) Co x O) thin films for solar hydrogen production and Santos et al. [17] reported the development of an equipment to the deposition of thin films by the spin-coating process, which was electronically controlled. Lastly, Nagarethinam et al. [18] reported an automated low cost trigger enhanced spray technique to deposit cadmium sulfide (CdS) thin films; a low-cost microcontroller was used to accomplish this. In a previous study, Valdez-Martínez et al. [19] developed a control system that automated the SILAR process by means of a program made in JAVA. That could be executed in a personal computer system and it is used as an element for the acquisition of information and control, a development based on the open-source electronics platform Arduino, which incorporates a low-cost re-programmable microcontroller.
This manuscript shows the design and technological development of a prototype which allows the automation of the SILAR chemical process for the deposition of semiconductor thin films. A microcontroller was used as an embedded system and it can be totally independent of a personal computer. The prototype also has an integrated human-machine interface (HMI) to configure the deposition parameters of the SILAR process. The HMI implementation gave the SILAR prototype more versatility and made its handling easier for the user. The novelty of this work is that the low-cost embedded system (Microchip ® PIC microcontroller) has been open-source programmed. This fact is important, as any interested user can carry out the development of their own prototype without using commercial software. The prototype developed in this work is able to perform the SILAR process for obtaining semiconductor materials in thin films in an automated way. Another advantage of the prototype is that an experiment can be done in triplicate (three samples at a time).

Deposition of Thin Films by SILAR Process
In the literature, it has been found that by means of the SILAR technique, several compounds can be obtained in thin films, such as copper oxide CuO [20], nickel oxide (NiO) [21], copper sulfide (CuS) [22], and zinc oxide (ZnO) [23]. The well-known SILAR process consists of four steps: adsorption, rinsing, reaction, and rinsing [24]. Manufacturing thin semiconductor films using the SILAR method, as shown in Figure 1, includes the following steps: (a) immersing a substrate in cation solutions, typically a glass substrate; (b) rinsing, typically with water; (c) immersing the substrate processed in the step (a) in anion solutions; and (d) rinsing, typically with water, although it will depend on the type of semiconductor material that is processed. This process must be repeated as many times as necessary until a thin film with the required thickness is obtained. Performing these four steps manually can be tedious for the people in charge of doing this activity in the laboratory. This is the main reason to automate the SILAR process.
Processes 2021, 9, x FOR PEER REVIEW 2 of 19 (Zn(1-x)CoxO) thin films for solar hydrogen production and Santos et al. [17] reported the development of an equipment to the deposition of thin films by the spin-coating process, which was electronically controlled. Lastly, Nagarethinam et al. [18] reported an automated low cost trigger enhanced spray technique to deposit cadmium sulfide (CdS) thin films; a low-cost microcontroller was used to accomplish this. In a previous study, Valdez-Martínez et al. [19] developed a control system that automated the SILAR process by means of a program made in JAVA. That could be executed in a personal computer system and it is used as an element for the acquisition of information and control, a development based on the open-source electronics platform Arduino, which incorporates a low-cost re-programmable microcontroller. This manuscript shows the design and technological development of a prototype which allows the automation of the SILAR chemical process for the deposition of semiconductor thin films. A microcontroller was used as an embedded system and it can be totally independent of a personal computer. The prototype also has an integrated human-machine interface (HMI) to configure the deposition parameters of the SILAR process. The HMI implementation gave the SILAR prototype more versatility and made its handling easier for the user. The novelty of this work is that the low-cost embedded system (Microchip ® PIC microcontroller) has been open-source programmed. This fact is important, as any interested user can carry out the development of their own prototype without using commercial software. The prototype developed in this work is able to perform the SILAR process for obtaining semiconductor materials in thin films in an automated way. Another advantage of the prototype is that an experiment can be done in triplicate (three samples at a time).

Deposition of Thin Films by SILAR Process
In the literature, it has been found that by means of the SILAR technique, several compounds can be obtained in thin films, such as copper oxide CuO [20], nickel oxide (NiO) [21], copper sulfide (CuS) [22], and zinc oxide (ZnO) [23]. The well-known SILAR process consists of four steps: adsorption, rinsing, reaction, and rinsing [24]. Manufacturing thin semiconductor films using the SILAR method, as shown in Figure 1, includes the following steps: (a) immersing a substrate in cation solutions, typically a glass substrate; (b) rinsing, typically with water; (c) immersing the substrate processed in the step (a) in anion solutions; and (d) rinsing, typically with water, although it will depend on the type of semiconductor material that is processed. This process must be repeated as many times as necessary until a thin film with the required thickness is obtained. Performing these four steps manually can be tedious for the people in charge of doing this activity in the laboratory. This is the main reason to automate the SILAR process.

Automation of the SILAR PROCESS
To automate the SILAR process, the four steps of the SILAR method were taken into account: adsorption, rinsing, reaction, and rinsing (also named stations). Then, the design of the control system was based on a microcontroller. This automated SILAR prototype has the purpose of immersing, removing, and moving the substrates as many times as necessary in each solution (cation solutions, rinsing, anion solutions, and rinsing) in order to obtain the required film thickness. Figure 2 shows the automation system block diagram.

Automation of the SILAR PROCESS
To automate the SILAR process, the four steps of the SILAR method were taken into account: adsorption, rinsing, reaction, and rinsing (also named stations). Then, the design of the control system was based on a microcontroller. This automated SILAR prototype has the purpose of immersing, removing, and moving the substrates as many times as necessary in each solution (cation solutions, rinsing, anion solutions, and rinsing) in order to obtain the required film thickness. Figure 2 shows the automation system block diagram. In this figure, it can be seen that through a human-machine interface (HMI), the parameters of interest can be programmed or modified, and the progress of the process can be monitored. The automated SILAR prototype consists of a main 24 V DC power supply (1) that supplies voltage to the internal elements, such as actuators, sensors, and other devices. It also consists of a secondary power supply (2) that reduces the main voltage to a smaller voltage, which energizes the microcontroller (3). The microcontroller receives information from an HMI touchscreen (4), as well as inductive sensors (5) and opto-couplers (6), which, depending on the information acquired by these elements, generates control signals that are amplified through a power driver (7). These signals are used by the stepper motor (8) to perform the immersion and displacement movement of the substrates in cation solutions, rinsing, anion solutions, and rinsing.
The central part of the control system is a microcontroller. Microcontrollers are electronic devices designed to ensure the autonomy of control systems applied to processes of any type [25]. For this development, the PIC18F4550 microcontroller from Microchip ® [26] was used, which belongs to a family of low-price, high-performance microcontrollers, with electronic modules (such as Timer, ADC, and PWM, among others) In this figure, it can be seen that through a human-machine interface (HMI), the parameters of interest can be programmed or modified, and the progress of the process can be monitored. The automated SILAR prototype consists of a main 24 V DC power supply (1) that supplies voltage to the internal elements, such as actuators, sensors, and other devices. It also consists of a secondary power supply (2) that reduces the main voltage to a smaller voltage, which energizes the microcontroller (3). The microcontroller receives information from an HMI touchscreen (4), as well as inductive sensors (5) and opto-couplers (6), which, depending on the information acquired by these elements, generates control signals that are amplified through a power driver (7). These signals are used by the stepper motor (8) to perform the immersion and displacement movement of the substrates in cation solutions, rinsing, anion solutions, and rinsing.
The central part of the control system is a microcontroller. Microcontrollers are electronic devices designed to ensure the autonomy of control systems applied to processes of any type [25]. For this development, the PIC18F4550 microcontroller from Microchip ® [26] was used, which belongs to a family of low-price, high-performance microcontrollers, with electronic modules (such as Timer, ADC, and PWM, among others) that allow system control [27,28]. This microcontroller has memory capable of supporting the control program; it also has a USART serial communication module, necessary for communication with the screen that will act as the HMI. For the programming of the automation SILAR prototype, the use of C language was proposed for both the screen and the microcontroller. Table 1 shows the microcontroller features. For the longitudinal (x-axis) and transverse (y-axis) displacement of the substrates, stepper motors were used. These motors are designed to rotate clockwise or counterclockwise a specified number of degrees or even a fraction of a degree with each electrical step or pulse they receive [29]. Stepper motors are used in many systems, especially when movement and position have to be precisely controlled on the X-Y axis; they are often used as a positioning device in machine tools, X-Y plotters, valves, and printers. For this development, the NEMA23-AMT112S model stepper motors were used; their features are shown in Table 2. This device requires a driver, which has a specific control power stage for its operation. This is because the control signals from the microcontroller do not contain enough electric current to rotate the bipolar stepper motor (bidirectional movement). The driver used was a HY-DIV268N-5A; its features are shown in Table 3. HMI (Human-Machine Interface) devices are peripherals that can be made up of a keyboard and a display. These devices are used to indicate to the operator the status of a certain process, in addition to allowing the user to enter commands; for example, orders to start or stop the process, as well as to change the parameters with which the process is executed. These devices have their own processor and memory in which the user interface application that will be used to interact with the process to be controlled is programmed [32]. The touchscreen that will be used as the HMI is the model NX8048P070-011R from NEXTION ® ; the electronic and physical features are shown in Table 4. Power supplies, inductive sensors, and opto-couplers were also used. The microcontroller power supply used was the XL4016 module from XLSEMI ® . It is a 180 kHz fixed frequency PWM buck (step-down) DC/DC converter, capable of producing 12 A with high efficiency [34]. It can regulate the output voltage to 5 V, which is needed for the microcontroller in order to avoid a possible overload.
Inductive proximity sensors were used to indicate the final longitudinal and transverse location of the substrate. In this case, SN04-N sensor from CHEEMI ® was used [35]. It is a device for realizing the non-electrical measurement by inductive winding or the change of coefficient of mutual induction. It has high resolution and accuracy for the monitoring and measurement of presence, movement, and position of metallic objects.
For the microcontroller protection, an isolation circuit based on the EN817 optocoupler from EverLight ® was used. EL817 is a semiconductor device that allows an electrical signal to be transmitted between two isolated circuits. This device consists of an infrared emitting diode, optically coupled to a photo-transistor detector [36].
For the automation of the SILAR process, a program was developed in the microcontroller programming environment. In this case, a programming model structure called state machine was used, which is a structure of sequential progression of a set of predetermined states; its progression is controlled by a crystal and/or other input signals [37]. State machines represent the behavior of a task during its execution cycle. State machines show the actions carried out by the mentioned tasks based on the state they are in and how transitions between states occur in response to certain events. In other words, state machines describe the actions that a task has to take in response to a specific event [38].

Design of the Physical Structure of the Automated SILAR Prototype
For this section, the components belonging to the mechanical system were designed, which carries out the longitudinal (x-axis) and transverse (y-axis) displacement of the substrates. This is in order to achieve the translation of glass substrates and their immersion in different chemical solutions to deposit a thin layer of a certain compound on their surfaces. The components considered were the stepper motors, the aluminum structural bench, coupling parts (screws, nuts, and washers), etc. The mechanical structure was designed in computer-aided design software; a 3D representation is shown in Figure 3. For the design of the structure, the computer-aided drawing software SOLIDWORKS ® was used. The integrated design-to-manufacture solution for this software offers a system that allows project developers to collaborate simultaneously. In addition, it allows efficient management of design, manufacturing, and technical documentation, as well as possible changes [39].  After completing the design of the mechanical elements, the design of a metal case was made, where the electronic components were stored and the HMI screen used was mounted. This was done to ensure the aesthetics of the metal case. For this, the sizing of the electronic elements, such as the drivers, PCB for signal conditioning, power supply, etc., was carried out. Figure 4 shows a metal case with the corresponding dimensions (in mm) and assembled electronic components. Electronic components are identified as follows: 1. Touchscreen used as the Human-Machine Interface (HMI).   Figure 5 shows the clamping mechanism for the substrate holder that was designed for the SILAR prototype. Three glass substrates were clamped between the acrylic plates ( Figure 5a), which were tightened with a screw (Figure 5b); the assembling of the substrate holder is shown in Figure 5c. After completing the design of the mechanical elements, the design of a metal case was made, where the electronic components were stored and the HMI screen used was mounted. This was done to ensure the aesthetics of the metal case. For this, the sizing of the electronic elements, such as the drivers, PCB for signal conditioning, power supply, etc., was carried out. Figure 4 shows a metal case with the corresponding dimensions (in mm) and assembled electronic components. Electronic components are identified as follows: 1.
Main 24 V DC power supply.  After completing the design of the mechanical elements, the design of a metal case was made, where the electronic components were stored and the HMI screen used was mounted. This was done to ensure the aesthetics of the metal case. For this, the sizing of the electronic elements, such as the drivers, PCB for signal conditioning, power supply, etc., was carried out. Figure 4 shows a metal case with the corresponding dimensions (in mm) and assembled electronic components. Electronic components are identified as follows: 1. Touchscreen used as the Human-Machine Interface (HMI).   Figure 5 shows the clamping mechanism for the substrate holder that was designed for the SILAR prototype. Three glass substrates were clamped between the acrylic plates ( Figure 5a), which were tightened with a screw (Figure 5b); the assembling of the substrate holder is shown in Figure 5c.  Figure 5 shows the clamping mechanism for the substrate holder that was designed for the SILAR prototype. Three glass substrates were clamped between the acrylic plates (Figure 5a), which were tightened with a screw (Figure 5b); the assembling of the substrate holder is shown in Figure 5c.

Software Design for the Automated SILAR Prototype
The programming proposed for the automation of the SILAR prototype was based on the flowchart shown in Figure 6. This diagram shows the flow of the process, starting with the initial configuration in the microcontroller when the system is powered up. Then, the user enters the parameters using the HMI. The SILAR process parameters are sent to the microcontroller. Subsequently, these parameters are forwarded to the HMI to be confirmed by the user. Once confirmed, the SILAR process sequence starts by sending control signals to the actuators, and thus, ending the process flow. In order to control all the interactions that the user has with the microcontroller through the interface, a program based on a state machine was created. The "P" state machine (see Figure 7) is in charge of doing most of the process so that the system works correctly. In the "P" state machine, variable "En" represents the state of the emergency stops button and the variable "PS" state changes to the different Q states. The value of the PS variable represents each state change according to the interactions that the user has

Software Design for the Automated SILAR Prototype
The programming proposed for the automation of the SILAR prototype was based on the flowchart shown in Figure 6. This diagram shows the flow of the process, starting with the initial configuration in the microcontroller when the system is powered up. Then, the user enters the parameters using the HMI. The SILAR process parameters are sent to the microcontroller. Subsequently, these parameters are forwarded to the HMI to be confirmed by the user. Once confirmed, the SILAR process sequence starts by sending control signals to the actuators, and thus, ending the process flow.

Software Design for the Automated SILAR Prototype
The programming proposed for the automation of the SILAR prototype was based on the flowchart shown in Figure 6. This diagram shows the flow of the process, starting with the initial configuration in the microcontroller when the system is powered up. Then, the user enters the parameters using the HMI. The SILAR process parameters are sent to the microcontroller. Subsequently, these parameters are forwarded to the HMI to be confirmed by the user. Once confirmed, the SILAR process sequence starts by sending control signals to the actuators, and thus, ending the process flow. In order to control all the interactions that the user has with the microcontroller through the interface, a program based on a state machine was created. The "P" state machine (see Figure 7) is in charge of doing most of the process so that the system works correctly. In the "P" state machine, variable "En" represents the state of the emergency stops button and the variable "PS" state changes to the different Q states. The value of the PS variable represents each state change according to the interactions that the user has In order to control all the interactions that the user has with the microcontroller through the interface, a program based on a state machine was created. The "P" state machine (see Figure 7) is in charge of doing most of the process so that the system works correctly. In the "P" state machine, variable "En" represents the state of the emergency stops button and the variable "PS" state changes to the different Q states. The value of the PS variable represents each state change according to the interactions that the user has with the system. The "P" state machine has nine states, and by default, the machine starts and ends in state Q 0 , which is an idle state where the machine awaits instructions from the HMI. Most of the states have to be invoked through state Q 0 , in which several states are able to calibrate, parameterize, and start the process. The events that will affect the change of states are determined by the user through the graphical interface. The descriptions of the states are shown in Table 5.
Processes 2021, 9, x FOR PEER REVIEW 8 of 19 with the system. The "P" state machine has nine states, and by default, the machine starts and ends in state Q0, which is an idle state where the machine awaits instructions from the HMI. Most of the states have to be invoked through state Q0, in which several states are able to calibrate, parameterize, and start the process. The events that will affect the change of states are determined by the user through the graphical interface. The descriptions of the states are shown in Table 5. Figure 7. Diagram of the "P" state machine.   In order to determine the movement of the actuators, during the process, another program based on a state machine called "M" was used, which has seven states, six of which are used during the process and calibration and one of which is exclusively used for calibration. Figure 8 shows the "M" state machine diagram. The "M" state machine changes to the Q states through the variables t (station time), Sta (station number), PMS (previous state machine variable), P (Pause button), and MS (state variable). The descriptions of the states are shown in Table 6.
It verifies the state of the emergency stop button; if it is active, it sends a notification to the interface and returns to state Q0. Otherwise, it moves the substrate holder to a station, up or down as indicated by the user from the interface. Once finished, it goes to state Q7.
In order to determine the movement of the actuators, during the process, another program based on a state machine called "M" was used, which has seven states, six of which are used during the process and calibration and one of which is exclusively used for calibration. Figure 8 shows the "M" state machine diagram. The "M" state machine changes to the Q states through the variables t (station time), Sta (station number), PMS (previous state machine variable), P (Pause button), and MS (state variable). The descriptions of the states are shown in Table 6.  It verifies that the motors are in their initial position, in order to go to state Q1. In case they are not in their initial position, the motors are brought to the initial position.
It verifies that the secondary motor (transverse displacement) is in its initial position. It checks if the pause button on the interface has been pressed to go to state Q5. If the pause button was not pressed, it checks the immersion time of the substrates in the current station (this time was previously assigned by the user from the interface It verifies that the secondary motor (transverse displacement) is in its initial position and the main motor (longitudinal displacement) Figure 8. Diagram of the "M" state machine. Table 6. Description of the "M" State machine.

State Description
Q 0 : Initial state.
It verifies that the motors are in their initial position, in order to go to state Q 1 . In case they are not in their initial position, the motors are brought to the initial position.
It verifies that the secondary motor (transverse displacement) is in its initial position. It checks if the pause button on the interface has been pressed to go to state Q 5 . If the pause button was not pressed, it checks the immersion time of the substrates in the current station (this time was previously assigned by the user from the interface). If the time is equal to Q 0 , it goes to state Q 3 ; if not, it introduces the substrates in the solution and waits for the specified time. When the time is up, it goes to state Q 2 .
It verifies that the secondary motor (transverse displacement) is in the immersion position and raises the substrates to the initial position. It also checks the pause button on the interface. If the pause button was pressed, it goes to state Q 5 ; if not, it goes to state Q 3 .
Q 3 : Status of station displacement.
It verifies that the secondary motor (transverse displacement) is in its initial position. It checks the current station number; if it is the fourth station, it goes to state Q 4 . If not, it moves the substrates to the next station and returns to state Q 1 .
Q 4 : End of cycle status.
It verifies that the secondary motor (transverse displacement) is in its initial position and the main motor (longitudinal displacement) is in the fourth station. It returns to the first station and updates the information in the process progress interface SILAR. Once finished, it goes to state Q 0 . It waits until the user presses the pause button again to be able to continue with the SILAR process. When the pause button is pressed again, it returns to the previous state from which the pause state was invoked.
It verifies that the secondary motor (transverse displacement) is in its initial position. It checks the current station number. If it is the first station, the M state machine ends. If not, it moves the substrates one station back and ends the M state machine. This state can only be invoked by the user from the interface. Figure 9 shows the electronic circuit block diagram of the automated SILAR prototype. The connection diagram was developed taking into account the programming carried out for the microcontroller. The electronic circuit consists of three fundamental parts:

2.
Sensor and button inputs.

3.
Serial communication to the HMI. It waits until the user presses the pause button again to be able to continue with the SILAR process. When the pause button is pressed again, it returns to the previous state from which the pause state was invoked.
It verifies that the secondary motor (transverse displacement) is in its initial position. It checks the current station number. If it is the first station, the M state machine ends. If not, it moves the substrates one station back and ends the M state machine. This state can only be invoked by the user from the interface. Figure 9 shows the electronic circuit block diagram of the automated SILAR prototype. The connection diagram was developed taking into account the programming carried out for the microcontroller. The electronic circuit consists of three fundamental parts:

Electronic System Design
1. Outputs assigned to actuators.

Sensor and button inputs.
3. Serial communication to the HMI.  Figure 10 shows the electronic circuit diagram. The control outputs that go to the power stage of the stepper motors used (M1 and M2 terminals) have four protection diodes 1N4001 (denoted by D1, D2, D3, and D4) so that none of the signals sent has a reverse current, and can avoid damage to the microcontroller internal pins. The only output that requires a protection stage is the indicator led (LED) protected by a 330 Ω resistor (RESLED). It is important to mention that each of the inputs (SENSOR terminal) are isolated from the actuators, using opto-couplers. Additionally, essential electronic parts were required for the correct operation of the PIC18F4550, such as a 20 MHz quartz crystal (denoted by CLK) connected to the corresponding terminals. This element allows the microcontroller to work under a time base. The quartz crystal requires two ceramic capacitors (C1 and C2) connected to GND as well as the RESET circuit, made up of a push button and a 10 kΩ resistance (RESMEM). The circuit operation principle is very simple: when receiving a 0 V signal, it resets all the functionalities of the microcontroller. Finally, there are the RX and TX connections (SCREEN terminal) that allow serial communication with the HMI screen. It should be noted that the terminals are very sensitive and require protection from the developer when loading any program to the microcontroller. Hence, it must be handled with care.  Figure 10 shows the electronic circuit diagram. The control outputs that go to the power stage of the stepper motors used (M1 and M2 terminals) have four protection diodes 1N4001 (denoted by D1, D2, D3, and D4) so that none of the signals sent has a reverse current, and can avoid damage to the microcontroller internal pins. The only output that requires a protection stage is the indicator led (LED) protected by a 330 Ω resistor (RESLED). It is important to mention that each of the inputs (SENSOR terminal) are isolated from the actuators, using opto-couplers. Additionally, essential electronic parts were required for the correct operation of the PIC18F4550, such as a 20 MHz quartz crystal (denoted by CLK) connected to the corresponding terminals. This element allows the microcontroller to work under a time base. The quartz crystal requires two ceramic capacitors (C1 and C2) connected to GND as well as the RESET circuit, made up of a push button and a 10 kΩ resistance (RESMEM). The circuit operation principle is very simple: when receiving a 0 V signal, it resets all the functionalities of the microcontroller. Finally, there are the RX and TX connections (SCREEN terminal) that allow serial communication with the HMI screen. It should be noted that the terminals are very sensitive and require protection from the developer when loading any program to the microcontroller. Hence, it must be handled with care. Once the electronic circuit diagram has been drawn up, the schematic drawing of the electronic circuit board was made (see Figure 11a) in order to manufacture it (see Figure  11b), and thus, correct possible connection errors between the device terminals. It improves the aesthetics and precision in design and implementation factors, and thus, guarantees the efficiency of the system.

Development of the Graphical Interface
On the home page (Figure 12a), there are three buttons: Information, Process, and Calibration. If the Information button is pressed, the user will be directed to a page where the user can find contact and system information. If the Process button is pressed, the user will go to the page to enter the process variables. In case the system is not at the point of origin, it will go to the Calibration page; this can also be accessed through the calibration button on the initial screen. Once the electronic circuit diagram has been drawn up, the schematic drawing of the electronic circuit board was made (see Figure 11a) in order to manufacture it (see Figure 11b), and thus, correct possible connection errors between the device terminals. It improves the aesthetics and precision in design and implementation factors, and thus, guarantees the efficiency of the system. Once the electronic circuit diagram has been drawn up, the schematic drawing of the electronic circuit board was made (see Figure 11a) in order to manufacture it (see Figure  11b), and thus, correct possible connection errors between the device terminals. It improves the aesthetics and precision in design and implementation factors, and thus, guarantees the efficiency of the system.

Development of the Graphical Interface
On the home page (Figure 12a), there are three buttons: Information, Process, and Calibration. If the Information button is pressed, the user will be directed to a page where the user can find contact and system information. If the Process button is pressed, the user will go to the page to enter the process variables. In case the system is not at the point of origin, it will go to the Calibration page; this can also be accessed through the calibration button on the initial screen.

Development of the Graphical Interface
On the home page (Figure 12a), there are three buttons: Information, Process, and Calibration. If the Information button is pressed, the user will be directed to a page where the user can find contact and system information. If the Process button is pressed, the user will go to the page to enter the process variables. In case the system is not at the point of origin, it will go to the Calibration page; this can also be accessed through the calibration button on the initial screen.
When the buttons are in green color, the user can access the variables page (Figure 12b). In this page, the user sets the number of cycles to be executed and the immersion times (in seconds) in each station. With the Enter button, the value found in the bar to enter values is assigned. To change the variable, it can be touched directly or it can be moved with the arrows. Once the user has finished entering the desired values, if the user presses the Accept button, the commands will be sent to the serial port of the microcontroller. The variables page is designed to enter the set of parameters for a single film deposition (immersion time in all four stations and the number of SILAR cycles). They were chosen by the user to experiment with a particular chemical compound. If another chemical compound is required for an experiment, the parameters need to be re-entered.
In the process page (Figure 12c), the user can see the cycles that will be executed with their respective times (in seconds). The user can also see the number of cycles that have been executed, accompanied by a progress bar (with their respective value in a percentage).
When the buttons are in green color, the user can access the variables page ( Figure  12b). In this page, the user sets the number of cycles to be executed and the immersion times (in seconds) in each station. With the Enter button, the value found in the bar to enter values is assigned. To change the variable, it can be touched directly or it can be moved with the arrows. Once the user has finished entering the desired values, if the user presses the Accept button, the commands will be sent to the serial port of the microcontroller. The variables page is designed to enter the set of parameters for a single film deposition (immersion time in all four stations and the number of SILAR cycles). They were chosen by the user to experiment with a particular chemical compound. If another chemical compound is required for an experiment, the parameters need to be re-entered.
In the process page (Figure 12c), the user can see the cycles that will be executed with their respective times (in seconds). The user can also see the number of cycles that have been executed, accompanied by a progress bar (with their respective value in a percentage). Through the graphical interface, it is possible to program the SILAR parameters, such as the number of SILAR cycles and the immersion times of the substrates in each station. It is not possible to modify the SILAR parameters in the middle of the cycle; it is necessary to allow the current cycle to end.

Electronic Circuit Final Implementation
Once the programming corresponded to the general scheme of the proposed automated SILAR prototype, tests were started with the components connected through a breadboard in order to facilitate the correction of electronic or programming faults. After the breadboard tests and the arrival of the assembled PCBs, a new series of tests was started, with the fully connected system (Visual-Electronic Interface-Physical Prototype) (see Figure 13). Through the graphical interface, it is possible to program the SILAR parameters, such as the number of SILAR cycles and the immersion times of the substrates in each station. It is not possible to modify the SILAR parameters in the middle of the cycle; it is necessary to allow the current cycle to end.

Electronic Circuit Final Implementation
Once the programming corresponded to the general scheme of the proposed automated SILAR prototype, tests were started with the components connected through a breadboard in order to facilitate the correction of electronic or programming faults. After the breadboard tests and the arrival of the assembled PCBs, a new series of tests was started, with the fully connected system (Visual-Electronic Interface-Physical Prototype) (see Figure 13).  Figure 14 shows the metal case made, in which the electronic components were stored and the HMI touchscreen was mounted.  Figure 14 shows the metal case made, in which the electronic components were stored and the HMI touchscreen was mounted. Figure 13. HMI connected to an electronic circuit board. Figure 14 shows the metal case made, in which the electronic components were stored and the HMI touchscreen was mounted. Figure 14. The metal case with the HMI touchscreen. Figure 15 shows the substrate holder as well as the glass substrates. The assembling consists of acrylic pieces that allow placing up to three glass substrates with a separation of 4 mm between them; to fasten them, a butterfly wind nut and an M6 screw need to be used.  Figure 15 shows the substrate holder as well as the glass substrates. The assembling consists of acrylic pieces that allow placing up to three glass substrates with a separation of 4 mm between them; to fasten them, a butterfly wind nut and an M6 screw need to be used. Figure 13. HMI connected to an electronic circuit board. Figure 14 shows the metal case made, in which the electronic components were stored and the HMI touchscreen was mounted. Figure 14. The metal case with the HMI touchscreen. Figure 15 shows the substrate holder as well as the glass substrates. The assembling consists of acrylic pieces that allow placing up to three glass substrates with a separation of 4 mm between them; to fasten them, a butterfly wind nut and an M6 screw need to be used. The first tests were carried out using vessels containing water to check the correct operation of the SILAR prototype. The variables were programmed and the SILAR process was carried out without problems. Figure 16 shows the finished SILAR prototype in operation. It shows the HMI and electronic module (a), four vessels (b), two heating and stirring plates (c), as well as the mechanical elements of the automated SILAR prototype (d). The substrate holder is located at station 3, immersing the glass substrates.

Final Implementation of the Automated SILAR Prototype
operation of the SILAR prototype. The variables were programmed and the SILAR process was carried out without problems. Figure 16 shows the finished SILAR prototype in operation. It shows the HMI and electronic module (a), four vessels (b), two heating and stirring plates (c), as well as the mechanical elements of the automated SILAR prototype (d). The substrate holder is located at station 3, immersing the glass substrates.

Functionality Tests
To test the automated SILAR prototype in a real operating condition, a copper oxide film (CuO) deposition was performed, following step-by-step the procedure reported by Akaltun et al. [20]. A solution of 0.1 M copper dichloride (CuCl2) was prepared by mixing copper dichloride (CuCl2) in 100 mL of distilled water, stirring vigorously. Then, the pH of the solution was adjusted to ~10 by adding aqueous ammonium hydroxide (NH4OH) (25-28%). With this, a complex of copper-ammonia is obtained ([Cu(NH3)4] 2+ ) [20]. Corning ® glass slides were used as substrates, which were subjected to a standard cleaning. The cleaning consisted of washing the substrates with acetone in ultrasound for 10 min. Then, they were washed with soap and water; after that, they were rinsed with distilled water and placed in ultrasound in ethyl alcohol for 10 min. Finally, they were dried with hot air and stored. Up to three glass substrates can be placed on the clamping mechanism at the same time. To obtain copper oxide (CuO) films by the SILAR process, experiments were programmed in the automated SILAR prototype with 5, 7, and 10 cycles. The immersion times were programmed (in seconds) as follows (see Figure 17): the glass substrates were immersed in the copper-ammonia ([Cu(NH3)4] 2+ ) solution for 30 s (in station 1); the substrates were then immersed immediately in hot water (90 °C) for 7 s (in station 2); the samples were dried with hot air for 60 s (in station 3); and the samples were rinsed in distilled water for 30 s (in station 4).

Functionality Tests
To test the automated SILAR prototype in a real operating condition, a copper oxide film (CuO) deposition was performed, following step-by-step the procedure reported by Akaltun et al. [20]. A solution of 0.1 M copper dichloride (CuCl 2 ) was prepared by mixing copper dichloride (CuCl 2 ) in 100 mL of distilled water, stirring vigorously. Then, the pH of the solution was adjusted to~10 by adding aqueous ammonium hydroxide (NH 4 OH) (25-28%). With this, a complex of copper-ammonia is obtained ([Cu(NH 3 ) 4 ] 2+ ) [20]. Corning ® glass slides were used as substrates, which were subjected to a standard cleaning. The cleaning consisted of washing the substrates with acetone in ultrasound for 10 min. Then, they were washed with soap and water; after that, they were rinsed with distilled water and placed in ultrasound in ethyl alcohol for 10 min. Finally, they were dried with hot air and stored. Up to three glass substrates can be placed on the clamping mechanism at the same time. To obtain copper oxide (CuO) films by the SILAR process, experiments were programmed in the automated SILAR prototype with 5, 7, and 10 cycles. The immersion times were programmed (in seconds) as follows (see Figure 17): the glass substrates were immersed in the copper-ammonia ([Cu(NH 3 ) 4 ] 2+ ) solution for 30 s (in station 1); the substrates were then immersed immediately in hot water (90 • C) for 7 s (in station 2); the samples were dried with hot air for 60 s (in station 3); and the samples were rinsed in distilled water for 30 s (in station 4).
Processes 2021, 9, x FOR PEER REVIEW 15 of 19 Figure 17. Experiment with the Automated SILAR prototype for the deposition of copper oxide thin films (CuO). Figure 18 shows the Grazing Incidence X-ray Diffraction (GIXRD) patterns of a copper oxide film (CuO) obtained with the automated SILAR prototype with 10 cycles. The diffraction pattern matches those of the standard pattern for copper oxide (CuO) (JCPDS file number 45-0937), which has a monoclinic structure.  Figure 18 shows the Grazing Incidence X-ray Diffraction (GIXRD) patterns of a copper oxide film (CuO) obtained with the automated SILAR prototype with 10 cycles. The diffraction pattern matches those of the standard pattern for copper oxide (CuO) (JCPDS file number 45-0937), which has a monoclinic structure. Figure 17. Experiment with the Automated SILAR prototype for the deposition of copper oxide thin films (CuO). Figure 18 shows the Grazing Incidence X-ray Diffraction (GIXRD) patterns of a copper oxide film (CuO) obtained with the automated SILAR prototype with 10 cycles. The diffraction pattern matches those of the standard pattern for copper oxide (CuO) (JCPDS file number 45-0937), which has a monoclinic structure. Figure 18. X-ray diffraction patterns of the copper oxide film (CuO) deposited by the automated SILAR prototype using 10 cycles.
Transmittance and reflectance spectra were recorded to investigate the optical properties of the copper oxide thin films (CuO), as shown in Figure 19a. Figure 19b shows the plot of (αhν) 2/3 versus (hν), where α is the absorption coefficient and hν is the photon energy. This plot was used to determine the energy band gap value of the copper oxide films (CuO). The energy band gap value of the film obtained with the automated SILAR prototype at 10 cycles (93 nm) was Eg = 1.28 eV, and it was determined by the extrapolation of the linear regression on the energy axis (hν) in the plot. This energy band gap value is close to that reported by Rakhshani  Transmittance and reflectance spectra were recorded to investigate the optical properties of the copper oxide thin films (CuO), as shown in Figure 19a. Figure 19b shows the plot of (αhν) 2/3 versus (hν), where α is the absorption coefficient and hν is the photon energy. This plot was used to determine the energy band gap value of the copper oxide films (CuO). The energy band gap value of the film obtained with the automated SILAR prototype at 10 cycles (93 nm) was Eg = 1.28 eV, and it was determined by the extrapolation of the linear regression on the energy axis (hν) in the plot. This energy band gap value is close to that reported by Rakhshani Figure 19. Transmittance and reflectance spectra (a) and the plot of (αhν) ⅔ vs. hν of the copper oxide film (CuO) deposited by the automated SILAR prototype at 10 cycles (b).
Morphological measurements of copper oxide films (CuO), deposited in 10 SILAR cycles, were performed by Scanning Electron Microscopy (SEM). It was observed that the morphology of the film is constituted by a non-uniform surface with filamentous particles (see Figure 20). Figure 19. Transmittance and reflectance spectra (a) and the plot of (αhν) 2/3 vs. hν of the copper oxide film (CuO) deposited by the automated SILAR prototype at 10 cycles (b).
Morphological measurements of copper oxide films (CuO), deposited in 10 SILAR cycles, were performed by Scanning Electron Microscopy (SEM). It was observed that the morphology of the film is constituted by a non-uniform surface with filamentous particles (see Figure 20). oxide film (CuO) deposited by the automated SILAR prototype at 10 cycles (b).
Morphological measurements of copper oxide films (CuO), deposited in 10 SILAR cycles, were performed by Scanning Electron Microscopy (SEM). It was observed that the morphology of the film is constituted by a non-uniform surface with filamentous particles (see Figure 20).

Conclusions
In this paper, the design and construction of a SILAR prototype for the deposit of semiconductor thin films has been presented. A PIC18F4550 microcontroller was used in the prototype. A program was designed that allows controlling the SILAR process through the implementation of a human-machine interface. Through the graphical interface, it was possible to program the SILAR parameters, such as the number of SILAR cycles and the immersion times of the substrates in each of the vessels. The software developed for the SILAR prototype showed good performance when executing the SILAR Figure 20. SEM image of the copper oxide film (CuO) deposited by the automated SILAR prototype using 10 cycles.

Conclusions
In this paper, the design and construction of a SILAR prototype for the deposit of semiconductor thin films has been presented. A PIC18F4550 microcontroller was used in the prototype. A program was designed that allows controlling the SILAR process through the implementation of a human-machine interface. Through the graphical interface, it was possible to program the SILAR parameters, such as the number of SILAR cycles and the immersion times of the substrates in each of the vessels. The software developed for the SILAR prototype showed good performance when executing the SILAR process. The implementation of the human-machine interface (HMI) added functionality to manipulate the process due to its simplicity; it facilitated interaction with the user and achieved good communication with the system. The constitution of the prototype gave greater stability to the mechanical structure and allowed a better execution of the SILAR process. The functionality tests showed that it was possible to obtain thin films of copper oxide (CuO) with the SILAR technique using the SILAR prototype. On the other hand, the X-ray diffraction results showed that diffraction patterns of the samples coincide with copper oxide (CuO) standard (JCPDS file number 45-0937), which has a monoclinic structure. Additionally, with respect to UV-VIS measurements, the energy band gap of the copper oxide film was calculated, Eg = 1.28 eV. These results showed that the technological development presented has great potential to obtain other semiconductor compounds in thin films.
Currently, the program in the SILAR prototype does not store the experiment input data. In future work, an attempt will be made to include memory storage to store the configuration data of the SILAR process. Moreover, the program can only be used in one language; so far, there is no multilingual option. In the future, a multilingual option can be implemented. Furthermore, the prototype does not currently measure temperature automatically. Work is under way on the development of a temperature monitoring system. Lastly, the prototype does not have its own heating system, which is why it is necessary to use the heating and stirring plates. To date, work is under way to develop a heating system and its automated control.