How to Design an Analog Front End for a pH Probe

0 267 Medium

pH probes, with their bipolar voltage outputs and high output impedance, need signal conditioning through an analog front end to make them compatible with measurement circuits such as A/D converters.

We created this project in Go Configure™ Software Hub | Renesas. The complete design file can be found at Analog Front-End for pH Probe.gp. More application notes here.

Figure 1: pH Electrode General View

Introduction

 

People who work in healthcare, food and beverage, water treatment, chemical processing, agriculture, and environmental monitoring rely on pH meters to make decisions about hydrogen-ion activity (pH) in water-based solutions. The main component of any pH meter is a pH electrode, a pH probe. These probes need analog circuits to condition their high output impedance to A/D converters and make the signals unipolar.

 

A pH electrode assesses the activity of hydrogen ions (H+) and generates an electrical potential. Its functionality hinges on the concept that an electric potential arises when two liquids with contrasting pH values meet on opposing sides of a thin glass membrane. The pH electrode operates as a passive sensor, eliminating the need for any external excitation source, such as voltage or current. Categorized as a bipolar sensor due to its capacity to yield an output that fluctuates both above and below the reference point, it generates a voltage output that exhibits a linear correlation with the pH level of the solution under examination. The pH electrode’s source impedance is very high due to the substantial resistance of the thin glass bulb, typically within the range of 10 MΩ to 1000 MΩ. To design a circuit that effectively prepares the sensor signal for use by other components in the signal path, it is essential to consider the key characteristics of the sensor. Firstly, because the pH electrode generates a bipolar signal, and many applications operate on a single supply, it becomes necessary to perform signal level shifting. Secondly, given the high impedance of the electrode, a high-input impedance buffer becomes essential. Lastly, to account for variations in the electrode’s sensitivity to temperature, it is crucial to determine the temperature of the measured solution. Figure 2 shows a general schematic of the pH probe analog front-end.

Figure 2: General Schematic of Analog Front-End for pH Probe

The SLG47004 AnalogPAK from Renesas can perfectly cope with these pH probe interfacing challenges. In this application note, a 250 MΩ pH electrode is used. As a rule, operational amplifiers with a tiny bias current (about tens of femtoamperes or even less) are used as buffer amplifiers for such sensors. However, such precise amplifiers come at a price. The SLG47004’s unique Auto-Trim function allows to eliminate the offset error caused by bias current at a reasonable price. The transfer function of the pH electrode is:

where:

 

· pH(X) — pH of unknown solution(X)

· pH(S) — pH of standard solution = 7

· ES — electric potential at reference or standard electrode

· EX — electric potential at pH-measuring electrode

· F — the Faraday constant = 9.6485309*104 C mol-1

· R — the universal gas constant = 8.314510 J K -1 mol-1

· T — the temperature in Kelvin

 

The pH scale based on the transfer function for T = 25 °С has the form as shown in Figure 3.

Figure 3: pH Scale


 

GreenPAK Design

 

Figure 4 shows a general schematic of the analog front-end for the pH probe based on the SLG47004.

Figure 4: General Schematic of Analog Front-End for pH Probe Based on SLG47004

Figure 5 shows an internal design of the analog front-end for the pH electrode in the GreenPAK Designer software. To power on the device, the “Power p” button is used. The Delay macrocell DLY4 works as a debounce filter to eliminate switch bouncing. The DFF2 latches the voltage level and toggles it each time the button is pressed, transitioning between working mode and sleep mode.

Figure 5: GreenPAK Designer Schematic of Analog Front-End for pH Probe

pH Probe Interfacing

 

As evident from the pH scale, the signal from the electrode can reach the maximum negative value of -411 mV. Therefore, a 512 mV offset voltage is sufficient to ensure that the signal from the electrode is always positive. Amplifier OpAmp0 provides this 512 mV offset, achieved through the use of a high drive voltage reference macrocell called HD Buffer, which uses the shared voltage reference source Vref Opam0. The HD Buffer output produces an accurate 1.024 V, which is then halved by a 51 Ω resistor divider to yield 512 m . mplifier p mp0 is configured for unity gain and applies this 512 mV voltage to bias the reference electrode of the pH electrode, maintaining a low impedance. Consequently, the pH-measuring electrode produces a voltage superimposed upon this 512 mV bias voltage. Essentially, the circuit transforms the bipolar pH-electrode signal into a unipolar signal suitable for use in a single-supply system. The second amplifier, OpAmp1, is configured with a unity-gain setup, serving as a buffer for the pH electrode’s output. Once again, the inclusion of the high-input impedance buffer between the pH electrode and the measurement device ensures the circuit’s compatibility with a wide range of measurement instruments, including those with lower input impedance. In most scenarios, the voltage output from the pH electrode is sufficiently high for direct use, eliminating the need for extra amplification. However, if amplification becomes necessary, this circuit can be readily adjusted by introducing gain resistors to OpAmp1. The SLG47004 has a built-in temperature sensor to measure the temperature of the solution so that adjustments are made for the sensitivity variations due to temperature.

Auto-Trim

 

When using a pH meter for the first time, it is necessary to calibrate it. There is a special calibration button that initiates this process. In addition, it is recommended to perform periodic calibrations. For example, if the pH meter operates continuously, it should be calibrated after a week of operation. For calibration, the SLG47004 has a unique function called the Auto-Trim. The key macrocell responsible for the Auto-Trim is the Chopper Analog Comparator. The Chopper ACMP uses p mp1’s output signal as voltage feedback and compares it with the desired 512 mV. During calibration, the pH electrode should be immersed in a buffer solution with a neutral pH level. Buffer solutions maintain a constant pH value when small amounts of acid or base are added to them. In this scenario, OpAmp1’s output voltage should match 512 mV because the voltage at the pH electrode’s output is 0 mV. If these two voltages do not match, the Сhopper Сomparator adjusts the rheostat’s RH0 resistance by controlling the Up/Down and CLK rheostat inputs. At the end of the Auto-Trim, the voltage at OpAmp1’s output will be 512 mV.

 

To start the calibration, the “Calibrate” button is used. The Delay macrocell DLY3 functions as a debounce filter to eliminate switch bouncing. The CNT/DLY1 works as a One Shot, creating a pulse of 250 ms duration because the maximum duration of the Auto-Trim process is calculated as rheostat code divided by the clock rate, which equals = 512/2048 = 250 ms. The trim process begins with the rising edge on the Set input of Rheostat 0. After receiving a ready signal from the analog blocks, the clock pulses for the internal counter of the rheostat are enabled. The counter starts to count up or down depending on the level at the Up/Down input. Figure 6 shows the auto-trim waveforms.


 

Figure 6. Waveforms Illustrating Auto-Trim Process

The internal counter stores the current value of the rheostat. This value can be programmed into the GreenPAK’s MTP NVM by setting logic HIGH at the Program input. The Program input is rising edge sensitive and has no effect when the Auto-Trim process is active. To meet these requirements, a Falling Edge Detector is used to generate a short pulse on the falling edge of the One-Shot pulse. This ensures that programming takes place after the Auto-Trim is completed. The SLG47004’s ability to program and store rheostat value is very useful in this situation because it allows for the use of the stored rheostat value each time the pH meter is turned on, without the need to perform the Auto-Trim every time.

Testing

 

The system was initially calibrated using the Auto-Trim function with a buffer liquid of pH 7 (neutral), which resulted in a 512 mV output (see Figure 6). To test the meter readings, a buffer liquid with a pH value of 4 was used, resulting in a measured voltage of 676 mV. Therefore, 676–512 = 164 mV is the voltage attributed to the pH electrode. Because the electrode’s sensitivity at 25°C is 59.16 mV, then 164/59.16 = 2.77. As neutral liquid has a pH level of 7, the measured liquid’s pH is 7–2.77 = 4.23 pH.

Figure 7: Front-End Output Waveforms for Different pH Values

Considering that the buffer fluid may have some error (often indicated on the solution bottle), the electrode has its offset error, and no temperature compensation was applied, the results are reasonably acceptable. Test results for distilled water (pH = 7), diluted water with acid (pH = 4), and diluted water with base (pH = 11) are shown in Figure 7.

Conclusion

 

The Renasas’ AnalogPAK SLG47004 is one of the standout representatives of the GreenPAK family, characterized by advanced analog features. It is especially useful in analog front-end applications, even when there’s a need to substitute an OpAmp with a very low bias current or offset voltage. Such amplifiers are characterized by a high price, unlike the Analog PAK. The SLG47004 features a unique Auto-Trim function that effectively minimizes bias error and can be used in applications such as an analog interface for a pH probe, which is known for its high output impedance, leading to the significant offset voltage. Moreover, the SLG47004 offers in-system programmability, streamlining the development process. This capability allows to place of an unprogrammed IC onto the printed circuit board and facilitates convenient configuration modifications or the addition of new functionalities to these devices during the production phase by programming the multi-time programmable memory. Especially considering that the SLG47004 still has many unused macrocells in this design.

License
All Rights
Reserved
licensBg
0