home page > News > 电路工作原理与技术 >

pH sensor reference design that supports RF wireless transmission

作者:管理员 来源:本站 浏览数:865 发布时间:2018/8/30 11:30:43

Abstract If system accuracy, efficiency, and reliability are critical, designing sensor nodes for wireless data transmission for remote monitoring is a significant challenge. The pH value of the solution is a measurement that many industries need to consider, such as agriculture or healthcare. The main purpose of this paper is to evaluate the characteristics of pH glass probes, thereby addressing different hardware and software design challenges, and to propose a solution that wirelessly transmits data from the probe using an RF transceiver module.

Brief introduction

The first part of this article introduces pH probes, then explores various design challenges related to front-end signal conditioning circuits, as well as how to achieve low-cost, high-precision, and highly reliable data conversion. To improve data processing accuracy, calibration techniques are also discussed in discussions, such as general polynomial fitting, which uses the least squares method to approximate dispersed predefined data to calibrate pH values. The final part of this article provides a reference circuit design for a wireless monitoring system.

Learn about pH probes

pH value definition

Aqueous solutions can be divided into three types: acidic, alkaline, and neutral. In chemistry, pH is measured by a numerical scale. According to the Carlsberg Foundation's definition, pH represents the concentration of hydrogen ions. This scale is a logarithmic scale, ranging from 1 to 14. The mathematical expression for pH value is: pH = –log(H +). Therefore, if the hydrogen ion concentration is 1.0 × 10–2 mol/L, then pH = –log(1.0 × 10–2) = 2. The pH of aqueous solutions such as distilled water is 7, which is a neutral value. Solutions with a pH value below 7 are acidic, while those with a pH greater than 7 are alkaline. The logarithmic scale reflects the acidity of one solution relative to another. For example, a solution with a pH of 5 has acidity ten times that of a solution with pH 6, and a thousand times more acidity than a solution with pH 8.

pH indicator

There are many ways to measure the pH of aqueous solutions, including using litmus paper indicators or using glass probes.

Litmus test paper

Litmus paper indicators are usually made from dye extracted from lichens and can be used to indicate pH levels. Once in contact with the solution, the test paper undergoes a chemical reaction, causing its color to change, which indicates the pH level. This category generally includes two methods: one is to compare the standard color corresponding to the known pH value with the indicator color of the test liquid immersed in buffer solution; The other method is to first immerse the pH test paper in an indicator, then immerse it in the test liquid, and compare its color with the standard color. Although the above two methods are easy to implement, temperature and impurities in the test solution can easily cause errors.

pH glass probe

The most commonly used pH indicator is the pH probe. It consists of a glass measuring electrode and a reference electrode. A typical glass probe consists of a glass film encapsulated in hydrochloric acid (HCl) solution. Inside the casing is a silver wire plated with AgCl, which acts as a reference electrode and contacts the HCL solution. Hydrogen ions outside the glass film diffuse through the film, displacing a corresponding amount of sodium ions (Na+). Most glass generally contains sodium ions. These positive ions are very sensitive, mostly confined to the lower concentration on the side of the glass film. The excess charge of Na+ generates a voltage at the sensor output. The probe is similar to a battery. When the probe is placed in solution, the measuring electrode generates a voltage whose magnitude depends on the activity of hydrogen in the solution, and this voltage is then compared with the potential of the reference electrode. As the acidity of the solution increases (pH decreases), the potential of the glass electrode increases relative to the positive reference electrode (+mV); As the solution's alkalinity increases (pH increases), the glass electrode potential relative to the reference electrode becomes more negative (-mV). The difference between these two electrodes is the measured potential. Ideally, a typical pH probe at 25°C will generate 59.154 mV/pH units, usually expressed by the Nönst equation as follows:

Among them:

Equation 1

E = hydrogen electrode voltage, activity unknown a = ±30 mV, zero tolerance T = ambient temperature (25°C) n = 1 (25°C), valence (number of charges on ions) F = 96,485 coulombs per mole, Faraday constant R = 8.314 volt-coulomb/°K mole, Avogadro's Roth number  pH = concentration of hydrogen ions in an unknown solution pHISO = 7, reference hydrogen ion concentration

The equation shows that the resulting voltage depends on the acidity and basicity of the solution and varies in a known way with hydrogen ion activity. Changes in solution temperature alter the activity of its hydrogen ions. When the solution is heated, the movement speed of hydrogen ions accelerates, resulting in an increase in the potential difference between the two electrodes. Additionally, when the solution cools, hydrogen activity decreases, causing the potential difference to drop. According to the design, ideally, when placed in a buffer solution with pH 7, the electrode generates a zero-volt potential.

The specifications of typical pH probes are shown in the table below.

表1. pH玻璃探针的典型规格
Measurement range pH 0 to pH 14
The pH value at 0V pH 7.00 ±0.25
precision pH 0.05, temperature range: 20°C to 25°C
resolution pH 0.01 0.1 mV
Operating temperature 80°C (maximum)
Reaction time ≤ 1 second (reaches 90% of the final value)

pH probes play an important role in this study, as data reliability depends on the accuracy and reliability of the sensor. When selecting a pH probe, two important factors need to be considered: the stability time after the buffer solution temperature change and the stability period after the pH value changes. As an example, the following data is taken from Jenway's application note "Jenway High-Performance pH Electrode Evaluation"1, showing the probe's stable performance after temperature changes under given test conditions. A solution is prepared with a buffer pH of 7 at 20°C and a pH of 4 at 60°C. Stabilize each electrode in a pH 7 buffer solution stirred at 200 rpm. Then wash the electrodes with deionized water and transfer them to equal samples in pH 4 buffer for 4 minutes. Clean the electrodes again with deionized water, then return them to pH 7 buffer solution. Assess the time needed for a reading to remain stable for 10 seconds. Test each probe three times.

表2. 缓冲溶液温度改变之后的稳定时间
General-purpose pH probe Jenway (35xx Series pH Probe)
1 77 36
2 77 33
3 49 34
Average 67.6667 34.3333
表3. 缓冲溶液pH值改变之后的稳定时间
Universal pH probe Jenway (35xx Series pH Probe)
1 29 21
2 31 26
3 38 21
Average 32.6667 22.6667

Under the given conditions shown, Jenway probes can respond up to 50% faster than general pH probes. Using such instruments is very advantageous because their sample throughput is very high, greatly reducing the time required to analyze data.

Sensor analog signal conditioning circuit

To understand the signal conditioning circuit, you must know the equivalent circuit diagram of the sensor probe. As mentioned in the previous section, pH probes made of glass can form extremely high resistance, ranging from 1 MΩ to 1 GΩ, acting as resistors connected in series with the pH voltage source, as shown in Figure 1.

Figure 1. pH probe equivalent circuit configuration

Even a very small circuit current passing through the high resistance of various components in the circuit (especially the glass film of the measuring electrode) can still cause a relatively large voltage drop on these resistors, significantly reducing the voltage measured by the instrument. Even worse, the voltage difference generated by the measuring electrode is very small, within the millivolt range (ideally, at room temperature, each pH unit corresponds to 59.16 mV). The instruments used for this task must be extremely sensitive and have ultra-high input resistance.

Analog-to-digital conversion

For such applications, given the sensor's response time, the data sampling rate will be an issue. Assuming the sensor resolution is 0.001 V rms and the ADC full-scale voltage range is 1 V, achieving an effective 9.96-bit resolution does not require a high-resolution ADC. Noiseless resolution is measured in bits, defined by the following formula: Noiseless resolution = log2 [full-scale input voltage range / sensor peak-to-peak voltage output noise]. ADC sampling rate may be an important factor for low-power applications, as ADC sampling rate is directly related to power consumption. When the sensor's response time is fixed, the typical ADC sampling rate can be set to its minimum throughput rate. Microcontrollers with integrated ADCs can be used to reduce the number of devices.

transceiver

Transceivers are needed to transmit pH and temperature data, and microcontrollers are needed to control transceivers. The choice of transceivers and microcontrollers involves several important considerations.

When choosing a transceiver, the following factors must be considered:

  • 工作频率
  • 最大距离范围
  • 数据速率
  • 许可

Operating frequency

When designing RF transmission, it is essential to determine whether the operating frequency (OF), sub-GHz, or 2.4 GHz frequency meets application requirements. For applications requiring high data rates and using wide bandwidth such as Bluetooth, the 2.4 GHz frequency is the best choice. However, industrial applications typically use sub-GHz frequencies because available proprietary protocols conveniently provide the network link layer. Proprietary systems mainly use ISM frequencies in the sub-GHz range, namely 433 MHz, 868 MHz, and 915 MHz.

Maximum distance range

Sub-1 GHz frequency supports long-distance, high-power transmission over 25 km. When used in point-to-point or star topologies, these frequencies can effectively penetrate walls and other obstacles.

Data rate

Data rate also needs to be determined, as it affects the transceiver's transmission range capability and power consumption. At higher data rates, power consumption is lower, making it suitable for short-distance transmission; At lower data rates, power consumption is higher, making it suitable for long-distance transmission. To reduce power consumption, increasing data rates is a good approach, as it only consumes current in bursts for a very short time, but this also shortens the radio coverage distance.

Transceiver power consumption

Transceiver power consumption is very important for battery-powered applications. This is also a consideration in many wireless applications, as it determines data rates and distance ranges. The transceiver offers two power amplifier (PA) options to provide greater operational flexibility. A single-ended PA can output up to 13 dBm of RF power, while a differential PA can output up to 10 dBm. Table 4 summarizes the relationship between some PA output power and transceiver IDD current consumption. For completeness, the table also shows the current consumption for reception mode.

表4. PA输出功率与收发器IDD电流消耗小结
Transceiver status (868 MHz/915 MHz) Output Power (dBm) Typical IDD (mA)
Single-ended PA, Tx mode –10 0  +10  +13 10.3 13.3 24.1 32.1
Differential PA, Tx mode –10 0 +10 9.3 12 28
Rx mode - 12.8

Permission

Sub-GHz includes license-free ISM bands of 433 MHz, 868 MHz, and 915 MHz. It is widely used in industry and is very suitable for various wireless applications. It can be used in different regions of the world because it complies with European ETSI EN300-220 regulations, North American FCC Part 15 regulations, and other similar regulatory standards.

Microcontrollers

As shown in Figure 2, the core of an RF system is a processor unit or microcontroller (MCU) that processes data and runs a software stack that interfaces with transceivers (for RF transmission) and pH reference design (RD) boards (for sensor measurements).

Figure 2. Block diagram of wireless sensor data acquisition and transmission

When selecting a microcontroller, the following factors must be considered:

  • 外设
  • 存储器
  • 处理能力
  • 功耗

peripheral

Microcontrollers should integrate peripherals such as SPI buses. Both the transceiver and pH reference design board are connected via SPI, so two SPI peripherals are needed.

memorizer

With appropriately sized memory, microcontrollers perform protocol processing and sensor interface tasks. Flash and RAM are two extremely important components of microcontrollers. To ensure the system does not run out of storage space, 128 kB of memory is used. This will ensure that applications and software algorithms run smoothly and leave room for possible upgrades and feature additions (to eliminate system issues).

Architecture and processing power

Microprocessors must be fast enough to handle complex calculations and processes. The system uses a 32-bit microprocessor. While lower-bit processors may also be feasible, this system opts for 32-bit to support potentially higher application and algorithm requirements.

Microprocessor power consumption

The power consumption of microprocessors should be very low. For applications that rely on battery power and must operate for years without maintenance, power consumption is critical.

Other system considerations

Error checking

In transmit mode, the communication processor attaches the CRC to the payload and detects the CRC in receive mode. Payload data combined with 16-bit CRC can be encoded and deccoded using Manchester coding technology.

cost

Systems should use the fewest components and the smallest board size, because when cost is one of the key requirements, these are often the decisive factors. Avoid using discrete devices; consider integrated solutions composed of MCUs and wireless devices. This eliminates design challenges in interconnecting radios and MCUs, simplifies circuit board design, makes the design process more straightforward, shortens wire bonding, and makes it less susceptible to interference. By using a single chip that integrates the ARM® Cortex-M® MCU and radio transceiver, the number of circuit board components can be reduced, layout and routing simplified, and total costs lowered.

calibration

Executing calibration routines is one of the key steps in achieving high precision. A characteristic of pH solutions described by the Norst equation is that they are highly temperature-dependent. The sensor probe only provides a constant offset, which can be considered constant at all temperature levels. Because it is highly temperature-dependent, the system must have a sensor to determine the solution temperature.

Methods such as directly substituting into the Nönst equation can be used, but due to the non-ideal properties of the solution, some degree of error may occur. This method only requires measuring system imbalances and the temperature of unknown solutions. To determine the imbalance introduced by the sensor, a buffer solution with a pH of 7 is required. Ideally, the sensor should produce a 0 V output. The ADC reading will be the system offset voltage. Typical pH probe sensors can have offset up to ±30 mV.

In practice, another method is often used: using various buffer solutions to set certain points to construct general linear or nonlinear equations. In this routine, two additional NIST-certified and traceable pH buffer solutions are required. The pH values of these two additional buffer solutions should differ by at least 2.

The method for calibrating using buffer solution is as follows:

  • 第1步:从第一种缓冲溶液中移出电极组件并用去离子水或 蒸馏水清洗之后,将带温度传感器的pH探针浸入所选的第 二种缓冲溶液中。
  • 第2步:重复第2步,但使用第三种缓冲溶液。
  • 第3步:根据利用所选缓冲溶液测得的值建立方程。

Multiple mathematical equations can be used to derive calibration equations. One commonly used formula is the point-slanting linear equation. This equation uses two points obtained during calibration: P1 (Vm1, pH1) and P2 (Vm2, pH2), where P1 and P2 are measured using the selected buffer solution. To determine the pH value of an unknown solution, for a given point Px (Vmx, pHx), simple linear interpolation can be performed using the equation:

Equation 2

If there are multiple sets of points, first-order linear regression can be used to improve accuracy. Given n data points P0 (Vm0, pH0), P1 (Vm1, pH1), P2 (Vm2, pH2), P3 (Vm3, pH3), ... , Pn (Vmn, pHn), a general equation can be established using least squares method: pHx = a + b × Vmx, where b is the slope of the line and a is the intercept, with the following values:

Equation 3

and

Equation 4

The least squares approximation method can be extended to higher orders, such as second-order nonlinear equations. A general second-order equation can be expressed as: pHx = a + b × Vmx + c × Vmx². The values of a, b, and c can be calculated as follows:

Equation 5

This system of equations can be solved by substituting, eliminating, or using matrix methods to obtain the values of unknown variables a, b, c.

Hardware design solutions

Buffer amplifier

Under these given conditions, to isolate the circuit from the high-source resistor, a buffer amplifier with high input impedance and ultra-low input bias current is required. The low-noise operational amplifier AD8603 can be used as a buffer amplifier for this application. The low input current of the AD8603 can minimize voltage errors caused by bias current flowing through the electrode resistor. For a pH probe with a series resistance of 1 GΩ at 25°C, for a typical 200 fA input bias current, the offset error is 0.2 mV (0.0037 pH). Even at a maximum input bias current of 1 pA, the error is only 1 mV. Although not always required, protection, shielding, high insulating resistance posts, and other such standard Pian methods can be used to minimize leakage at the high-impedance input of the selected buffer.

analog-to-digital converter

Low-power ADCs are suitable for this application. The 16-bit Σ-Δ ADC ADC7792 supports precision measurement applications. It has a low-noise 3-channel input, and at a refresh rate of 4.17 Hz, the noise is only 40 nV rms. This device is powered by a 2.7V to 5.25V power supply, with a typical power consumption of 400 μA, and uses a 16-pin TSSOP package. Other features include a built-in bandgap reference voltage source with a typical 4 ppm/°C temperature drift, a maximum turn-off power of 1 μA, and a built-in clock vibrator, which reduces the number of devices and PCB space required.

Select the RF transceiver

Based on the above requirements, the ADuCRF101 is best suited for this application.

The ADuCRF101 is a fully integrated data acquisition solution designed for low-power wireless applications, operating at frequencies from 431 MHz to 464 MHz and 862 MHz to 928 MHz. It integrates communication peripherals, such as two SPI buses required for the application. On-chip provides 128 kB non-volatile Flash/EE memory and 16 kB SRAM. It is a single-chip solution integrating microcontrollers and transceivers, minimizing the number of devices and circuit board size.

The ADuCRF101 is powered directly by a battery with a voltage range of 2.2 V to 3.3 V, and the power consumption is as follows:

  • 280 nA(关断模式,非保留状态)
  • 1.9 μA(关断模式,处理器存储器和RF收发器存储器保留)
  • 210 μA/MHz(Cortex-M3处理器处于激活模式)
  • 12.8 mA(RF收发器处于接收模式,Cortex-M3处理器处于关 断模式)
  • 9 mA至32 mA(RF收发器处于发射模式,Cortex-M3处理器处 于关断模式)

Software implementation

Software is one of the key components of wireless transmission systems. It determines how the system operates and also affects system power consumption. The system has two software components: the protocol stack and the application stack. The protocol stack used is ADRadioNet—a wireless network protocol for the ISM band. It uses an IPv6 address and combines most of the features required for such solutions, such as low power consumption, multiple hops, end-to-end response, and self-healing. The application stack is software that accesses the pH reference design board via SPI.

To efficiently run these two software stacks, a simple scheduler is used. A non-preemptive scheduler handles protocol stack tasks, allocating a certain amount of time and resources for its functions. However, the number of tasks defined in the system is limited. For efficient operation, non-preemptive schedulers must complete the execution of defined tasks before their time runs out. For the two stacks in the system, a non-preemptive scheduler is suitable because the number of defined tasks assigned to it is limited.

epilogue

This article introduces different challenges and solutions in the design of pH wireless sensor monitoring. It has been proven that ADI data acquisition products can be used to address various challenges in pH measurement. The AD8603 operational amplifier or any equivalent ADI amplifier with high input impedance can be used to offset the sensor's high output impedance, providing sufficient shielding to prevent system loading. The ADuCRF101 data acquisition system IC provides a complete RF data transmission solution. High-precision data acquisition can be achieved using precision amplifiers and ADC hardware, or through software calibration, such as establishing a general equation through mathematical statistics, such as various curve fitting methods.

Reference circuit

1 Jenway Application Notes, Jenway High-Performance pH Electrode Evaluation. Jenway。 Jenway.