A Portable Potentiostat for Three-Electrode Electrochemical Sensor

This article reports a portable potentiostat based on a three-electrode electrochemical measurement system, which can be powered and communicated through the OTG interface of a smartphone. The system includes the design of the board-level potentiostat circuit, the generation of excitation in common forms required in electrochemical reactions, and the design of signal capture and analysis circuits. The potentiostat applies the positive and negative step-shaped excitations generated by the excitation generating circuit between the working electrode and the reference electrode stably. Through special excitation methods, the stripping current measured by the working electrode is consistent with that of a large electrochemical workstation. By simulating the classical three-electrode electrochemical solution environment impedance model, the constant potential error of the potentiostat was finally tested to be below 30mV through the detection circuit.


Introduction
The potentiostat is an important part of the electrochemical analysis sensor, and it is used to keep the potential between the working electrode and the reference electrode constant in the three-electrode electrochemical system. The potentiostat also solves the problem of potential difference drift between the working electrode and the reference electrode caused by redox reaction on the electrode surface. In the three-electrode system of this paper, we used glassy carbon electrode as the working electrode, silver-silver chloride potassium chloride solution as the reference electrode and platinum wire as the auxiliary electrode. C. Counter Electrode (platinum wire). The test electrolyte was PbSO4 solution, which was combined with the potentiostat to build a portable current-type electrochemical sensor to measure the concentration of heavy metal ions. This sensor can measure the peak of the dissolution current signal at the working electrode based on the specific positive and negative step scanning signal. According to the relationship between the peak value of stripping current and the concentration of heavy metal ions, the concentration of heavy metal ions in solution can be inferred. The system includes a board-level potentiostatic circuit, a bipolar scanning excitation generating circuit and a signal collection and processing part. The potentiostat circuit part stabilizes the excitation from the scanning excitation generating circuit between the reference electrode and the working electrode, so the potential difference between the two electrodes and the scanning voltage can be equal at any time. The reference electrode provides a reference potential for the threeelectrode system. The scanning excitation is applied to the three-electrode system as an electric current through the auxiliary electrode. The auxiliary electrode, the electrolyte, and the working electrode constitute a loop to ensure that the reference electrode only serves as a reference potential. The design of the scan excitation generation circuit uses a dual 16-bit DAC8562 chip, which can output bipolar analog voltage with an amplitude of 10V. The response time of the voltage transition is between 8ms and 13ms. The minimum stepping time for bipolar step excitation is 9ms, therefore the response time error of the DAC8562 is completely satisfied. The signal collection and processing part is to collect, amplify and convert the stripping current at the working electrode from the electrochemical reaction into voltage.

Design and experimental section
The upper and lower computer of a portable small electrochemical sensor are generally separated. The former one requires independent data processing and display functions, and also carries out data exchange through wired or wireless communication protocols such as USB/OTG, Wi-Fi and Bluetooth [1,2]. The ideal upper computer is a smartphone. The lower computer is a potentiostat system that captures electrochemical reaction signals and sends them to the upper computer after processing. It realizes portability through the separate design of the upper computer and the lower computer [17]. Components of this portable electrochemical sensor are as follows: this portable electrochemical sensor consists of host computer (A) and lower computer(B), and the lower computer is mainly a potentiostat system [4,15] which contains of power management, potentiostat, scanning excitation generating and signal processing. Power management provides positive and negative power supply for each part of the circuit, after which the circuit sends the data to the upper computer and controls the excitation by microcontroller (STM32F103).

Design of potentiostat system
In Figure 3, part B is the potentiostat circuit. The potentiostatic circuit design can choose the outflow path of the stripping current while part B is designed to allow the stripping current to flow out of the working electrode terminal. The auxiliary electrode is used to form the circuit [11,16]. Under the scanning voltage excitation ( scan V ), the working electrode causes the electrolyte solution to undergo an electrochemical reaction. We measure the stripping current on the working electrode through the designed circuit. The reference electrode and the auxiliary electrode constitute a conducting circuit with the electrolyte, and the reference electrode maintains the potential through the negative feedback circuit of the voltage follower as the reference potential of the system [1]. The function of the potentiostat is to control the scanning excitation bias to inject an appropriate current into the electrolyte through the auxiliary electrode, so the voltage difference between the working electrode and the reference electrode remains equal to the scanning excitation voltage. Part A is the scanning voltage excitation generating circuit, in which we choose TI company's DAC8562 dual-channel 16-bit DAC chip. The excitation required for this electrolyte solution is the positive and negative bipolar stepped voltage excitation, and the scanning voltage range is between -0.8V and +0.8V [1]. The voltage output range of DAC8563 is ±10V, this means it can adapt to the level of the microcontroller. In part C, the stripping current of the working electrode is converted into current-voltage firstly. Part C mainly designs the same-phase parallel amplification circuit that can amplify the weak output voltage. Finally, the amplified voltage is captured by the micro-controlled ADC input and the processed data is displayed in real time. . Panel (C) shows the stripping current from the working electrode into the signal processing circuit, then the circuit processing result is captured and displayed by the microcontroller's ADC input. The test solution environment of three-electrode potentiostat system is PbSO4 solution.

Power Management.
The power supply port of the circuit system is a mini USB port and USB battery plug, and +5V power is taken from the outside. The power management system is responsible for powering each module, among which the microcontroller (STM32F103) needs 3.3V power supply, the operational amplifier and DAC chip needs ±5V power supply. Power supply conversion from +5V to +3.3V uses the typical circuit of the DC-DC voltage regulator chip LM1117. The negative power supply part uses the switching voltage regulator chip LM2662. The switching regulator is used as the output stage and repeatedly switches the "on" and "off" states, and it can also adjust the timing according to the feedback sample of the output voltage and generate an output negative voltage together with the energy storage device (capacitor and inductor).

R1
Step waveform scanning  Cortex-M3 core) with dual 16-channel 12-bit ADC as the microcontroller, which can measure 16 external and 2 internal signal sources. The conversion time of input signal is about 1 ms, but it can only convert positive voltage less than 3.6V, supporting peripherals such as IIC, SPI, USB and UART.

Scanning voltage excitation generating circuit.
The general conversion module of DAC cannot output negative voltage, as a result, we select a special bipolar chip DAC8562. DAC8562 can achieve unipolar and bipolar output. The reference voltage is 2.5V, and the chip adopts SPI communication protocol. The DAC8562 clock starts after each enabling signal, and the DAC8562 will start sending and receiving 24bit data; the clock signal occurs 3 times in succession, and each time sending and receiving 8bit data. At each falling edge of the clock, the digital input of the DAC8562 will record the data and store it in the register.
Equation (1) is the relationship between the input data and the analog voltage output of DAC8562 controlled by STM32F103RCT6. N is 16, and DIN is the binary data that STM32 sends to the DAC module register, ranging from 0 to 65535. The reference voltage of the circuit design is 2.5V, and Gain defaults to 1.

Potentiostat circuit.
The circuit of the potentiostat mainly includes [13,15] the conduction loop of the auxiliary electrode, the voltage follower circuit of the reference electrode and the current-voltage conversion circuit for stripping current at the working electrode.
Through a high-precision operational amplifier and auxiliary electrode [14], the scanning voltage injects the excitation signal into the electrolyte in the form of current to stimulate the electrochemical reaction of the electrolyte. This level of operational amplifier uses the industrial-grade precision op-amp INA122P, which has a maximum input offset voltage of 250μV, and the minimum input bias current does not exceed 25nA.
The voltage following circuit of the reference electrode. The main function of the reference electrode is to provide a reference voltage. The voltage follower has two advantages over the reference electrode [16]: (i) It can reduce the influence of electrochemical polarization at the reference electrode and has the function of isolation. (ii) It can increase the input impedance, reduce the output impedance and is a good buffer stage. We chose the INA122P integrated op-amp as the voltage follower. Shorting the input and output ports of the follower will cause the connected load to have capacitive impedance. When the load capacity and the output impedance of the amplifier constitute a constant, a phase difference will occur between the input and output signals, thereby making the circuit unstable. If the input and output ports of the integrated op-amp are shorted, connect a protective resistor in series at the short circuit and a protective capacitor in parallel with the resistor, which can effectively compensate for the phase that the feedback loop lags due to the capacitive impedance of the load to ground.
Current-voltage conversion. It performs current-voltage conversion on the stripping current of the working electrode, and adjusts the conversion voltage by changing the feedback resistance. In order to avoid introducing too much noise signal with small stripping current [13][14][15]: (i) The potential between the two input terminals of the inverting amplifier is always approximately zero and only differentialmode signals are present, so the inverting amplifier is more suitable for the design requirements than the in-phase amplifier. (ii) The "virtual ground" structure of the working electrode through the inverting input terminal to the non-inverting input terminal is more sensitive to the noise response than the working electrode is direct grounding. Selecting a small value of the feedback resistor electrochemical unit, the whole circuit will resonate; if the feedback resistance f R is large, the instability of the circuit will be more obvious.

2.1.5.
Signal processing circuit. This paper adopts the improved current follower measurement scheme to measure the stripping current of the working electrode. Because of the μA level of the highest stripping current for the redox reaction between the lead ion solution and the working electrode, the lower the input bias current, the better [9][10][11]. Here are some things to note: (i) The required input bias current of the op-amp must be much smaller than the tested current so that the output voltage loss due to the effect of the offset current can be ignored. (ii) Because of the virtual grounding of the working electrode in the circuit scheme that adopted at this level, it is easy to be affected by the frequency, and the gain curve will become worse under the high-frequency environment. Therefore, the op-amps used in our design require higher CMRR and open-loop gain. (iii) The input resistance of this level's integrated op-amp must also be much larger than the feedback resistance we set. Based on the above requirements, this class of integrated op-amps uses precision instrument-level integrated op-amps OP37, which can achieve an input bias current of ±10nA, an input offset voltage of 10μV and an excellent CMRR of 126dB. The resistance value of the feedback resistance used in the design is 1K ohms, which is far less than the input impedance of OP37 and will not cause input shunting.
Differential non-inverting parallel amplifier circuit. The effective signal for current-voltage conversion through the current follower is still very weak, so it needs to be amplified again. We choose differential in-phase parallel amplifier circuits at this stage. Compared with the single op-amp amplifier structure, the input impedance of the in-phase parallel differential amplifier structure is more ideal with higher common-mode rejection ratio and stronger anti-interference ability [9]. The in-phase and parallel differential amplification structure is often used as a classic pre-amplifier circuit to amplify the premicro signal of the sensor. Generally, the structure has two levels [2][3][4]: (i) The front stage uses the same type of integrated operational amplifier to form a symmetrical in-phase parallel structure, and symmetrical structure helps to improve the CMRR and input impedance of the previous stage. (ii) The latter stage is an ordinary differential amplifier to amplify the differential-mode signal. We need to make the first stage as symmetrical as possible and select the resistance as accurate as possible to improve the performance of the whole amplification structure.
As shown in part C of Figure 3, the OP07 chip is selected for the two integrated op-amps with symmetrical in-phase parallel structure in the first stage, and the INA122P chip (The amplification factor is 200 G5 K Rs =+ , S R is the feedback resistance) is used for the second-stage integrated op-amp. Since we have adopted the inverting amplifier structure as the current follower, we designed to amplify the differential-mode signal in the in-phase parallel amplifier structure of this stage. The symmetrical integrated op-amp OP07 and the feedback resistor

Results and discussion
Based on the potentiostat in this paper, we use a PbSO4 solution as the electrolyte to build a board-level electrochemical sensor. We measure the peak of the stripping current at the working electrode, and compare the results with the electrochemical workstation (Shanghai Chenhua CHI600).  The external scanning excitation starts with a -0.8V excitation for about 5min, a linearly changing excitation from-0.8V to 0V of 10s and a continuous -0.8V excitation [1]. Part B of Figure 4 is the waveform which we want. This curve shows the relationship between time and the voltage value of the stripping current after signal processing. The peak current appears during the linear scanning from -0.8V to +0.8V. The peak voltage is 576mV, and the corresponding stripping current is 9.95558μA. The above results are consistent with those obtained from the same concentration of PbSO4 solution tested in a large electrochemical workstation.
If it is extended to other electrolyte solutions to verify the potentiostat's ability of maintaining the potential, we need to build a circuit based on the electrochemical impedance model of the electrolyte to simulate different electrolyte environments and give appropriate excitation voltage to observe the effect of potentiostat [6,8]. The electrolytic cell is a very complex system in which electric energy transfer, chemical reaction and component concentration change take place. When the potential of an electrode changes due to the electrochemical polarization of the solution reaction, the current flowing through the electrode system will change accordingly, that is why an electrochemical sensor must have a potentiostat.
It is the working electrode and the auxiliary electrode that form a circuit. In Figure 5, part A describes the double-layer capacitance of the working electrode and the auxiliary electrode, which corresponds to Under certain conditions, the electrolyte impedance system can be optimized, making the equivalent impedance model simpler [5,7]. If there is no electrochemical reaction on the auxiliary electrode, Z CE will be very large. And when the area of the auxiliary electrode is much larger than the working electrode, the electric double-layer capacitance of the auxiliary electrode can be ignored. In addition, the excitation required for most electrochemical reactions is the excitation with constant positive voltage, so the double-layer capacitance at the working electrode can also be regarded as open circuit and ignored. While the electrolyte resistances In this way, we can abstract the equivalent model of the complex electrolytic cell impedance as shown in part C of Figure 5, and build the circuit and test the constant potential accuracy. We took a total of 5 groups of equivalent impedance values and 4 different groups of constant voltage excitation. Test the potential difference between the working electrode and the reference electrode, and draw the actual potentiostat value of the potentiostat. It is known from Figure 6 that after the excitation, the actual constant voltage value of the potentiostat basically coincides with the preset value curve completely and the maximum error does not exceed 30mV. The effect of the potentiostat is ideal.

Conclusions
This paper designs the potentiostat system in the electrochemical analysis sensor. In the design of the potentiostat circuit, the selection of the op-amp determines the measurement accuracy of the system. Based on this potentiostat, we have also designed a portable electrochemical sensor capable of detecting the concentration of heavy metal ions to test the performance of the potentiostatic system. Excited by the bipolar stepped scanning voltage, we measured the stripping current at 9.95μA, which is consistent with the results measured by the electrochemical workstation (CHI600). Build a circuit based on the electrolyte impedance model to simulate the potentiostat capability of the potentiostat under different electrolyte environments and different voltage excitations. In the 24 sets of test data, the maximum potentiostat error of this potentiostat is below 30mV. This design has low cost, good portability and can be redeveloped. It can develop new scanning excitation modes according to expectations of electrochemical scanning, which can meet the requirements of most electrochemical measurement, to sum up, it is a general electrochemical measurement system. Besides, with the help of smart phone and MCU development system as the upper computer, it can separate large electrochemical workstation into portable small special electrochemical measurement sensor.