A four-electrode sensor measurement circuit
By using a combination of power supply chip, microcontroller, communication chip, analog-to-digital conversion chip and switch chip in the four-electrode sensor measurement circuit, combined with the contrast measurement method and dynamic duty cycle adjustment algorithm, the problems of circuit complexity and manual adjustment are solved. It achieves simple circuit, low component cost and high-precision measurement.
Patent Information
- Application Number
- CN202411059796.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-08-05
AI Technical Summary
The existing four-electrode sensor measurement circuit has problems such as complex circuits, many components, low linearity and the need for manual adjustment.
Using a combination of power supply chip, microcontroller, communication chip, analog-to-digital conversion chip and switch chip, the analog-to-digital conversion chip is controlled by the microcontroller to generate a constant current I, and the direction of the constant current I is switched through the PWM signal, and the seawater resistance is calculated using the comparative measurement method. , achieving a simple circuit, low component costs, and no need for later manual adjustment.
The circuit simplification of the four-electrode sensor measurement circuit is achieved, the component cost is reduced, the measurement linearity is improved, and manual adjustment is avoided, ensuring high measurement accuracy and stability.
Smart Images

Figure CN118566296B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of ocean observation, and in particular to a four-electrode sensor measurement circuit. Background Art
[0002] Seawater salinity is one of the elements of ocean hydrological measurement. The accurate measurement of seawater salinity is of great significance to marine scientific research and marine development and utilization. In the field of ocean observation, the measurement of seawater salinity is mainly achieved by measuring seawater conductivity. Among the many types of conductivity measurement sensors, four-electrode sensors occupy an important position due to their advantages of high linearity, fast response speed, large measurement range, and strong anti-pollution ability. Figure 1 As shown in the figure, the four-electrode sensor has two current electrodes I1 and I2 and two voltage electrodes V1 and V2. The circuit measures the seawater resistance between the voltage electrodes V1 and V2 of the four-electrode sensor. When the conductivity cell constant is known, the conductivity value of the seawater can be further obtained. However, the measurement circuits currently used with the four-electrode sensor often have the disadvantages of complex circuit principles, many components, low linearity, and the need for manual adjustment. Summary of the invention
[0003] The purpose of the present invention is to provide a four-electrode sensor measurement circuit, which has the advantages of simple circuit, low component cost, high measurement linearity and no need for subsequent manual adjustment.
[0004] To achieve the above object, the present invention provides the following solutions:
[0005] On the one hand, the present invention provides a four-electrode sensor measurement circuit, comprising: a power chip, a single-chip microcomputer, a communication chip, an analog-to-digital conversion chip and a switch chip; the power chip is respectively connected to the analog-to-digital conversion chip, the communication chip, the single-chip microcomputer and the switch chip for power supply; the single-chip microcomputer is connected to the communication chip via a universal asynchronous receiver-transmitter interface, and is used to receive user measurement instructions and send seawater conductivity measurement data;
[0006] The single-chip microcomputer is connected to the analog-to-digital conversion chip through a serial peripheral device interface; the AIN1 port and the AIN2 port of the analog-to-digital conversion chip are respectively connected to the two ends of the standard resistor R, and are used to collect the differential voltage across the two ends of the standard resistor R; the AIN3 port and the AIN4 port of the analog-to-digital conversion chip are respectively connected to the two voltage electrodes V1 and V2 of the four-electrode sensor, and are used to collect the differential voltage across the two voltage electrodes V1 and V2; the AIN0 port of the analog-to-digital conversion chip is connected to the COM1 port of the switch chip; the AIN0 port of the analog-to-digital conversion chip is used to generate a constant current I; the COM2 port of the switch chip is grounded; the NO1 port of the switch chip is respectively connected to one end of the standard resistor R and the NC2 port of the switch chip; the other end of the standard resistor R is connected to the current electrode I1 of the four-electrode sensor; the NC1 port of the switch chip is respectively connected to the current electrode I2 of the four-electrode sensor and the NO2 port of the switch chip; the IN1 port and the IN2 port of the switch chip are both connected to the PWM signal output interface of the single-chip microcomputer;
[0007] The single-chip microcomputer is used to control the analog-to-digital conversion chip to generate a constant current I when receiving a measurement instruction sent by a user, and to generate a PWM signal with a period of T and a duty cycle of P through an internal timer of the single-chip microcomputer to control the switch chip to periodically switch the direction of the constant current I; During this period, the analog-to-digital conversion chip measures the differential voltage across the standard resistor R, which is recorded as During this period, the analog-to-digital conversion chip measures the differential voltage across the two voltage electrodes V1 and V2, which is recorded as During this period, the analog-to-digital conversion chip measures the differential voltage across the two voltage electrodes V1 and V2, which is recorded as During this period, the analog-to-digital conversion chip measures the differential voltage across the standard resistor R, which is recorded as , , , are the commutation moments of the PWM signal, i is a positive integer; the single chip microcomputer is used to adopt the formula Calculate the seawater resistance between the two voltage electrodes V1 and V2 , and the conductivity of seawater is calculated by combining the conductivity cell constant of the four-electrode sensor; is the resistance value of the standard resistor R.
[0008] Optionally, the switch chip is a dual-channel single-pole double-throw switch, which is used to switch the direction of the constant current I according to the high and low levels of the PWM signal; when the PWM signal sent by the single-chip microcomputer is at a high level, the constant current I generated by the AIN0 port of the analog-to-digital conversion chip flows into the COM1 port of the switch chip, flows out from the NO1 port of the switch chip, and then flows through the standard resistor R, the current electrode I1 of the four-electrode sensor, the current electrode I2 of the four-electrode sensor and the NO2 port of the switch chip in sequence, and finally flows into the circuit ground from the COM2 port of the switch chip; when the PWM signal sent by the single-chip microcomputer is at a low level, the constant current I generated by the AIN0 port of the analog-to-digital conversion chip flows into the COM1 port of the switch chip, flows out from the NC1 port of the switch chip, and then flows through the current electrode I2 of the four-electrode sensor, the current electrode I1 of the four-electrode sensor, the standard resistor R and the NC2 port of the switch chip in sequence, and finally flows into the circuit ground from the COM2 port of the switch chip.
[0009] Optionally, the measurement channel composed of the AIN1 port and the AIN2 port of the analog-to-digital conversion chip is used as channel 1; the analog-to-digital conversion chip has a programmable signal amplification function, and the measurement value of channel 1 is amplified by 1 / 2 / 4 / 8 / 16 / 32 / 64 / 128 times by changing the internal register.
[0010] Optionally, each time measurement starts, the analog-to-digital conversion chip first uses a 16-fold magnification for channel 1; if the measured value of channel 1 is less than 10% of the full scale, it switches to a higher magnification until the highest gear; if the measured value of channel 1 is greater than 90% of the full scale, it switches to a lower magnification until the lowest gear; if the measured value of channel 1 is still greater than 90% of the full scale at the lowest magnification, the constant current output of the AIN0 port is turned off and the measurement is stopped.
[0011] Optionally, the analog-to-digital conversion chip has a constant current source generation function, and outputs four constant currents I of 10 / 50 / 200 / 1000uA at the AIN0 port by changing an internal register.
[0012] Optionally, the measurement channel composed of the AIN3 port and the AIN4 port of the analog-to-digital conversion chip is used as channel 2; each time the measurement starts, the analog-to-digital conversion chip first generates a constant current I of 50uA at the AIN0 port; if the measurement value of channel 2 is less than 10% of the full scale, it is switched to a higher constant current I until the highest gear; if the measurement value of channel 2 is greater than 90% of the full scale, it is switched to a lower constant current I until the lowest gear; if the measurement value of channel 2 is still greater than 90% of the full scale under the constant current I of the lowest gear, the constant current output of the AIN0 port is closed and the measurement is stopped.
[0013] Optionally, the single chip microcomputer is further configured to immediately control the analog-to-digital conversion chip to turn off the constant current output of the AIN0 port and stop measuring when no differential voltage is measured across the standard resistor R.
[0014] Optionally, the single chip microcomputer is also used to adopt the formula Calculating DC offset cancellation parameters , and according to Adjust the duty cycle P of the PWM signal; Indicates increase multiple.
[0015] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0016] The four-electrode sensor measurement circuit provided by the present invention can be realized by only using a power chip, a single-chip microcomputer, a communication chip, an analog-to-digital conversion chip and a switch chip, and has the characteristics of simple circuit and low component cost. The single-chip microcomputer is used to control the analog-to-digital conversion chip to generate a constant current I when receiving a measurement instruction sent by a user, and to generate a PWM signal with a period of T and a duty cycle of P through an internal timer of the single-chip microcomputer to control the switch chip to periodically switch the direction of the constant current I; , , as well as During this period, the analog-to-digital conversion chip measures the standard resistor R, the two voltage electrodes V1 and V2, the two voltage electrodes V1 and V2, and the differential voltage across the standard resistor R, which are expressed as , , as well as ; The microcontroller can use the formula Calculate the seawater resistance between the two voltage electrodes V1 and V2 , and combined with the conductivity cell constant of the four-electrode sensor to calculate the seawater conductivity, it has the advantages of high measurement linearity and no need for subsequent manual adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a schematic diagram of four electrodes of a four-electrode sensor;
[0019] Figure 2 A schematic diagram of the connection relationship of the four-electrode sensor measurement circuit of the present invention;
[0020] Figure 3 This is the differential voltage timing diagram generated by the constant current I generated by the analog-to-digital conversion chip in channel 1;
[0021] Figure 4 The schematic diagram of the microcontroller using the internal timer to generate PWM signals;
[0022] Figure 5 Schematic diagram of measurement results of the four-electrode sensor measurement circuit of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The object of the present invention is to provide a four-electrode sensor measurement circuit, which has the advantages of simple circuit, low component cost, high measurement linearity and no need for subsequent manual adjustment.
[0025] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0026] See also Figure 2 The present invention provides a four-electrode sensor measurement circuit, including: a power chip, a single-chip microcomputer, a communication chip, an analog-to-digital conversion (ADC) chip, and a switch chip. In some embodiments, the power chip model can be selected from ME6214 of Weimeng Electronics; the analog-to-digital conversion chip model can be selected from HCT6761Q of Hengxin Microelectronics; the communication chip model can be selected from MAX3232 of Guangdong Huaguan Semiconductor; the single-chip microcomputer model can be selected from GigaDevice GD32L233; and the switch chip model can be selected from RS2105 of Jiangsu Runshi Technology.
[0027] The power chip is connected to the analog-to-digital conversion chip, the communication chip, the single-chip microcomputer and the switch chip for power supply. Specifically, the power chip generates a 3.3V power supply for the analog-to-digital conversion chip, the communication chip, the single-chip microcomputer and the switch chip.
[0028] The single chip microcomputer is connected to the communication chip via a universal asynchronous receiver / transmitter (UART) interface, and is used for receiving user measurement instructions and sending seawater conductivity measurement data.
[0029] The single-chip microcomputer is connected to the analog-to-digital conversion chip through a serial peripheral device (SPI) interface. The AIN1 port and the AIN2 port of the analog-to-digital conversion chip are respectively connected to the two ends of the standard resistor R, and are used to collect the differential voltage across the two ends of the standard resistor R. The AIN3 port and the AIN4 port of the analog-to-digital conversion chip are respectively connected to the two voltage electrodes V1 and V2 of the four-electrode sensor, and are used to collect the differential voltage across the two voltage electrodes V1 and V2. The AIN0 port of the analog-to-digital conversion chip is connected to the COM1 port of the switch chip. The AIN0 port of the analog-to-digital conversion chip is used to generate a constant current I. The COM2 port of the switch chip is grounded. The NO1 port of the switch chip is respectively connected to one end of the standard resistor R and the NC2 port of the switch chip. The other end of the standard resistor R is connected to the current electrode I1 of the four-electrode sensor. The NC1 port of the switch chip is respectively connected to the current electrode I2 of the four-electrode sensor and the NO2 port of the switch chip. The IN1 port and the IN2 port of the switch chip are both connected to the PWM signal output interface of the single-chip microcomputer.
[0030] The single-chip microcomputer controls the communication chip through the UART interface and controls the analog-to-digital conversion chip through the SPI interface. The internal timer of the single-chip microcomputer generates a pulse width modulation (PWM) signal to control the switch chip.
[0031] The ADC chip uses channel 1 (AIN1 and AIN2 ports) to collect the differential voltage across the standard resistor R, and uses channel 2 (AIN3 and AIN4 ports) to collect the differential voltage across the two voltage electrodes V1 and V2 of the four-electrode sensor. The ADC chip has a programmable signal amplification function, and the signal of a specific channel can be amplified by 1 / 2 / 4 / 8 / 16 / 32 / 64 / 128 times by changing the internal register. The symbol " / " represents or. In the present invention, the signal across the standard resistor R (channel 1) is further amplified by the programmable amplifier built into the ADC chip. The ADC chip also has a constant current source generation function, and a constant current signal with adjustable size can be output at a specific port by changing the internal register. In the present invention, four sizes of constant current I of 10 / 50 / 200 / 1000uA are output through the AIN0 port.
[0032] The switch chip is a dual-channel single-pole double-throw switch, which can switch the direction of the constant current I according to the high and low levels of the PWM signal. Specifically, when the PWM signal sent by the single-chip microcomputer is at a high level, the constant current I generated by the AIN0 port of the ADC chip flows in from the COM1 port of the switch chip, flows out from the NO1 port of the switch chip, and then flows through the standard resistor R, the current electrode I1 of the four-electrode sensor, the current electrode I2 of the four-electrode sensor, the NO2 port of the switch chip in sequence, and finally flows into the circuit ground from the COM2 port of the switch chip; when the PWM signal sent by the single-chip microcomputer is at a low level, the constant current I generated by the AIN0 port of the ADC chip flows in from the COM1 port of the switch chip, flows out from the NC1 port of the switch chip, and then flows through the current electrode I2 of the four-electrode sensor, the current electrode I1 of the four-electrode sensor, the standard resistor R, the NC2 port of the switch chip in sequence, and finally flows into the circuit ground from the COM2 port of the switch chip.
[0033] The single-chip microcomputer is used to control the ADC chip to generate a constant current I when receiving a measurement instruction sent by the user, and to generate a PWM signal with a period of T and a duty cycle of P through an internal timer of the single-chip microcomputer to control the switch chip to periodically switch the direction of the constant current I; the timing of the differential voltage generated by the constant current I in channel 1 is as follows: Figure 3 The timing of the differential voltage generated by constant current I in channel 2 is similar, only the amplitude is different. Figure 3 In the embodiment shown, , , , , are the commutation moments of the PWM signal. To ensure high linearity of the measurement results, the signals of channel 1 and channel 2 are measured alternately, and the signal measurement cycle avoids the commutation moment of the signal. Specifically, , , , During this period, the ADC chip measures the standard resistor R, the two voltage electrodes V1 and V2, the two voltage electrodes V1 and V2, and the differential voltage across the standard resistor R, which are expressed as follows: , Because the current values flowing through the standard resistor R and the four-electrode sensor are equal, according to Ohm's law, the equivalent resistance of seawater between the two voltage electrodes V1 and V2 of the four-electrode sensor can be calculated as:
[0034] (1)
[0035] in is the resistance value of the standard resistor R; is the seawater resistance between the two voltage electrodes V1 and V2. Combined with the conductivity cell constant of the four-electrode sensor, the conductivity value of the measured seawater can be further obtained. Formula (1) of the present invention uses a comparative measurement method to obtain the seawater resistance (conductivity). It can be seen from formula (1) that the measurement result is not affected by the temperature drift and time drift of the reference voltage and constant current of the ADC, the ADC zero point measurement error and the full-scale measurement error, and the switch chip leakage current, and can ensure long-term measurement stability.
[0036] In the actual measurement process, the ADC chip During this period, the differential voltage across the standard resistor R is measured and recorded as ;exist During this period, the differential voltage across the two voltage electrodes V1 and V2 is measured and recorded as ;exist During this period, the differential voltage across the two voltage electrodes V1 and V2 is measured and recorded as ;exist During this period, the differential voltage across the standard resistor R is measured and recorded as ;in , , , are the switching moments of the PWM signal, and i is a positive integer. The single chip microcomputer uses formula (1) to calculate the seawater resistance between the two voltage electrodes V1 and V2 , combined with the conductivity cell constant of the four-electrode sensor, the seawater conductivity can be calculated.
[0037] Furthermore, the four-electrode sensor measurement circuit of the present invention can also realize the automatic range switching function. As mentioned above, the single-chip microcomputer can control the ADC chip to generate 4 gears (10 / 50 / 200 / 1000uA) of constant current I, and generate 8 gears (1 / 2 / 4 / 8 / 16 / 32 / 64 / 128) of amplification factors for the channel 1 signal. Therefore, further, the single-chip microcomputer can also automatically adjust the excitation current and signal amplification factor according to the size of the measured seawater conductivity, ensuring that the differential voltage signals of channel 1 and channel 2 are at an appropriate level to achieve the best measurement accuracy. The implementation method is as follows: each time the measurement starts, the ADC chip first uses a 16-fold magnification for channel 1; if the measured value of channel 1 is less than 10% of the full scale, it switches to a higher magnification until the highest gear; if the measured value of channel 1 is greater than 90% of the full scale, it switches to a lower magnification until the lowest gear; if the measured value of channel 1 is still less than 10% of the full scale at the highest magnification, the magnification will no longer change and the measurement will continue; if the measured value of channel 1 is still greater than 90% of the full scale at the lowest magnification, the constant current output of the AIN0 port is closed and the measurement is stopped. Each time measurement starts, the ADC chip first generates a constant current I of 50uA at the AIN0 port; if the measured value of channel 2 is less than 10% of the full scale, it switches to a higher constant current I until the highest gear; if the measured value of channel 2 is greater than 90% of the full scale, it switches to a lower constant current I until the lowest gear; if the measured value of channel 2 is still less than 10% of the full scale at the highest constant current I, the constant current I will not change and the measurement will continue; if the measured value of channel 2 is still greater than 90% of the full scale at the lowest constant current I, the constant current output of the AIN0 port will be closed and the measurement will be stopped.
[0038] Furthermore, the four-electrode sensor measurement circuit of the present invention can also realize the water inlet / outlet detection function of the four-electrode sensor. Specifically, when the four-electrode sensor is filled with seawater, there is a complete current loop from the COM1 port to the COM2 port of the switch chip, and there is a differential voltage across the standard resistor R, and the measurement can be carried out normally; when the four-electrode sensor is not filled with seawater, the current loop from the COM1 port to the COM2 port is disconnected, and no differential voltage can be measured across the standard resistor R. At this time, the single-chip microcomputer immediately controls the ADC chip to turn off the constant current output of the AIN0 port and stop subsequent measurements.
[0039] Furthermore, the four-electrode sensor measurement circuit of the present invention adopts a dynamic duty cycle adjustment algorithm, which can accurately eliminate the bias current flowing through the four-electrode sensor and avoid electrode polarization. In order to achieve the purpose of eliminating DC bias, the differential signal measured at both ends of the standard resistor R is , , fine-tune the duty cycle P of the PWM waveform in the program so that the net charge flowing through the standard resistor R in each cycle T is 0. At this time, the duty cycle P should satisfy:
[0040] (2)
[0041] The microcontroller uses an internal timer to generate a PWM signal with a period of T and a duty cycle of P. The principle is as follows Figure 4 As shown, the microcontroller timer register Determines the signal period T, the microcontroller register and The ratio of determines the duty cycle P of the signal. and are independently adjustable and must be integers. For example, if you want to achieve a 50% duty cycle, The value should be 2 times However, if you adjust the registers directly The duty cycle adjustment accuracy will be relatively rough. Therefore, the present invention adopts a dynamic duty cycle adjustment algorithm to adjust the duty cycle of the PWM signal. Specifically, Increase an integer value (using ), while Increase times The integer value of can achieve the purpose of fine-tuning the duty cycle by slightly changing the signal period. At this time, the duty cycle P is:
[0042] (3)
[0043] Combining formula (2) and formula (3), we can get the parameters corresponding to eliminating a specific DC bias. :
[0044] (4)
[0045] in is the DC bias elimination parameter, Indicates the increase multiple. The microcontroller uses this group of timer parameters By regenerating the PWM signal, the net charge flowing through the four-electrode sensor in each cycle T can be greatly weakened, reducing the electrode polarization phenomenon.
[0046] From formula (4), we can see that The closer the value is to 2, the smaller the unit The smaller the change in the corresponding duty cycle, the more finely the duty cycle can be adjusted. Taking the value of 1.99, it is estimated that the duty cycle adjustment accuracy can be improved by 200 times, which greatly improves the accuracy of eliminating the DC bias flowing through the four-electrode sensor, avoids electrode polarization, and increases the service life of the sensor.
[0047] Compared with the existing measurement circuits, the four-electrode sensor measurement circuit proposed in the present invention only uses 1 power chip, 1 single-chip microcomputer, 1 dual-channel single-pole double-throw switch, 1 high-precision resistor, and 1 analog-to-digital converter with a programmable constant current source. The circuit is simple and the cost of components is low. The four-electrode sensor measurement circuit proposed in the present invention adopts a comparative measurement method, and the signal measurement cycle avoids the moment of signal commutation. Therefore, the measurement linearity is very high and no manual adjustment is required later. In some embodiments, 9 four-electrode sensor measurement circuits of the present invention (numbered 2202~2203 and 2214~2220, respectively) are used to measure the resistance values of 14 four-wire resistors between 100~5000Ω. The measurement results are as follows. Figure 5 As shown, compared with the measurement value of Agilent 3458A 8.5-digit multimeter, the maximum relative measurement error is only 0.011%, indicating that the four-electrode sensor measurement circuit of the present invention has extremely high measurement accuracy.
[0048] Furthermore, the four-electrode sensor measurement circuit proposed in the present invention can realize automatic range switching by adjusting the size of the constant current I and adjusting the amplification factor of channel 1 to adapt to seawater samples of different salinities. The four-electrode sensor measurement circuit proposed in the present invention can also realize water inlet / outlet detection of the four-electrode sensor. The constant current I is generated only when the sensor is full of seawater. Otherwise, the constant current I is stopped in time to avoid polarization of the electrode. In addition, the four-electrode sensor measurement circuit proposed in the present invention adopts a dynamic duty cycle adjustment algorithm, which can accurately eliminate the bias current flowing through the sensor and increase the service life of the sensor without going through any hardware compensation circuit. It has the advantages of zero cost, no change in circuit parameters, and high elimination accuracy, and therefore has broad application prospects.
[0049] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A four-electrode sensor measurement circuit, characterized in that: include: A power chip, a single-chip microcomputer, a communication chip, an analog-to-digital conversion chip, and a switch chip; the power chip is respectively connected to the analog-to-digital conversion chip, the communication chip, the single-chip microcomputer, and the switch chip for power supply; the single-chip microcomputer is connected to the communication chip via a universal asynchronous receiver-transmitter interface, for receiving user measurement instructions and sending seawater conductivity measurement data; The single-chip microcomputer is connected to the analog-to-digital conversion chip through a serial peripheral device interface; the AIN1 port and the AIN2 port of the analog-to-digital conversion chip are respectively connected to the two ends of the standard resistor R, and are used to collect the differential voltage across the two ends of the standard resistor R; the AIN3 port and the AIN4 port of the analog-to-digital conversion chip are respectively connected to the two voltage electrodes V1 and V2 of the four-electrode sensor, and are used to collect the differential voltage across the two voltage electrodes V1 and V2; the AIN0 port of the analog-to-digital conversion chip is connected to the COM1 port of the switch chip; the AIN0 port of the analog-to-digital conversion chip is used to generate a constant current I; the COM2 port of the switch chip is grounded; the NO1 port of the switch chip is respectively connected to one end of the standard resistor R and the NC2 port of the switch chip; the other end of the standard resistor R is connected to the current electrode I1 of the four-electrode sensor; the NC1 port of the switch chip is respectively connected to the current electrode I2 of the four-electrode sensor and the NO2 port of the switch chip; the IN1 port and the IN2 port of the switch chip are both connected to the PWM signal output interface of the single-chip microcomputer; The single-chip microcomputer is used to control the analog-to-digital conversion chip to generate a constant current I when receiving a measurement instruction sent by a user, and to generate a PWM signal with a period of T and a duty cycle of P through an internal timer of the single-chip microcomputer to control the switch chip to periodically switch the direction of the constant current I; During this period, the analog-to-digital conversion chip measures the differential voltage across the standard resistor R, which is recorded as ;exist During this period, the analog-to-digital conversion chip measures the differential voltage across the two voltage electrodes V1 and V2, which is recorded as ;exist During this period, the analog-to-digital conversion chip measures the differential voltage across the two voltage electrodes V1 and V2, which is recorded as ;exist During this period, the analog-to-digital conversion chip measures the differential voltage across the standard resistor R, which is recorded as ;in , , , are the commutation moments of the PWM signal, i is a positive integer; the single chip microcomputer is used to adopt the formula Calculate the seawater resistance between the two voltage electrodes V1 and V2 , and the conductivity of seawater is calculated by combining the conductivity cell constant of the four-electrode sensor; is the resistance value of the standard resistor R.
2. The four-electrode sensor measurement circuit according to claim 1, characterized in that: The switch chip is a dual-channel single-pole double-throw switch, which is used to switch the direction of the constant current I according to the high and low levels of the PWM signal; when the PWM signal sent by the single-chip microcomputer is at a high level, the constant current I generated by the AIN0 port of the analog-to-digital conversion chip flows in from the COM1 port of the switch chip, flows out from the NO1 port of the switch chip, and then flows through the standard resistor R, the current electrode I1 of the four-electrode sensor, the current electrode I2 of the four-electrode sensor and the NO2 port of the switch chip in sequence, and finally flows into the circuit ground from the COM2 port of the switch chip; when the PWM signal sent by the single-chip microcomputer is at a low level, the constant current I generated by the AIN0 port of the analog-to-digital conversion chip flows in from the COM1 port of the switch chip, flows out from the NC1 port of the switch chip, and then flows through the current electrode I2 of the four-electrode sensor, the current electrode I1 of the four-electrode sensor, the standard resistor R and the NC2 port of the switch chip in sequence, and finally flows into the circuit ground from the COM2 port of the switch chip.
3. The four-electrode sensor measurement circuit according to claim 1, characterized in that: The measurement channel composed of the AIN1 port and the AIN2 port of the analog-to-digital conversion chip is used as channel 1; the analog-to-digital conversion chip has a programmable signal amplification function, and the measurement value of channel 1 is amplified by 1 / 2 / 4 / 8 / 16 / 32 / 64 / 128 times by changing the internal register.
4. The four-electrode sensor measurement circuit according to claim 3, characterized in that: Each time measurement starts, the analog-to-digital conversion chip first uses a 16-fold magnification for channel 1; if the measured value of channel 1 is less than 10% of the full scale, it switches to a higher magnification until the highest gear; if the measured value of channel 1 is greater than 90% of the full scale, it switches to a lower magnification until the lowest gear; if the measured value of channel 1 is still greater than 90% of the full scale at the lowest magnification, the constant current output of the AIN0 port is turned off and the measurement is stopped.
5. The four-electrode sensor measurement circuit according to claim 1, characterized in that: The analog-to-digital conversion chip has a constant current source generation function, and outputs four constant currents I of 10 / 50 / 200 / 1000uA at the AIN0 port by changing the internal register.
6. The four-electrode sensor measurement circuit according to claim 5, characterized in that: The measurement channel composed of the AIN3 port and the AIN4 port of the analog-to-digital conversion chip is used as channel 2; each time the measurement starts, the analog-to-digital conversion chip first generates a constant current I of 50uA at the AIN0 port; if the measurement value of channel 2 is less than 10% of the full scale, it is switched to a higher constant current I until the highest gear; if the measurement value of channel 2 is greater than 90% of the full scale, it is switched to a lower constant current I until the lowest gear; if the measurement value of channel 2 is still greater than 90% of the full scale under the constant current I of the lowest gear, the constant current output of the AIN0 port is closed and the measurement is stopped.
7. The four-electrode sensor measurement circuit according to claim 1, characterized in that: The single chip microcomputer is also used to immediately control the analog-to-digital conversion chip to turn off the constant current output of the AIN0 port and stop measuring when no differential voltage is measured across the standard resistor R.
8. The four-electrode sensor measurement circuit according to claim 1, characterized in that: The microcontroller is also used to adopt the formula Calculating DC offset cancellation parameters , and according to Adjust the duty cycle P of the PWM signal; Indicates increase multiple.
