pH FeatherWing Hardware

pH FeatherWing Hardware

The pH FeatherWing is a single channel pH electrode amplifier based on Texas Instrument's LMP7721 ultra low input bias current (3 fA) precision operational amplifier. The design of the pH electrode amplifier closely follows Texas Instrument's "AN-1852 Designing With pH Electrodes" application note. It is compatible with Adafruit's FeatherWing specification and will work with most Feather development boards which adhere to Adafruit's Feather specification. In addition to the pH electrode amplifier the pH FeatherWing includes a 3-position screw terminal connector for attaching a waterproof DS18B20 temperature probe for measuring temperature. The temperature measurements can be used to compensate for changes in pH electrodes sensitivity due to changes in temperature.

Sensor connections

The pH FeatherWing provides connectors for a pH electrode and a DS18B20 temperature sensor as shown in the figure below.

pH_feather_sensor_connections-1

  • The pH electrode connects via a standard BNC connector and is compatible with most standard pH-probes.
  • The temperature sensor connects via a 3 position screw terminal connector and provides ground (GND), power (3.3V) and data input/output connections.

Feather development board connections

The pH Feather connects to four pins on the feather development board as shown in the figure below.

pH_feather_pin_connections_scale

  • PH_VOUT, the amplified pH electrode output voltage, is connected to analog input A2
  • TEMP_DATA, the data input/output from DS18B20 temperature sensor, is connected to digital pin D11
  • BUTTON_1, the "pH 7" button, is connected to digital pin D12
  • BUTTON_2, the "pH 4/10" button, is connected to digital pin D13

pH electrode voltage

The pH electrode produces a bipolar signal from approximately -500mV to 500mV which decreases with increasing pH. The formula for the output voltage, which can be derived from the Nernst equation, is given by

$$
V = \frac{(7 - \mathrm{pH}) \mathrm{R} \mathrm{T} \ln(10)}{ \mathrm{F}}
$$

where

  • $\mathrm{R}$ is universal gas constant = 8.314510 $\mathrm{J} \mathrm{K}^{-1} \mathrm{mol}^{-1}$,
  • $\mathrm{F}$ is the Faraday constant = 9.6485309*$10^4$ $\mathrm{C} \thinspace \mathrm{mol}^{-1}$,
  • $\mathrm{T}$ is the temperature of the solution in Kelvin.

After plugging in the values for the Faraday and universal gas constants this equation reduces to

$$
V \approx 0.198 \mathrm{e}^{-4} \thinspace \mathrm{T} \thinspace (7 - \mathrm{pH}).
$$

From the equation above we can see that the output voltage is proportional to both the difference in pH of the solution (from pH=7) and the temperature of the solution.

If the temperature of the solution is held constant we expect to see a simple linear relationship between pH and the electrode output voltage. For example, at a temperature of 25 degrees C (298.15 K) this equation reduces to

$$
V \approx 0.059 \thinspace (7 - \mathrm{pH})
$$

A representative example of the output voltages at 25 degrees C is given in the table below.

pH electrode (mV)
0 414
4 177
7 0
10 -177
14 -414

The sensitivity of the pH electrode output voltage to changes in temperature can be examined by looking at a plot of the output voltage at several different temperatures. The figure below shows the output voltage at temperatures of 0, 25, 100 degrees C.
ph_voltage

Note, when using a real pH electrode the measured output voltage will very likely differ somewhat from the theoretical predictions given above. For this reason, in order to get the best results, it is always a good idea to produce your own calibration specific to your pH electrode. However, the theoretical predictions above provide an excellent guide for what output voltages we can expect from the pH electrode as a function of pH and temperature.

pH electrode amplifier

The analog inputs on the Feather development boards have a 0-3.3V range input range. Whereas the pH electrode produces a bipolar signal in the -500mV to 500mV range. For this reason the output signal of the pH electrode needs to be level shifted into a range appropriate for the Feather development boards analog input. In addition, the pH electrode has a very high impedance and therefor requires a high input impedance buffer amplifier prior to sending the signal to the feather's analog input.

The schematic for the pH FeatherWing amplifier is shown in the figure below.

pH_electrode_amplifier_schem

The pH electrode amplifier consists of two operational amplifiers (or op amps) U1 and U2. The first op amp, U1, set up in a unity gain configuration, level shifts the pH electrode's output voltage. It does this by biasing the reference electrode of the pH electrode by 1.65V (PROBE_VGND). The second op amp, U2, is also setup in a unity gain configuration. Its purpose is to provide a high impedance buffer for the pH electrode signal (PROBE_OUT). The output signal from U2 (PH_VOUT) is sent to the analog input, A2, on the Feather development board.

Both of the op amps, U1 and U2, are selected to be LMP7721 from Texas Instruments which has a very low input bias current of 3fA. A low input bias current is desirable in this application because a large voltage error can be produced by a small input bias current due the high impedance of the pH electrode.