Research Article | Open Access
Embedded Based Miniaturized Universal Electrochemical Sensing Platform
We created an embedded sensing platform based on STM32 embedded system, with integrated carbon-electrode ionic sensor by using a self-made plug. Given ration of concentration-unknown nitrate liquid samples, this platform is able to measure the nitrate concentration in neutral environment. Response signals which were transmitted by the sensor can be displayed via a serial port to the computer screen or via Bluetooth to the smartphone. Processed by a fitting function, signals are transformed into related concentration. Through repeating the experiment many times, the accuracy and repeatability turned out to be excellent. The results can be automatically stored on smartphone via Bluetooth. We created this embedded sensing platform for field water quality measurement. This platform also can be applied for other micro sensors’ signal acquisition and data processing.
Nitrates are important constituents of living organisms such as proteins, amino acids, and nucleic acids (DNA). Although excessive nitrate contents have seriously affected human health and the environment , this does not mean that too much nitrate is poisonous. The reduction of nitrates, a reaction which anaerobic bacteria (such as some photosynthetic bacteria) perform in an aquarium, releases nitrites and ammonia, which are poisonous . If the nitrate content is excessive, the reduction reaction can be catalyzed to react rapidly, thereby poisoning the aquatic life. An abundance of nitrates can also cause methemoglobinemia, which seriously affects the human body. Besides, the standard nitrate concentration of potable water in China is less than 10 mg/L. Therefore, creating a platform to detect the nitrate concentration in water effectively and accurately has become necessary and meaningful.
People, such as farmers, urban residents, and environmentalists, want to know how seriously polluted the water they drink is. However, it is difficult for average citizens to detect invisible concentrations of nitrates in water because specialized, expensive equipment is required for the detection . To enable the average citizen to determine nitrate concentrations in water, a low-cost, easy-to-operate, man-carried platform for nitrate detection was created. The data collected from the nitrate sensor in the platform can be processed not only by a computer, but also by an Android-based smartphone, allowing a person to easily read the results from either the computer or the phone. A person, using a smartphone to read the results, can locate the information about contaminants on a map and share that information on a network, such as the Weibo website, where others can readily see whether the water quality in that place is good or not.
Many methods, such as spectroscopy, capillary electrophoresis, and electrochemistry, have been proposed to detect nitrate concentration . The spectroscopic method is widely used to detect nitrates [4, 5]. However, this method can be used only to determine nitrate concentrations between 0.28 ppb and 28 ppb . Because the spectroscopic method is unreliable for concentrations above 28 ppb , an alternate method must be used. Electrophoresis, however, is too complicated for a typical citizen to operate .
The electrochemistry method is relatively easy to operate, compared with other methods [3, 7, 8]. Because the electrochemistry method is dependable, portable, and low-cost to operate, it is an ideal method for detecting nitrate concentrations . In the electrochemistry system, an oxidation or reduction reaction occurs when the voltage sweeps between working and reference electrodes . Cyclic voltammetry is universally applied in electrochemistry systems . In electrochemistry systems, every detection process requires only 8 mL of liquid sample because of the microscale electrodes design and small capacity of the test bottle, which makes the system portable.
An emerging technology named underwater sensor networks has comprehensive applications in oceanographic data collection, pollution monitoring, offshore exploration, and so on . But it is not portable to carry, so we propose an embedded sensing platform based on the STM32 embedded system, which has an integrated carbon-electrode ionic sensor, a controlling circuit, and a computer (or a smartphone) that can receive and deal with the data transferred from the liquid sample. The integrated carbon-electrode ionic sensor is designed to be miniaturized with small electrodes so that the sensor has low ohmic drop, rapid mass transport, and low capacitive current [11, 12]. We use the carbon as working electrode because it applies to testing different concentrations of nitrate in neutral environment. Testing in a neutral environment can make it easier for people to use than testing in an acidic or alkaline environment. Users can easily operate the platform by looking at the Liquid Crystal Display (LCD) that shows the functions of the platform and depressing the buttons on the box to choose the desired option.
Because the system’s entire package is lightweight and compact, it can be carried and operated outdoors. The embedded sensing platform is different from some smartphone based sensing platforms . Our platform achieves programmable adjustment of the voltage excitation signal by using the STM32 embedded system. Thus, the sweeping voltage for the electrochemical system is more accurate and stable than that for other smartphone based sensing platforms . The Digital-to-Analog Converter (DAC) module in the circuit board and the Analog-to-Digital Converter (ADC) module enable the system to send and retrieve signals. The use of a serial port to send data to a PC makes our system easy to handle and able to deal with the results. Also, the use of Bluetooth makes it possible for users to easily operate the system outdoors and read the results directly from their smartphones. After the data is retrieved from the electrochemistry sensor, a curve, electrochemical impedance spectroscopy (EIS), is drawn to provide important information for further study, such as searching the characteristic values and calculating fitting functions. As cloud computing is becoming increasingly popular, we adopt cloud storage to store the measurement results in a confidential, integral, and available way . To protect data privacy, we use secure searchable encryption schemes to meet different privacy requirements . A content-based search scheme makes semantic search more effective and context-aware . All in all, our embedded sensing platform detects and measures the concentration of nitrates. And it can store results in the memory embedded in the circuit. Users are allowed to share the testing results to social networks. If the sensor is equipped with the appropriate electrodes, our platform universally detects other ions or contaminants, such as metal ions or bacteria .
2.1. Design of the Embedded Sensing Platform
The design sketch of the embedded sensing platform is shown in Figures 1(a) and 1(b). As shown in Figure 1(a), the complete package of this platform includes a white box that wraps the whole controlling circuits as Figure 1(b) displays, a computer that connects to the serial port, or a smartphone and the sensor. In order to make it convenient for users to use this platform outdoors, we added Bluetooth to the circuit. Figure 2 shows the detailed executing procedure of the embedded sensing platform. The steps during the detection are as follows. () The DAC module in the circuit board generates a sweeping voltage to () drive the nitrate electrochemical sensor. () The ADC module embedded in the circuit retrieves the output voltage from the sensor and () the data is stored in the memory. (5) The serial port reads the data from the memory and (6) sends to a PC once it receives the command sent from the box. (7) The results will be calculated via computer software and will be stored for further study. Alternatively, Bluetooth also can (8) receive the data from the memory and (9) send the data to a smartphone. (10) The information of the detection can be sent to a social network, such as Weibo.
The embedded sensing platform provides an option, Run option, to drive the system. Retrieved from the electrochemical sensor, the data is output after the user depresses Output option. Then the data is sent to a computer via the serial port. The data can be processed in the computer. Alternatively, an application in a smartphone is supposed to retrieve the data from the sensor with the help of Bluetooth. We concluded a fitting function by extracting characteristic values on the EIS curves, which are drawn from nitrate measurements. Finally, after the detection of the nitrate solutions, the results can be shown or stored in a computer or in a smartphone.
2.2. Electrochemical Sensor (RRPE1001C) Fabrication
The layout and schematic of the electrochemical sensor are shown in Figures 3(a) and 3(b). The miniaturized circuit is distributed on plastic substrate. The carbon electrodes are designed in a square in round corners fashion. Electrodes on the surface are counter, working, and reference electrodes, respectively. The working electrode is made of carbon, because it applies to testing different concentrations of nitrate in neutral environment, which is proved to be reliable. In electrochemical system, carbon electrode has high stability and good electrical conductivity. And also, testing in neutral environment can make it easier for people to use than testing in acidic or alkaline environment. With the oxidation of OH− at high current density , oxygen bubbles are likely to attach on the sensor’s surface. So the area of counter electrode is fabricated to be the largest to reduce the impact. Figure 3(c) shows a self-made plug suitable for the sensor. Working electrode is made of carbon, which makes it possible to test the nitrate concentration in a neutral environment, so we use DI water as electrolyte. The pH value of every testing nitrate solution is 7 before the experiment. After testing, the pH value remains 7.
2.3. Cyclic Voltammetry Method
Cyclic voltammetry method is an electrochemistry method. By changing the voltage on the electrodes over time, it is able to obtain the reduction/oxidation reaction in the electrochemical system [17, 18]. In this embedded sensing platform, the voltage sweeping range is −1.5 V to +1.5 V, and the output voltage is in the form of triangular wave. Sodium nitrate with different densities is mixed with purified water (H2O) that is used as electrolyte for testing. We use carbon as working electrode because it applies to testing different concentrations of nitrate in neutral environment. So we use DI water as electrolyte.
Every period of the sweeping voltage is 30 seconds. The voltage starts from 0 V. It increases to 1.5 V in 7.5 seconds with a sweeping rate of 200 mV/s. After that, the voltage decreases to −1.5 V in 15 seconds with the same rate. In the last 7.5 seconds in a whole period, the voltage increases with the rate of 200 mV/s to 0 V finally. The first cycle of the sweeping voltage is regarded as the activation process that is supposed to eliminate the impact of the oxidation at the surface of the working electrode . The whole testing includes four cycles and the data received from the second, the third, and the forth cycles are used for further study as the first cycle is for activation process. The curves were more accurate if we adopt the average of the 2nd, 3rd, and 4th cycles. We did many experiments to make sure the migration effect did not happen between the working and reference electrode. Through the testing results, we compared these results collected from all the experiments. We found that the data collected from the second period of the testing, the third period of the testing, and the fourth period of the testing are approximate. We also found that the curves drawn from the data collected from different days are approximate. So we make sure that the migration effect did not affect our results.
2.4. Embedded Programming Implement
The embedded system was programmed by the software Keil uVision 4, which provides library functions for users so as to simplify the programming. The API (Application Programming Interface) is the core of this system, which can be called by users’ commands. There are four options being displayed on the LCD. There are Set, Run, Stop, and Output shown on the LCD, respectively. Set option makes it possible for users to change the voltage and period of triangular waveforms. Run option enables the electrochemical sensor work by the drive of sweeping voltage; it also roughly removes some noise that may exist in the data by calculating the average of the 2nd, 3rd, and 4th periods. Stop option can be used to terminate sending the voltage from the platform to the sensor during the operation. As for Output option, it is mainly used for sending the retrieved data to the computer through serial port or to the smartphone via Bluetooth. As shown in Figure 4, the whole system works according to this process.
We program the embedded system in virtue of the software Keil uVision 4. We use the functions which are provided by the library in the software, such as GPIO functions (used to initialize the pins in the circuit board), TIM functions (used to initialize the clock), DMA functions (used to initialize the DMA channels that can transfer mass data), and ADC and DAC functions (used to initialize the ADC and the DAC modules).
Since the acquiescent original electrochemical voltage is between −1.5 V and +1.5 V, with the original period which is 30 s, the output of the frequency data from the embedded system is performed to meet the requirements. Due to the output voltage generated before the Op-amp addition circuit performs, the maximum of the voltage is seen as 3 V. The signaling rate of sending definite voltage of every interrupt in the program is determined by the TIM module that is collocated in the microcontroller (STM32F407VGT6). To general triangular waveform voltage of plus or minus 1.5 V, DAC is supposed to execute interrupts 3723 times per 30 s (the period), since the DAC determines 4095 is corresponding with reference voltage of 3.3 V. The TIM module with the prescaler of 2 and the clock frequency of 42 MHz needs to determine the frequency to get into the interrupt. Based on the TIM module, the relation between frequency and the maximum of output voltage (called as PeakValue in the equation, which is 3723 if the maximum of the electrochemical voltage is 3 V) is as the following equation (1):
The range of the triangular voltage signal is −1.5 V to +1.5 V and the period is 30 seconds. The triangular voltage signal is sent by the DAC module embedded in the microcontroller. Definite voltages are sent every short interval of time. The adjacent two voltage signals are 0.806 mV apart.
2.5. Software Implement
The software can be operated both on an Android-based smartphone and on a Windows-based PC. The mobile phone receiving terminal is called mobile sensor platform, which supplies functions of detecting, analyzing, mapping, and showing the weather. The PC receiver is called ComAssistant, which receives data via serial port. The software on a PC or the software in a smartphone will calculate the data to determine liquid samples’ concentrations. A liquid sample’s concentration and other results will be displayed on the screen of a computer or on the screen of a smartphone.
2.6. Data Processing
Although the retrieved data from a serial port or from Bluetooth is roughly dealt with, the curves drawn from the data still have some noise that may badly influence the results of the measurements. So before obtaining the fitting function, we eliminate the noise with the method of Moving Window Denoising (MWD). The MWD method updates the 571 points by calculating the average of every point and its next point (see Algorithm 1).
In order to obtain the fitting function that describes the relation between the acquired data and the concentrations of nitrate liquid samples, we tested 9 different concentrations of NaNO3 liquid samples in a neutral environment. After MWD, characteristic values are supposed to be determined from the worked data. Through exploring many times, the results turn out to be excellent if slopes of the first inflection points and the acreages enclosed by every curve are chosen as characteristic values. The method of calculating slopes of the first inflection points in every curve is to find out the approximate region where the inflection point exists and calculate the slopes of the point, which made the calculation more effective. As Figures 5(c) and 5(d) show, the first inflection point in every curve has been marked red. Integration is used to calculate the acreage of the irregular figure that every curve encloses. Using the Least Square Method (LSM), the fitting function matches these 9 sets of characteristic values. Fitting function (2) is as follows:
Within the equation above, represents the concentration of the testing nitrate liquid. represents the acreage of the curve. The slope of the first inflection point is .
3. Results and Discussion
3.1. Miniaturized Nitrate Testing
Nine testing samples with different nitrate concentrations from 1 ppm to 150 ppm were measured by plus or minus 1.5 V sweeping triangular waveform voltage for 4 times. The first periods in every test are regarded as activation process, and the 2nd, the 3rd, and the 4th periods are used for calculating the average curves.
3.2. Measurement Results
The embedded sensing platform is utilized to measure the nitrate concentration in a neutral environment. The raw data is processed with the method introduced in the preceding part and the tested liquid’s concentration can be determined by (2).
Using the control variable method, we handle the volume, the kind of sensor, and the environment to be invariable and change concentrations of the testing samples only. The nitrate concentrations of standard testing samples are 1 ppm, 5 ppm, 10 ppm, 20 ppm, 30 ppm, 50 ppm, 75 ppm, 100 ppm, and 150 ppm, respectively. Here we analyzed the data we obtained from the first time we used a new sensor and used this sensor a second time for testing. The results turn out to be excellent as shown in Table 1 (showing the results obtained from the first test) and Table 2 (showing the results acquired from the second test). Figure 5 shows the two testing curves. The first test is used to calculate the fitting function, and the second test is to verify that the fitting function is applicable in other tests. From the laboratory findings, the fitting function is proved to be suitable for measuring the concentrations of unknown nitrate liquid. As the standard nitrate concentration of potable water in China is less than 10 mg/L, the platform is able to distinguish whether the water samples users are testing reach the standard or not. Owing to its miniaturized size, the platform is designed to be portable and easy for users to carry and operate.
3.3. Network to Share the Nitrate Testing Results
The application on the smartphone is developed to share the nitrate detection results to the social networks, such as Weibo in China. Users can send the sensing results, such as the nitrate concentration, the date, and the location, to a social network for public communication. An example of the smartphone application interface is shown in Figure 6. Figure 6(a) displays the main page of the application, which contains testing option, analysis option, map option, and weather option. The real time curve is drawn on the phone screen just like Figure 6(b) describes. Figure 6(c) shows the location of the test on Baidu map. The sharing page of the testing results is shown in Figure 6(d). After a user depresses the Send option at the top right corner of the page, a message about nitrate testing results will be seen on the Weibo website.
In general, we have created an embedded sensing platform for portable and rapid nitrate concentration measurement. It includes a sender and receiver of the voltage, a small three-electrode electrochemical sensor, and a computer or a smartphone. The platform could test the nitrate ion and concentration in water based on existing analytical data and the fitting function. The results can be both received and stored by a smartphone and a computer so it is convenient for further study.
The authors declare that they have no competing interests.
The work was supported by the National Natural Science Foundation of China (Grants nos. 61472333, 51405408, and 71103154).
- K. Fajerwerg, V. Ynam, B. Chaudret, V. Garçon, D. Thouron, and M. Comtat, “An original nitrate sensor based on silver nanoparticles electrodeposited on a gold electrode,” Electrochemistry Communications, vol. 12, no. 10, pp. 1439–1441, 2010.
- X. Wang, M. R. Gartia, J. Jiang et al., “Audio jack based miniaturized mobile phone electrochemical sensing platform,” Sensors and Actuators B: Chemical, vol. 209, pp. 677–685, 2015.
- M. J. Moorcroft, J. Davis, and R. G. Compton, “Detection and determination of nitrate and nitrite: a review,” Talanta, vol. 54, no. 5, pp. 785–803, 2001.
- D. L. Granger, R. R. Taintor, K. S. Boockvar, and J. B. Hibbs Jr., “Measurement of nitrate and nitrite in biological samples using nitrate reductase and Griess reaction,” Methods in Enzymology, vol. 268, pp. 142–151, 1996.
- H. Wang, W. Yang, S. Liang, Z. Zhang, and H. Zhang, “Spectrofluorimetric determination of nitrite with 5,6-diamino-1,3-naphthalene disulfonic acid,” Analytica Chimica Acta, vol. 419, no. 2, pp. 169–173, 2000.
- G. M. Janini, K. C. Chan, G. M. Muschik, and H. J. Issaq, “Analysis of nitrate and nitrite in water and urine by capillary zone electrophoresis,” Journal of Chromatography B: Biomedical Sciences and Applications, vol. 657, no. 2, pp. 419–423, 1994.
- M. A. Bhat, P. P. Ingole, V. R. Chaudhari, and S. K. Haram, “Mechanistic aspects of nitrate ion reduction on silver electrode: estimation of O-NO2- bond dissociation energy using cyclic voltammetry,” New Journal of Chemistry, vol. 33, no. 1, pp. 207–210, 2009.
- P. B. Lillehoj, M.-C. Huang, N. Truong, and C.-M. Ho, “Rapid electrochemical detection on a mobile phone,” Lab on a Chip, vol. 13, no. 15, pp. 2950–2955, 2013.
- G. Hanrahan, D. G. Patil, and J. Wang, “Electrochemical sensors for environmental monitoring: design, development and applications,” Journal of Environmental Monitoring, vol. 6, no. 8, pp. 657–664, 2004.
- J. Shen, H. Tan, J. Wang, J. Wang, and S. Lee, “A novel routing protocol providing good transmission reliability in underwater sensor networks,” Journal of Internet Technology, vol. 16, no. 1, pp. 171–178, 2015.
- D. Kim, I. B. Goldberg, and J. W. Judy, “Microfabricated electrochemical nitrate sensor using double-potential-step chronocoulometry,” Sensors and Actuators B: Chemical, vol. 135, no. 2, pp. 618–624, 2009.
- A. J. Bard and L. R. Faulkner, Electrochemical Methods: Fundamentals and Applications, John Wiley & Sons, New York, NY, USA, 2nd edition, 2000.
- Y. Ren, J. Shen, J. Wang, J. Han, and S. Lee, “Mutual verifiable provable data auditing in public cloud storage,” Journal of Internet Technology, vol. 16, no. 2, pp. 317–323, 2015.
- Z. Fu, X. Sun, Q. Liu, L. Zhou, and J. Shu, “Achieving efficient cloud search services: multi-keyword ranked search over encrypted cloud data supporting parallel computing,” IEICE Transactions on Communications, vol. E98-B, no. 1, pp. 190–200, 2015.
- Z. Fu, K. Ren, J. Shu, X. Sun, and F. Huang, “Enabling personalized search over encrypted outsourced data with efficiency improvement,” IEEE Transactions on Parallel and Distributed Systems, 2015.
- J. Jiang, X. Wang, R. Chao et al., “Smartphone based portable bacteria pre-concentrating microfluidic sensor and impedance sensing system,” Sensors and Actuators B: Chemical, vol. 193, pp. 653–659, 2014.
- K.-J. Huang, D.-J. Niu, W.-Z. Xie, and W. Wang, “A disposable electrochemical immunesensor for carcinoembryonic antigen based on nano-Au/multi-walled carbon nanotubes-chitosans nanocomposite film modified glassy carbon electrode,” Analytica Chimica Acta, vol. 659, no. 1-2, pp. 102–108, 2010.
- M. Etienne, Y. Guillemin, D. Grosso, and A. Walcarius, “Electrochemical approaches for the fabrication and/or characterization of pure and hybrid templated mesoporous oxide thin films: a review,” Analytical and Bioanalytical Chemistry, vol. 405, no. 5, pp. 1497–1512, 2013.
- D. Kim, I. B. Goldberg, and J. W. Judy, “Chronocoulometric determination of nitrate on silver electrode and sodium hydroxide electrolyte,” Analyst, vol. 132, no. 4, pp. 350–357, 2007.
Copyright © 2016 Jiamin Chen et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.