# A CNN-Based Method for Heavy-Metal Ion Detection
## 1 Introduction
They empirically extracted five discrete quantities from the electrochemical data and used PCA to analyze and identify these discrete quantities. However, the complex feature extraction method made the quantitative analysis process very cumbersome. [PERSON] et al. [13] used a multilayer perceptron model [14; 15] to detect bacterial concentrations in culture media or dairy products and obtained an accuracy of 94%. For the same hydrogel, they used the current-voltage data at five different scanning parameters as a database. This means that the actual measurement also requires five tests for the same hydrogel, which takes about 15 min to detect. Their work reduces the traditional 3 days of measurement time to 15 min, which is undoubtedly a huge improvement. However, these simple models did not fully satisfy the need for accuracy. A convolutional neural network is a deep feed-forward neural network with features such as local connectivity and weight sharing. As one of the most important networks in the field of deep learning, it has been widely used. In the field of computer vision, LeNet-5 was successfully applied to handwritten digit recognition [16], and AlexNet was successfully applied to face recognition [17]. AlexNet was used in medicine for human brain detection [18], alcoholism recognition [19], and diabetic retinal image classification [20]. In the field of taste recognition, convolutional neural networks (CNNs) based on electronic tongues and electronic noses have achieved great success [21]. [PERSON] et al. [22] achieved 99.99% accuracy in classifying tea products. In the field of gas detection, [PERSON] et al. [23] achieved three single-gas classifications with 98.67% accuracy using an improved LeNet-5, and [PERSON] et al. [24] obtained 96.87% accuracy using LeNet-5 for mixed-gas identification. [PERSON] et al. [25] proposed a deep learning model combining random forests, convolutional neural networks, and gated cyclic control units to predict atmospheric PM concentrations. Their model uses CNN for feature extraction and dimensionality reduction and achieves good results. In the field of electrochemical analysis, [PERSON] et al. [26] achieved the highest sensitivity and specificity with neural networks based on LSTM and FCN. Their research demonstrates that various deep learning schemes can be used well for the classification of CSWV data. These studies showed great promise for the application of convolutional neural networks in the field of electrochemical detection. However, while these studiesprovide an automated approach to data processing, they do not simultaneously predict the species and concentration of the analyte to be measured. Typically, convolutional neural networks have a large number of parameters, require large computational power, and are generally deployed on CPU/GPU platforms with powerful arithmetic. However, CPU/GPU platforms have large sizes, high energy consumption, and are not suitable for portable application scenarios. The Jetson Nano is Nvidia's embedded hardware platform designed for small AI edge computing devices. The Jetson Nano has a smaller size and lower power consumption and offers more computing power than typically embedded platforms [27]. A variety of deep learning-based network models have been successfully deployed on the Jetson Nano platform, and satisfactory performance has been achieved [28]. The approach of deploying convolutional neural networks on embedded development platforms can further automate measurements. Based on the problems above, the paper proposed a CNN-based method for the detection of heavy-metal ions (HMI). It can efficiently detect the ion species and concentration in heavy-metal solutions. Firstly, a portable potentiostat was designed for the convenient sampling of HMI data. Secondly, a CNN-based heavy-metal ion detection network was designed for processing the data, which we called HMID-NET.