Design and Implementation of an Electrical Characterization System for Membrane Capacitive Deionization Units for the Water Treatment

The desalination of seawater is one of the most established techniques in the world. In the middle of the 20th century this was achieved using water evaporation systems, later with reverse osmosis membranes and nowadays with the possibility of capacitive deionization membranes. Capacitive deionization and membrane capacitive deionization are an emerging technology that make it possible to obtain drinking water with an efficiency of 95%. This technology is in the development stage and consists of porous activated carbon electrodes, which have great potential for saving energy in the water desalination process and can be used for desalination using an innovative technology called capacitive deionization (CDI), or membrane capacitive deionization (MCDI) if an anion and cation membrane exchange is used. In this paper is proposed and designed a characterization system prototype for CDI and MCDI that can operate with constant current charging and discharging (galvanostatic method). Adequate precision has been achieved, as can be seen in the results obtained. These results were obtained from the performance of typical characterization tests with electrochemical double layer capacitors (EDLC), since they are electrochemical devices that behave similarly to MCDI, from the point of view of the electrical variables of the processes that take place in MCDI. A philosophy of using free software with open-source code has been followed, with software such as the Arduino and Processing programming editors (IDE), as well as the Arduino Nano board (ATmega328), the analogical-digital converter (ADC1115) and the digital-analogical converter (MCP4725). Moreover, a low-cost system has been developed. A robust and versatile system has been designed for water treatment, and a flexible system has been obtained for the specifications established, as it is shown in the results section.


Introduction
The desalination of seawater is one of the most established techniques in the world. In the middle of the 20th century, this was achieved using water evaporation systems and later with reverse osmosis membranes. However, the resulting high energy consumption, generally through fossil fuels, has been an important issue to solve [1][2][3][4].
Modern times have introduced the possibility to transition from the use of reverse osmosis to capacitive deionization (CDI), or membrane capacitive deionization when an anion and cation membrane exchange is used, which is a novel system still under development that, in addition to removing salt from the water, allows for the storage of energy, similar to other electrochemical devices (batteries, supercapacitors, etc.) [5][6][7][8].
Currently, some media outlets are claiming that the current hydrological year is the driest hydrological year of the decade. In the last 12 months, the Spanish water reserve has decreased by a volume of water equivalent to that of the Ebro Basin (7511 hm 3 of capacity). These phenomena are aggravated by the evident signs of climate change and, in countries such as Spain, by the advance of desertification processes in large areas, causing water to become so much of an essential resource that it has become as precious a commodity as oil [4].
Knowing that 97% of the planet's water is salty, the desalination of brackish or marine water (or seawater desalination) is one of the possible alternatives to mitigate the problem. However, current desalination technologies, such as reverse osmosis and distillation present a serious problem, which is the high energy consumption required to produce drinkable water, as well as the problem of boron removal.
Capacitive deionization (CDI) is an emerging technology that makes it possible to obtain drinking water with an efficiency of 95% [5][6][7][8][9][10]. This technology is in the development stage and consists of porous activated carbon electrodes, which have great potential for saving energy in the water desalination process and can be used for desalination using an innovative technology called capacitive deionization (CDI) and membrane capacitive deionization (MCDI). In CDI and MCDI, salt ions are removed from brackish water by applying a voltage difference between two porous electrodes in which the ions are temporarily immobilized, and dissolved salts are removed from different types of water [6][7][8][9].
The design and implementation of a characterization system for capacitive deionization units for water treatment was performed using types of water ranging from supply water to water from industrial processes. Capacitive deionization has emerged over the years as a robust, energy-efficient solution for water treatment [10][11][12][13][14][15][16][17][18]. It is an effective technology for the desalination of water with low to moderate salt content [5].
The optimal operating regime is obtained for water with a salt concentration of slightly less than 10 g/L [18]. Since the salt ions are minority compounds in the water, they can be removed from the mixture with this technology. In contrast, other methods extract the water phase from the salt solution. This technology also allows for the possibility of integrating renewable energy sources and energy storage [6][7][8][9][10].
The main objective of this study was the design and implementation of an electrical characterization system for capacitive deionization units in water treatment. The intention was also to make use of this system to obtain results that will make it possible to analyze the impact of this technique on different CDI and MCDI elements. The electrical characterization system of CDI and MCDI has been implemented before [11][12][13]. In more detail, the objectives to be achieved are the following: To study a control system with a microcontroller (ATmega328 MICROCHIP) that will allow interaction, control, conditioning of different tests and data collection with the medium.
For future implementations, to study the variation of the concentration as a result of the influence of injecting energy into the system, being influenced by the pH of the solution, temperature, conductivity, etc.
Analyze by numerical methods the variables involved in the system, Develop a system capable of testing different situations that verify the tests described in similar works of the field.
Establish a laboratory-scale electrochemical evaluation methodology for the electrical characterization of CDI and MCDI.
In addition to the tests, the results obtained will be used to determine improvements in active materials (activated carbon, carbon fibers, carbon aerogels, etc.) and the current collectors that make up the electrodes.
The set of results generated will serve as didactic material to illustrate the influence of the effects studied. This material will be useful for future students and teachers of degrees and masters programs of different universities thanks to the research and improvements on the CDI and MCDI units.

Materials and Methods
Compared to the classical working modes of the 20th century, there have been several innovations and new technologies, such as ion exchange in the membrane (see Figure 1) [14][15][16][17][18], and operational optimization in modes such as "stop-flow" during ion exchange [19], salt ratio upon voltage reversal [16], current constant during operation [19], energy recovered for desalination in relation to cycling [20,21], flow through electrostatic where water is directly faced through the electrostatic [22,23] and flow electrodes based on suspended carbon [24].

Materials and Methods
Compared to the classical working modes of the 20th century, there have been several innovations and new technologies, such as ion exchange in the membrane (see Figure  1) [14][15][16][17][18], and operational optimization in modes such as "stop-flow" during ion exchange [19], salt ratio upon voltage reversal [16], current constant during operation [19], energy recovered for desalination in relation to cycling [20,21], flow through electrostatic where water is directly faced through the electrostatic [22,23] and flow electrodes based on suspended carbon [24]. Regarding the historical evolution of CDI and MCDI, a stage was defined before 1995, when aerogel carbon was developed for CCD. The peons who worked with the desalination concept called it "electrochemical water demineralization" and its originators were Blair, Murphy and their colleagues, in the 1960s [25][26][27][28]. The basic standardized methods for supercapacitors have been used to study the behavior of CDI and MCDI [29][30][31][32][33]. These methods are constant current charging and discharging, constant power cycling, cyclic voltammetry and electrochemical impedance spectrometry. These procedures, and the self-charging and self-discharging phenomena, will be classified into three typologies: frequency, dynamic and energy characterization.

Frequency Characterization
The electrochemical impedance spectroscopy (EIS) method is used to characterize the electrochemical behavior of energy storage devices.
This method has gained popularity in the last decade, especially in the determination of the capacity in fuel cells and batteries, due to the development of the electric car [34,35].
The purpose of the EIS is to study the system response to the application of a small amplitude periodic alternating current (AC) signal. These measurements are carried out at different frequencies, which is why it is in the frequency characterization group. However, this technique is very sensitive, and it is essential to perform it as accurately as possible. Therefore, it is necessary to use several characterization techniques, because there is no single technique that gives all the expected results. Complementary techniques are therefore used. Regarding the historical evolution of CDI and MCDI, a stage was defined before 1995, when aerogel carbon was developed for CCD. The peons who worked with the desalination concept called it "electrochemical water demineralization" and its originators were Blair, Murphy and their colleagues, in the 1960s [25][26][27][28]. The basic standardized methods for supercapacitors have been used to study the behavior of CDI and MCDI [29][30][31][32][33]. These methods are constant current charging and discharging, constant power cycling, cyclic voltammetry and electrochemical impedance spectrometry. These procedures, and the self-charging and self-discharging phenomena, will be classified into three typologies: frequency, dynamic and energy characterization.

Frequency Characterization
The electrochemical impedance spectroscopy (EIS) method is used to characterize the electrochemical behavior of energy storage devices.
This method has gained popularity in the last decade, especially in the determination of the capacity in fuel cells and batteries, due to the development of the electric car [34,35].
The purpose of the EIS is to study the system response to the application of a small amplitude periodic alternating current (AC) signal. These measurements are carried out at different frequencies, which is why it is in the frequency characterization group. However, this technique is very sensitive, and it is essential to perform it as accurately as possible. Therefore, it is necessary to use several characterization techniques, because there is no single technique that gives all the expected results. Complementary techniques are therefore used.
On the other hand, there are limitations at high frequencies with CDI, due to the low impedance that the CDI cell can present. One of the factors conditioning the impedance of CDI is dissolution, while others are caused by coupling effects between the power supply Membranes 2021, 11, 773 4 of 50 and the media system cables [36]. These adversities are limited to low frequencies. In practice, twisted cables are used for the measurement cells to reduce these types of errors.

Dynamic Characterization
The constant current charge/discharge method is the simplest method to apply with direct current (DC). It analyzes the response of CDI when a constant charge/discharge current is applied to it. Despite being a basic method, it is widely used in the characterization of capacitors. Its application is documented with standardizations and will be the main object of the characterization of CDI in this work, being the main endorsement of the designed device [37][38][39][40]. The self-charging or self-discharging of CDI has its origin in two main causes. First, when CDI is charged or discharged, there is a diffusion of ions from the solution to the activated carbon electrode, or vice versa. The diffusion immediately after charging or discharging causes a self-discharge or self-charge, respectively. Secondly, these phenomena exist due to leakage current. Self-discharge by diffusion occurs predominantly in the initial stage. However, self-discharge by leakage is significant after self-discharge begins [41]. Self-discharge originates during dynamic operation, e.g., the dynamic operating cycle of electric vehicles [42], whose genome is through the equivalent impedance method, whose phase element is constant.
On the other hand, we highlight cyclic voltammetry (C.V.), which has achieved the distinction of a procedure used to evaluate the performance of energy storage systems, as well as to determine the life cycle, the effects of internal resistance and the dissipation losses [43]. The method consists of applying a linear voltage ramp and storing the current response in the capacitors. This current is directly associated with the capacity of the component achieving a versatile procedure [44][45][46][47][48][49].
Constant power cycling is known as "cycle life testing" (C.L.T.); it is a methodology for calculating the electrochemical device parameter based on periodic charging and discharging, separated by rest time intervals [50][51][52][53].
The procedure consists of charging the device at a given power until a voltage is achieved [54][55][56][57]. Once this point is reached, the polarity of the current is reversed by applying a given value, and the current is resumed by reversing the current, so that the charging cycle is continued up to a higher voltage [45,46]. This is a research study in the industrial field and several milestones have been previously established, which are as follows:

1.
A device capable of characterizing capacitive deionization (CDI) and membrane capacitive deionization (MCDI) for different tests, shown in Figure 2, in such a way that the main characteristics of capacitive deionization can be obtained, such as equivalent series resistance, capacitance, etc.

2.
A system capable of collecting the test parameters and configuring it through a graphical user interface (GUI).

3.
A procedure capable of characterizing the CDI and MCDI for stationary flows.

4.
The results obtained will be studied in future research lines for CDI and MCDI technology. Figure 2 shows the scheme of the characterization system prototype for capacitive deionization (CSP-CDI), and the interrelation of components. These components that make up this diagram define the fundamental structure of the system. It is briefly explained below:

1.
Control and data acquisition system (microcontroller ATmega328): this part of the system can store data and control the different parameters of the CSP-CDI. This part of the system can analyze the data in real time to actuate the power system. The microcontroller ATmega328 model (Atmel, Beijing, China) is implemented in the platform Arduino Nano (Arduino, Beijing, China). This microcontroller is responsible for directly controlling the galvanostatic charging process, so as to capture the data and send them to a PC for saving them (Appendix A shows the Arduino source code). 2.
Power system (OPA549): A power operational amplifier OPA549 (Texas Instruments). This operational amplifier can provide a nominal current of 8A and also has a special input (ilim) for limiting the output current of the amplifier. This is an important feature for implementing galvanostatic charge or discharge (by controlling the current). This operational amplifier is responsible for sourcing the system, in order to charge and discharge the CDI cell or other similar electrochemical devices (batteries, electrochemical double layer capacitors, etc.).

3.
ADS1015: An analogical-digital conversion stage based on the precision converter ADS1015 (Texas Instruments, Shanghai, China). This stage has two differential analog inputs for measuring: the charging or discharging current and the voltage of CDI cell. Current i(t) is measured from the voltage of a resistor Rm = 0.1 Ω, which is arranged between the output of the operational amplifier and CDI cell and the CDI cell voltage v(t) directly. The circuit ADS1015 has a 12-Bit resolution, which sets a resolution of 3 mV for the voltage measuring and 30 mA for the current measuring. 4.
MCP4725: Two digital-analogical conversion stages based on MCP4725 (MICROCHIP, Beijing, China) with a resolution of 12 Bit. These stages are used to control the charging/discharging processes of EDLC, for setting the voltage and current intensity references.

5.
A PC: that is responsible for controlling and configuring the microcontroller for conducting the tests and storage of data obtained from the measurements. This is achieved through a script made in JavaScript language under Processing IDE (Processing Foundation). For the different tests, data were sent to the PC from the microcontroller (ATmega328), where they were saved by means of the use of Processing tool. At the Appendix B is showed the Processing source code, and Figure 3 displays the control interface achieved with Processing, for being used at the PC. 6.
CDI cell: this is the object of study of this paper. Its correct operation is essential to characterize it. Its operating range has been designed to satisfy the needs required in the programmed tests, which have carried on with different EDLCs (electrochemical double layer capacitors) for commissioning and evaluation.
Membranes 2021, 11, x FOR PEER REVIEW 5 of 52 Figure 2. Scheme of the characterization system prototype for capacitive deionization (CSP-CDI). Figure 2 shows the scheme of the characterization system prototype for capacitive deionization (CSP-CDI), and the interrelation of components. These components that make up this diagram define the fundamental structure of the system. It is briefly explained below: (Processing Foundation). For the different tests, data were sent to the PC from the microcontroller (ATmega328), where they were saved by means of the use of Processing tool. At the Appendix B is showed the Processing source code, and Figure 3 displays the control interface achieved with Processing, for being used at the PC. 6. CDI cell: this is the object of study of this paper. Its correct operation is essential to characterize it. Its operating range has been designed to satisfy the needs required in the programmed tests, which have carried on with different EDLCs (electrochemical double layer capacitors) for commissioning and evaluation.

Results
The target prototype developed for characterization testing is capable of charging and discharging at constant voltage and current (galvanostatic mode). In addition, the power supply provides the load with a constant current at 95% efficiency and establishes the duration for which the nominal voltage is maintained. The device is capable of measuring current and voltage with a maximum error tolerance of ± 1%. Moreover, voltmeter measurements have a resolution of 0.125 mV for voltage measurement. The input impedance of these voltmeters must be sufficiently high for measurement errors to be negligible. To obtain the data, an analog-digital converter (ADC1115) was used, which has a series of filters at the input and output of the converter, resulting in precise, noise-free data.
The designed device must be able to perform constant voltage and current charging and discharging, as well as simultaneous voltage and current measurements at the terminals of the CDI cell.
The power supply (through the OPA549) must be able to provide the constant load current to the CDI cell with 95% efficiency and, in addition, set the duration of voltage maintenance.
The developed device must satisfy the requirement of an error tolerance of ± 0.01% for voltage measurement and an error tolerance of ± 0.1% for current measurement.

Proposed Test Results
This section provides the details of the tests carried out and the results obtained for the characterization of the CCD system. Figure 3. Processing PC control interface and data logger.

Results
The target prototype developed for characterization testing is capable of charging and discharging at constant voltage and current (galvanostatic mode). In addition, the power supply provides the load with a constant current at 95% efficiency and establishes the duration for which the nominal voltage is maintained. The device is capable of measuring current and voltage with a maximum error tolerance of ±1%. Moreover, voltmeter measurements have a resolution of 0.125 mV for voltage measurement. The input impedance of these voltmeters must be sufficiently high for measurement errors to be negligible. To obtain the data, an analog-digital converter (ADC1115) was used, which has a series of filters at the input and output of the converter, resulting in precise, noise-free data.
The designed device must be able to perform constant voltage and current charging and discharging, as well as simultaneous voltage and current measurements at the terminals of the CDI cell.
The power supply (through the OPA549) must be able to provide the constant load current to the CDI cell with 95% efficiency and, in addition, set the duration of voltage maintenance.
The developed device must satisfy the requirement of an error tolerance of ± 0.01% for voltage measurement and an error tolerance of ±0.1% for current measurement.

Proposed Test Results
This section provides the details of the tests carried out and the results obtained for the characterization of the CCD system.

Calibration of the Equipment
To provide veracity and reliability to the results obtained during the tests, the CSP-CDI was first subjected to a series of calibration tests. The procedure that followed consisted in the fact that, knowing an input setpoint, the system returned a series of expected results since the output data were known, since a 1 Ω resistor was used instead of a CDI cell.

Calibration of the Digital-to-Analog Converter DAC (MCP4725)
The first test of the CSP-CDI was the calibration of the equipment by setting an input setpoint current to measure the voltage at the terminals of the 1 Ω resistor (see the results in Table 1). With this experience, the calibration line of the equipment is determined, obtaining the expression of the digital-analogical converter's transformation of accounts. As can be seen in the previous Figure 4, the slope of the straight line corresponds to the resistance of 1 Ω, and it can also be seen that the data dispersion is null, so the sample taken refers to the population and indicates that the CSP-CDI is characterized with the Equation (1): y = 1.0588 X + 3.9833 (1) where: X is the rated setpoint current in mA (milli-Amperes). Y is the current at the load mA (milli-Amperes).
Finally, knowing the current, the voltage is trivial because the resistance is 1 Ω.  This experiment is based on connecting a 1 Ω (Ohms) resistor to the load and establishing an input setpoint current to measure the voltage in the measuring cell. With this, we know the current and current of the CSP-CDI (see . With this experience, the calibration line of the equipment is determined, obtaining the expression of the transformation of accounts of the analogical-digital converter (table 2)  this, we know the current and current of the CSP-CDI (see . With this experience, the calibration line of the equipment is determined, obtaining the expression of the transformation of accounts of the analogical-digital converter ( Table 2).     As can be seen in the previous figures, the data dispersion is null, so the sample taken refers to the population and indicates that the CSP-CDI is characterized, with Equation (2) being "I" of the measured ADC counts, while Equation (3) is the sensor current, Equation (4) is "V" of the measured ADC counts, and Equation (5)  As can be seen in the previous figures, the data dispersion is null, so the sample taken refers to the population and indicates that the CSP-CDI is characterized, with Equation (2) being "I" of the measured ADC counts, while Equation (3) is the sensor current, Equation (4) is "V" of the measured ADC counts, and Equation (5) is the sensor voltage, as follows: y = 141704 X + 20340 (2) where: X is the rated set point current in A (Amps). Y are the counts corresponding to the current of the ADS1115. y = 17.691 X + 2.5387 (3) where: X is the rated setpoint current in A (Amperes).
Y is the measured current in V (Volts) at the sensor.
where: X is the rated setpoint current in A (Amperes). Y are the counts corresponding to the voltage of the ADS1115. y = −1.1824 X + 0.6963 (5) where: X is the rated setpoint current in A (Amperes). Y is the measured voltage in V (Volts) at the sensor.

Charging and Self-Discharge Tests at an Input Set Point
This section specifies the tests to which the equipment is subjected for its validation, where the degree of response from the equipment to an input setpoint will be determined, characterizing its behavior through the supercapacitors and the standardized tests.
Three samples were taken in each test to avoid uncertainty and mean error. Furthermore, the data obtained in the tests are representative of the CSP-CDI.
The first characterization test performed was the charging and self-discharging of a 1 F capacity supercapacitor with a setpoint voltage of 2 V and a setpoint current of 0.1 A. The data generated were stored in a database. The data generated have been saved in a plain text file with ".txt" extension for further processing.
A script was created with Matlab software for data management on the screen. In this way, a detailed analysis of each test carried out is carried out. The result of this first test can be seen in Figure 9. Figures 10-13 show that the test was carried out satisfactorily. Although, there is a small variation of 0.01 A in the current. This was due to an equipment calibration problem, hence the importance of having the CSP-CDI properly calibrated.
The data generated were stored in a database. The data generated have been saved in a plain text file with ".txt" extension for further processing.
A script was created with Matlab software for data management on the screen. In this way, a detailed analysis of each test carried out is carried out. The result of this first test can be seen in Figure 9.

Figure 9
Charging and self-discharge test at Vc_max = 2 V and Ic = 0.1 A.  show that the test was carried out satisfactorily. Although, there is a small variation of 0.01 A in the current. This was due to an equipment calibration problem, hence the importance of having the CSP-CDI properly calibrated. The following tests were at the same maximum set point voltage, but at the set point current of 0.05 A and 0.025 A, respectively. The following Figures 12 and 13 show the results of the tests per screen.  The following tests were at the same maximum set point voltage, but at the set p current of 0.05 A and 0.025 A, respectively. The following Figures 12 and 13 show results of the tests per screen. Figure 11. Load and self-discharge test at Vc_max = 2 V and Ic = 0.05 A. Figure 11. Load and self-discharge test at Vc_max = 2 V and Ic = 0.05 A.  On the other hand, the system was validated with another supercapacitor, with a capacity of 650 F at another maximum voltage and setpoint current. The test results can be seen in the following figure. The following tests were at the same maximum set point voltage, but at the set point current of 0.05 A and 0.025 A, respectively. The following Figures 12 and 13 show the results of the tests per screen.
On the other hand, the system was validated with another supercapacitor, with a capacity of 650 F at another maximum voltage and setpoint current. The test results can be seen in the following figure.
Firstly, as can be seen in Figure 14, the test was carried out at the set voltage of 0.4 V and set current of 0.1 A. This test lasted 1 h. It should be noted that the results are as expected for a supercapacitor with these characteristics, the reason being that the setpoint current is very small and the capacity of the supercapacitor is too large.
On the other hand, quality results have been obtained without the adverse effects of noise. This was possible because the design of the CSP-CDI foresaw the need to have a noise-free reading of the data when characterizing. For this reason, the use of the analogicalto-digital converter (ADS1115) is fundamental to the system. This converter has a series of input and output filters that result in accurate and noise-free data.
Finally, the self-discharge of CDI for 1 F, 100 F and 150 F supercapacitors has been analyzed and characterized (Figures 11-14). The results shown are satisfactory and, with this, the characterization system is again validated.
As can be seen in Figures 15 and 16, there are anomalies at the beginning of the charge and self-discharge. It has been deduced from the results obtained that an equivalent series resistance coexists due to the poor connection of the supercapacitor with the system terminals, resulting in a series resistance of 56 Ω. This can be seen in more detail in Figure 17. noise. This was possible because the design of the CSP-CDI foresaw the need to have a noise-free reading of the data when characterizing. For this reason, the use of the analogical-to-digital converter (ADS1115) is fundamental to the system. This converter has a series of input and output filters that result in accurate and noise-free data.
Finally, the self-discharge of CDI for 1 F, 100 F and 150 F supercapacitors has been analyzed and characterized (Figures 11-14). The results shown are satisfactory and, with this, the characterization system is again validated. Figure 14. Self-discharge test to characterize a 1 F capacitor.
As can be seen in Figures 15 and 16, there are anomalies at the beginning of the charge and self-discharge. It has been deduced from the results obtained that an equivalent series resistance coexists due to the poor connection of the supercapacitor with the system terminals, resulting in a series resistance of 56 Ω. This can be seen in more detail in Figure  17.
Voltage Intensity Figure 14. Self-discharge test to characterize a 1 F capacitor.   In this section, the system will be validated based on the standardized tests for supercapacitors. For the first charge and discharge characterization test of the CSP-CDI, the initial data have been programmed via the interface created with processing. The follow- Figure 17. Graphs with details of the charge and self-discharge test, characterizing it on a 150 F capacitor.

CDI Charging and Discharging Test
In this section, the system will be validated based on the standardized tests for supercapacitors. For the first charge and discharge characterization test of the CSP-CDI, the initial data have been programmed via the interface created with processing. The following table (Table 3) shows the data given to the interface. Once the data have been entered on the screen, the test is started. Once the test has been completed and the data obtained have been managed, the result is shown on the screen ( Figure 18). Firstly, the test is satisfactory. Figure 19 shows each of the times that make up the experiment, which are: time one, time two, time three, time four and time five. Firstly, the test is satisfactory. Figure 19 shows each of the times that make up the experiment, which are: time one, time two, time three, time four and time five. Firstly, the test is satisfactory. Figure 19 shows each of the times that make up the experiment, which are: time one, time two, time three, time four and time five.  Secondly, the test responds to the initially programmed times and the input setpoints (Vcmax and Icons).
Finally, the cleanliness of the data obtained should be highlighted, as the noise phenomenon in the result is negligible. This has been possible with the analogical-digital converter (ADS1115), which inhibits the noise generated by the instrumentation elements of the system.
On the other hand, another test has been carried out with different initial conditions to those described above, to validate the CSP-CDI system. The data entered by the interface are shown in Table 4. The results per screen can be seen in Figure 20.
In Figure 20, it can be seen in time interval five that the capacitor self-charges once this period starts. The cause is the inertia of the capacitor in maintaining an equilibrium state, even though the attack current in the CSP-CDI system is 0A.
Finally, a new charge/discharge test is carried out with a supercapacitor of capacity 1 F (Farad), with different initial conditions to those previously described. The data initially programmed by the interface are shown in the following Table 5. The results per screen can be seen in Figure 20. In Figure 20, it can be seen in time interval five that the capacitor self-charges once this period starts. The cause is the inertia of the capacitor in maintaining an equilibrium state, even though the attack current in the CSP-CDI system is 0A.
Finally, a new charge/discharge test is carried out with a supercapacitor of capacity 1 F (Farad), with different initial conditions to those previously described. The data initially programmed by the interface are shown in the following Table 5.   The following Figures 21 and 22 show the results of the test per screen.

Figure 21
Charging and discharging test characterizing a 1 F supercapacitor.
Voltage Intensity Figure 21. Charging and discharging test characterizing a 1 F supercapacitor.

Conclusions
The conclusions obtained in the development of this study are as follows: 1. A prototype has been designed that can operate with constant current charging and discharging. 2. Adequate precision has been achieved, as can be seen in the results obtained. 3. A philosophy of using free software with open-source code has been followed, such as the microcontroller ATmega328 (Arduino platform) and Processing programming editors, as well as the analogical-digital converter (ADS1015) and the digital-analogical converter (MCP4725). 4. A low-cost system has been developed. 5. A robust and versatile system has been designed for water treatment. 6. A flexible system has been obtained for the specifications established.

Conflicts of Interest:
The authors declare no conflict of interest.

Conclusions
The conclusions obtained in the development of this study are as follows:

1.
A prototype has been designed that can operate with constant current charging and discharging.

2.
Adequate precision has been achieved, as can be seen in the results obtained.

3.
A philosophy of using free software with open-source code has been followed, such as the microcontroller ATmega328 (Arduino platform) and Processing programming editors, as well as the analogical-digital converter (ADS1015) and the digital-analogical converter (MCP4725).

4.
A low-cost system has been developed.

5.
A robust and versatile system has been designed for water treatment. 6.
A flexible system has been obtained for the specifications established.

Conflicts of Interest:
The authors declare no conflict of interest.