Development of Heavy Metal Potentiostat for Batik Industry

: The consumption of reactive dyes in the batik industry has led to a severe concern in monitoring the heavy metal level in wastewater. Due to the necessity of implementing a wastewater monitoring system in the batik factory, a Heavy Metal potentiostat (HMstat) was designed. The main goal of this study is to understand the optimal design concept of the potentiostat function in order to investigate the losses of accuracy in measurement using o ﬀ -the-shelf devices. Through lab-scale design, the HMstat comprises of an analog potentiostat read-out circuit component (PRCC) and a digital control signal component (CSC). The PRCC is based on easy to use components integrated with a NI-myRIO controller in a CSC. Here, the myRIO was equipped with built-in analog to digital converter (ADC) and digital to analog converter (DAC) components. In this paper, the accuracy test and detection of cadmium(II) (Cd 2 + ) and lead(II) (Pb 2 + ) were conducted using the HMstat. The results were compared with the Rodeostat (an open source potentiostat available on the online market). The accuracy of the HMStat was higher than 95% and within the precision rate of the components used. The HMstat was able to detect Cd 2 + and Pb 2 + at − 0.25 and − 0.3 V, respectively. Similar potential peaks were obtained using Rodeostat (Cd 2 + at − 0.25 V and Pb 2 + at − 0.3 V).


Introduction and background
Batik is a traditional handmade textile craft in the cottage industry [1]. This industry has contributed positively to economic growth, especially in Kelantan and Terengganu in Malaysia, and has also become one of the main attractions of foreign and local tourists [2]. Batik factories are known to generate a large amount of wastewater included wax, resin, sodium, silicate, and dyes. The presence of dyes is one of the main concerns in wastewater [3]. Among all types of dyes, reactive dyes are preferred due to their convenience, transparency, and brilliant color along with ease of textile fastening [4].
Five different types of reactive dyes were studied in [5], and the results reported that each reactive dye contains heavy metal elements of cadmium (Cd), lead (Pb), arsenic (As), zinc (Zn), chromium (Cr), cobalt (Co), and copper (Cu). Amongst all, Zn and Cr are essential elements, and small doses are required by living organisms to maintain various biochemical and physiological functions [6][7][8][9], while the others are non-essential elements which are highly toxic and harmful to human health and the environment, even at low concentrations [6,7].
According to the Environmental Quality Act (EQA 1974), the permissible limit for industrial effluent discharge based on standard A (applicable to discharge into any inland waters within catchment sample used [25]. Although there are several reports working on modified SPE and WE [16,[25][26][27][28], since heavy metals have defined redox potential, the selectivity toward specific heavy metal ions still can be achieved by bare electrodes and unmodified SPE [29]. Therefore, in the requirement of a heavy metal feature-based device for monitoring heavy metal levels in the batik industry, a Heavy Metal Potentiostat device (HMstat) incorporated with SPE was designed. The design of HMstat was based on the idea to simplify the potentiostat design by implementing a controller equipped with built-in DAC and ADC. With this, the development of electronic components in the potentiostat focused more on the main part, which is the potential control and current measurement part. Besides, the construction of the electronic component in HMstat implemented through-hole technology, which eliminates the hindrance for users who are less skilled in electronic areas in designing a potentiostat. Moreover, implementing through-hole technology enabled the design to be easily adjusted or replaced when necessary. This study will also demonstrate the capability of HMstat to implement performance tests and heavy metal measurements.

Design of HMstat
The HMstat consists of two main components, which comprise of the digital control signal component (CSC) and the electronic component, which is the analog potentiostat read-out circuit component (PRCC), as shown in Figure 1. The function of the CSC is for parameter control, signal generation, acquisition, and processing. The CSC is based on NI myRIO, which is equipped with built-in ADC and DAC provided with a bipolar input/output voltage channel up to ±10 V. These features allow the reduction in stages in PRCC from nine steps (from previous work [19]) to three steps (for this current work; refer to Figure 2). The stages in PRCC can be categorized into two parts, which are the potential control part (PCP) and the current measurement part (CMP). There are two stages in PCP; the first stage consists of a summing inverting amplifier (AO SUM ), and the second stage is a voltage follower (AO F ). The function of the PCP is to apply and control the interfacial potential at the WE through CE with the consideration of feedback potential from the RE through AO F (the function of AO F is to limit any current that might otherwise flow through RE [30]). Thus, the applied potential input to the electrochemical cell can be expressed using Equation (1): where V ap is the applied potential generated by CSC; R 1 and R 2 are resistor 1 and resistor 2, respectively. Since R 1 = R 2 = 10 kΩ, thus ideally, V in applied to the electrochemical cell will be equal to the V ap .
Here, the CMP is comprised of a transimpedance amplifier (OA TIA ) with the function to covert the small current changed from the electrochemical cell to a voltage signal. The correlation between the measured current change and the output voltage from OA TIA can be expressed using Equation (2): where I out is the measured output current, V out is the output voltage, and R gain is the gain resistor of OA TIA with a resistance value of 10 kΩ.

Signal Generation and Processing
The HMstat has been designed in such a way that it can perform two types of measurement. One is the measurement for performance tests, and the second is for heavy metal measurement. Three different types of signals were designed for the performance test, which were the constant potential, ramp potential, and square wave potential. For heavy metal measurement, a square wave anodic stripping voltammetry (SWASV) signal was designed. Basically, the SWASV signal is the incorporation of the constant, ramp, and square wave potential signal.

Signal Generation and Processing
The HMstat has been designed in such a way that it can perform two types of measurement. One is the measurement for performance tests, and the second is for heavy metal measurement. Three different types of signals were designed for the performance test, which were the constant potential, ramp potential, and square wave potential. For heavy metal measurement, a square wave anodic stripping voltammetry (SWASV) signal was designed. Basically, the SWASV signal is the incorporation of the constant, ramp, and square wave potential signal.
These signals were generated and configured in the CSC using graphical programming language. The development of the graphical programs is depicted in the flowchart, as illustrated in Figure 3. Based on the figure, once the program has been turned on, the user must choose to perform the performance test or heavy metal measurement test. If the performance test is chosen, the user must set the performance test parameters and then, press the "Start performance test" button. The generated V ap is applied to the PRCC by a mini system port (MSP) through analog output zero (AO0) and then, the performance test is implemented. At the same time, the data acquisition of V in(m) and V out(m) is to be done from the PRCC through MSP analog input zero (AI0) and one (AI1), respectively. Once the test is finished, the data are saved as xlsx file. In addition, the test can be aborted at any moment by pressing the "Stop test" button. Meanwhile, if heavy metal measurement is chosen, the user will undergo a similar sequence as done for the performance test.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 6 of 13 moment by pressing the "Stop test" button. Meanwhile, if heavy metal measurement is chosen, the user will undergo a similar sequence as done for the performance test. Figure 3. Flow chart of graphical program for signal generation (apply potential, ) and acquisition (measured input potential, ( ) and measured output potential, ( ) ).

Accuracy and Noise Measurement of HMstat
The HMstat performance test was conducted to evaluate: (1) the capability of the PCP to accurately apply the desired potential to WE, (2) the accuracy of the CMP to measure the operating Figure 3. Flow chart of graphical program for signal generation (apply potential, V in ) and acquisition (measured input potential, V in(m) and measured output potential, V out(m) ).

Accuracy and Noise Measurement of HMstat
The HMstat performance test was conducted to evaluate: (1) the capability of the PCP to accurately apply the desired potential to WE, (2) the accuracy of the CMP to measure the operating current I w , and (3) the noise current measurement of the CMP under operating current I w . To assess the performance of the HMstat, a dummy cell was designed and connected to the CE, WE, and RE of the HMstat. The dummy cell (refer to Figure 2c) is an electronic circuit used to replicate the primary electrochemical cell with a known operating current I w .
As mentioned earlier, three types of V ap (constant, ramp, and square wave potential) were used for the HMstat performance test. Under a different kind of V ap , the accuracy of the PCP and CMP was measured based on the percentage error (PE), as given in the following equations: where PE PCP and PE CMP are the percentage error of the PCP and CMP, respectively, calculated using Equations (5) and (6).
where V in(m) is the measured V in taken through AI0, I out is the measured output current taken through AI1, and I w is the current flow through R wr .
Here, the noise current measurement of the CMP was taken as the standard deviation of the data [22,30,31].
The performance of the HMstat was then compared to another available potentiostat in the online market, which is the Rodeostat (Rstat). The availability of the Rstat, which was tested under different types of V ap , was shown in Table 1.
× not tested due to the data unavailability.

Detection of Heavy Metal Using Square Wave Anodic Stripping Voltammetry Method
In this study, the capability of the HMstat to detect heavy metal elements was demonstrated. The working solution of 10 ppm of Pb and Cd was prepared by diluting a standard solution of Pb and Cd (1000 ppm) in 0.1 M acetate buffer. The screen-printed gold electrodes (SPGEs) were purchased from DropSens (Spain). Each strip contained three electrodes printed on the same planar platform. The three electrodes were a 4 mm diameter gold disk-shaped working electrode (WE), a gold counter electrode (CE), and a silver pseudo-reference electrode (RE). All detection was performed by placing 100 µL solution on the three-electrode strip. It is to be noted that all the potential applied throughout this work refers to silver pseudo-RE.
The experiment was conducted using a square wave anodic stripping voltammetry method (SWASV), in which the SWASV signal was generated by the CSC. There were two main steps in the SWASV method. First was the deposition step and second was the stripping step. The mechanism of the heavy metal ion during the deposition and stripping steps was illustrated in Figure 4. The deposition step is where the negative potential is applied to the WE. The purpose of the deposition step was to reduce the heavy metal ion in the working solution onto the electrode surface. The reduction will occur if the applied deposition potential is more negative than the reduction potential of heavy metal [32]. This step was followed by the stripping step. In the stripping step, the deposited heavy metal ion on the electrode surface is reoxidized and dissolved into the working solution [32]. The reoxidation tends to occur when the applied potential matches the oxidation potential of each heavy metal, so that the measured current indicates a different peak for each heavy metal species [16]. The details of the parameters used in the steps for heavy metal ion detection were listed in Table 2.

Deposition
Step Potential −0.9 V Time 120 s Stripping Step Initial potential −0.7 V Final potential 0.0 V Modulation amplitude 50 mV Step amplitude 50 mV frequency 10 Hz

Accuracy and Noise Measurement
Based on Equations (5) and (6), the percentage error (PE) of the PCP and CMP of the HMstat, and the CMP of Rstat was shown in Figure 5. The PE obtained by the HMstat for both PCP and CMP was less than 5% for every types of . Generally, the lowest error was observed when the was at the constant potential. The highest error was obtained for the ramp potential followed by SWV potential. The constant potential produced significantly lower error compared to the ramp and SWV. This was due to the fluctuated signal of the ramp and SWV, which may have led to higher noise generation. Moreover, these patterns were also observed in the PE of the CMP for Rstat. However, the PE obtained for the CMP of the Rstat was higher compared to HMstat for all types of .

Accuracy and Noise Measurement
Based on Equations (5) and (6), the percentage error (PE) of the PCP and CMP of the HMstat, and the CMP of Rstat was shown in Figure 5. The PE obtained by the HMstat for both PCP and CMP was less than 5% for every types of V ap . Generally, the lowest error was observed when the V ap was at the constant potential. The highest error was obtained for the ramp potential followed by SWV potential. The constant potential produced significantly lower error compared to the ramp and SWV. This was due to the fluctuated signal of the ramp and SWV, which may have led to higher noise generation. Moreover, these patterns were also observed in the PE of the CMP for Rstat. However, the PE obtained for the CMP of the Rstat was higher compared to HMstat for all types of V ap .
Appl. Sci. 2020, 10, x FOR PEER REVIEW 9 of 13  Table 3 shows the performance HMstat and Rstat, including the lists of PE, accuracy, and noise measurement. The accuracy was measured based on Equations (3) and (4) and the noise measurement was determined based on the standard deviation of the data. The measurement of the accuracy was related to PE, and the accuracy of HMstat was higher than 95% which is within the precision rate of the components used. Moreover, HMstat showed better accuracy compared to Rstat in a similar pattern as in PE. The degradation of accuracy might have been caused by a higher noise current, as changed from constant potential to ramp potential, and to SWV. The lowest noise current was obtained for constant (5 nA for both of −0.5V and +0.5V). The noise current increased to 6 nA when ramp was applied. The highest noise current of 7 nA has been obtained for SWV . This was due to the fluctuated signal of ramp, and SWV, which may have led to higher noise generation.  Figure 6a shows the stripping peak of 10 ppm Cd 2+ and 10 ppm Pb 2+ . Based on the figure, the Cd 2+ and Pb 2+ stripping peaks were observed at −0.30 and −0.25 V, respectively, and the peaks were located quite close to each other. This was due to the fact that detection was done using a gold-based electrode. With regard to this, there were several studies which reported that closer stripping peaks were observed for Cd 2+ and Pb 2+ under gold-based electrodes and the presence of both metals in the solution caused overlapping of the stripping peaks [33][34][35]. Moreover, the presence of Cd 2+ in Pb 2+  Table 3 shows the performance HMstat and Rstat, including the lists of PE, accuracy, and noise measurement. The accuracy was measured based on Equations (3) and (4) and the noise measurement was determined based on the standard deviation of the data. The measurement of the accuracy was related to PE, and the accuracy of HMstat was higher than 95% which is within the precision rate of the components used. Moreover, HMstat showed better accuracy compared to Rstat in a similar pattern as in PE. The degradation of accuracy might have been caused by a higher noise current, as V ap changed from constant potential to ramp potential, and to SWV. The lowest noise current was obtained for constant V ap (5 nA for both V ap of −0.5 V and +0.5 V). The noise current increased to 6 nA when ramp V ap was applied. The highest noise current of 7 nA has been obtained for SWV V ap . This was due to the fluctuated signal of ramp, and SWV, which may have led to higher noise generation.  Figure 6a shows the stripping peak of 10 ppm Cd 2+ and 10 ppm Pb 2+ . Based on the figure, the Cd 2+ and Pb 2+ stripping peaks were observed at −0.30 and −0.25 V, respectively, and the peaks were located quite close to each other. This was due to the fact that detection was done using a gold-based electrode. With regard to this, there were several studies which reported that closer stripping peaks were observed for Cd 2+ and Pb 2+ under gold-based electrodes and the presence of both metals in the solution caused overlapping of the stripping peaks [33][34][35]. Moreover, the presence of Cd 2+ in Pb 2+ measurements will affect the stripping intensity of Pb 2+ and vice versa [33]. Figure 6b shows the stripping peaks of Cd 2+ and Pb 2+ extracted from [34] were close to each other and simultaneous detection of Pb 2+ and Cd 2+ will cause overlapping of the stripping peaks. measurements will affect the stripping intensity of Pb 2+ and vice versa [33]. Figure 6b shows the stripping peaks of Cd 2+ and Pb 2+ extracted from [34] were close to each other and simultaneous detection of Pb 2+ and Cd 2+ will cause overlapping of the stripping peaks. Figure 6a also shows that the current intensity of the Cd 2+ stripping peak versus Pb 2+ was significantly smaller, in which the peak current of Cd 2+ was 74 µA and the peak current of Pb 2+ was 148 µA. This indicated that the HMstat has higher sensitivity to detect Pb 2+ compared to Cd 2+ . Similar results were also observed in [35] and as shown in Figure 6b [34], where the peak current of Pb 2+ obtained was more elevated than Cd 2+ .

Heavy Metal Detection Test
The same experimental procedures were repeated using Rstat. The detection results of HMstat were compared with Rstat. Referring to Figure 7, using Rstat, the stripping peak of Cd 2+ and Pb 2+ were located at −0.25 and −0.3 V, respectively. These results were the same when compared to HMstat. As expected, the peak current of the Pb 2+ using Rstat and HMstat was quite similar (136 and 148 µA for Rstat and HMstat, respectively). However, the peak current of Cd 2+ (297 µA) using Rstat showed significantly higher value when compared to the result obtained by the HMstat. It was also observed that using Rstat, the peak current of Cd 2+ was higher when compared to the Pb peak, which indicated that Rstat has a higher sensitivity to detect Cd 2+ when compared to Pb 2+ . This result is in contradiction with the result obtained in [35] and in Figure 6b    Figure 6a also shows that the current intensity of the Cd 2+ stripping peak versus Pb 2+ was significantly smaller, in which the peak current of Cd 2+ was 74 µA and the peak current of Pb 2+ was 148 µA. This indicated that the HMstat has higher sensitivity to detect Pb 2+ compared to Cd 2+ . Similar results were also observed in [35] and as shown in Figure 6b [34], where the peak current of Pb 2+ obtained was more elevated than Cd 2+ .
The same experimental procedures were repeated using Rstat. The detection results of HMstat were compared with Rstat. Referring to Figure 7, using Rstat, the stripping peak of Cd 2+ and Pb 2+ were located at −0.25 and −0.3 V, respectively. These results were the same when compared to HMstat. As expected, the peak current of the Pb 2+ using Rstat and HMstat was quite similar (136 and 148 µA for Rstat and HMstat, respectively). However, the peak current of Cd 2+ (297 µA) using Rstat showed significantly higher value when compared to the result obtained by the HMstat. It was also observed that using Rstat, the peak current of Cd 2+ was higher when compared to the Pb peak, which indicated that Rstat has a higher sensitivity to detect Cd 2+ when compared to Pb 2+ . This result is in contradiction with the result obtained in [35] and in Figure 6b [34].
Based on the above results, the stripping peak of simultaneous detection of Cd 2+ and Pb 2+ under gold-based electrode using both HMstat and Rstat interfered with each other's peaks. This can be overcome by electrode modification to improve anti-interference of the electrode by diminishing either one stripping peak [36], or by implementing a chemometrics method such as back-propagation artificial neural network (BP-ANN) using the formation of a prediction model for detection Cd 2+ and Pb 2+ [37].  Using the same experimental condition as in Figure 6.

Conclusions
The novel idea to design and optimize the performance of the potentiostat apparatus called HMstat is based on easy to use components integrated with a NI myRIO equipped with built-in ADC and DAC units; thus, making the overall design of the HMstat less complicated and easy to handle and operate. With respect to the methodological function of the proposed apparatus pertaining to its reliability, noise measurement, accuracy tests, and heavy metal detection tests were conducted. The noise measurement of the HMstat was lower than 7 nA, and the accuracy of the HMstat was higher than 95%, which indicated that the HMstat is within the precision rate of the component used. The detection result showed that the HMstat was capable of detecting Cd 2+ and Pb 2+ at a stripping peak of 0.25 and −0.3 V, respectively. Through investigation, the significant potential peak of Cd 2+ and Pb 2+ had agreement with slight overlapping under a gold-based electrode, as shown in the above result.
Furthermore, the simultaneous detection of Cd 2+ and Pb 2+ or detection of a single element of Cd 2+ in the presence of Pb 2+ or vice versa will be more challenging in the near future, as the locations of the stripping peaks of Cd 2+ and Pb 2+ were close to each other and tend to overlap and affect each other. It was also observed that the HMstat had higher sensitivity to detect Pb 2+ compared to Cd 2+ . This was based on the intensity current of the Pb 2+ stripping peak, which was significantly higher compared to Cd 2+ .