HOMELAB-pH

The HomeLab-pH revision 1.1 is a circuit board intended for pH and ORP measurements.

Features

HomeLab-pH front view HomeLab-pH back view with smartphone displaying user interface.

The HomeLab-pH board lacks a processor, so it has to be connected to an external CPU board to do the calculations. Here we will show how to use HomeLab-pH as an expansion board on top of Raspberry Pi (RPi) or a compatible mini-computer. You can download the software used to read and control the pH meter. Of course, firstly you have to put the board on top the Raspberry Pi. See the mounting instructions.

To do pH measurements a combination pH-electrode and calibrating buffers have to be available in addition to a RPi computer.

If you intend integration with a different processing board, see the more technical description of the board capabilities.

Specification

This is a specification of board revision 1.1.

Board

input voltage range -3000 mV ÷ 3000 mV
supply voltage 5 V DC
max. supply current 25 mA
working temperature range 0 ÷ 50°C (32 ÷ 122°F)
working relative humidity range up to 90 % (non-condensing)
dimensions, W:H:D 56 : 23 : 20 mm,
(2.20 : 0.91 : 0.79 in)

Input voltage conversion inaccuracy

input voltage range inaccuracy
-3000 ÷ -2048 mV less than 2.00 mV
-2048 ÷ -1024 mV less than 1.00 mV
-1024 ÷ -512 mV less than 0.50 mV
-512 ÷ 512 mV less than 0.25 mV
512 ÷ 1024 mV less than 0.50 mV
1024 ÷ 2048 mV less than 1.00 mV
2048 ÷ 3000 mV less than 2.00 mV

Temperature sensor

response time at 90% 12 s (water, room temp., stirred)
inaccuracy not more than 0.5°C ( 0.9°F )
working range 0 ÷ 80°C (32 ÷ 176°F)
tip diameter ø 6 mm
cable length about 1 m ( 3'3" )

The following data concerns measurements. This data is valid when the board is used with the software provided at our site.


pH range 0 ÷ 14 pH
pH resolution 0.01 pH
pH inaccuracy * not more than 0.05 pH (temperature adjusted)
temperature resolution 0.1°C ( 0.1°F )

* Note: When using a good meter, as HomeLab-pH is, the inaccuracy of pH measurements will then be mainly affected by three factors: the quality of the pH-electrode, the precision of the calibration and the temperature difference between the measured sample and the calibration buffers. Here a general value for inaccuracy is given. It refers to measurements made with a good quality electrode, calibrated by a standard 2-point procedure. Also, the buffers inaccuracy is assumed to be not greater than 0.02 pH units and their temperature difference with the sample to be less than 2.5°C.

Mounting on Top of Raspberry Pi Mini-computer

HomeLab-pH mounted on RPi - back view HomeLab-pH mounted on RPi - front view

CAUTIONAvoid to mount or dismount the board when the RPi is powered. You are risking damaging the HomeLab-pH board. Always switch off the minicomputer power supply in advance.

Please, follow strictly the directions below.

  1. Power OFF the Raspberry Pi.
  2. RPi has 4 mounting holes.HomeLab-pH spacers We use only two of them to mount the HomeLab-pH board. Fix the two supplied spacers to the RPi board mounting holes located on the side opposite to its USB and LAN ports. To do this use the screws provided and a screwdriver.
  3. Put RPi on a flat surface.
  4. With your thumbs and pointer fingers hold horizontally the HomeLab-pH board by its 4 edges so that its black socket points downwards.Holding HomeLab-pH (Try not to touch any of the soldered elements.) Lower down the board carefully so as to insert the first 5 rows of the RPi pins into the holes of the board's black socket. If the board is inserted correctly it will lie with its 2 mounting holes being just on top of the spacers (see 2).
  5. Place the remaining 2 screws through the board mounting holes and screw them into the spacers' holes. When finished check that the board is solidly mounted on the RPi.
  6. Insert the temperature sensor plug into the mini-DIN socket of the board. Please, do not apply excessive force and make sure the arrow mark on the plug is on top.
  7. HomeLab-pH mounted - back view HomeLab-pH mounted - top viewPower on the Raspberry Pi. You should see the green light of the LED on the HomeLab-pH board.

Technical Description

This is a technical description of board revision 1.1.

In this section we will give some details about the board. We hope they will be useful for those of you which intend to connect the board to a processing unit other than those supported by the software presented on this site.

Data from three sources is needed to calculate the pH value of a sample - the voltage generated by the pH-electrode, the temperature of the sample and two board specific coefficients available for retrieving from the on-board EEPROM chip. These data sources are shown on the functional block diagram below.

HomeLab-pH block diagram

The board has two sensor sockets - a BNC socket for the pH-electrode and a mini-DIN for the temperature sensor. The voltage coming from the pH-electrode is amplified and then digitalized by an ADC chip. An outer processor board should read this data by setting properly the ADC chip and converting the readings to pH. As the pH values are temperature dependant some additional correction should be calculated according to the data coming from the temperature sensor.

Functional characteristics vary among the boards due to small differences between the elements used for the production. Although minute these differences do impact the final pH value. So the individual differences of each board are accounted for by two coefficients written in the EEPROM chip.

Pinout

The pinout scheme of the header to couple the CPU board is shown below. 3 of the 10 pins are not connected (NC). The rest follow the pins pattern of the Raspberry Pi header (P1).

HomeLab-pH pinout diagram

pin #2 This is the power supply pin. The board is powered with 5V DC.
pins #3 & #5 These are for the I2C data exchange with the board's ADC and EERPOM chips. They are used to read the output voltage of the pH-electrode.
pin #7 This one is for reading the digital temperature sensor by means of 1-wire protocol.
pin #10 There are a button and a LED on board. The LED can be set ON/OFF through this pin. Additionally, the button state can be read.

This header is stackable and provides a stacked board with direct access to the functionality of the RPi pins. So pins #1 and #4, although not connected to the HomeLab-pH board, can still be used to power the stacked one with 3.3V and 5V respectively.

Pins Voltage

CAUTIONAlthough the HomeLab-pH board is powered with 5 V, pins #3, #5, #7 and #10 are powered internally by 3.3 V. They are NOT 5V-tollerant.

pH-Electrode Voltage Conversion

pH-electrode generated voltage is converted digitally by an ADC-chip. The digitalized voltage can be accessed by reading the output buffer of the chip. This can be done by means of I2C serial protocol. Note that the chip address is 0x49. The conversion data corresponds to differential voltage measurement between Ain0 and Ain1 channels. For detailed instructions how to get the data consult the ADS1015 data-sheet.

As stated above for precise measurements the individual HomeLab-pH board specifics should be taken into account. This is possible by applying simple formula to the digitalized output voltage.

voltage =
raw_voltage - offset transmission

where
voltage   is the value to be used in pH calculation,
raw_voltage   is the output voltage collected by reading the ADC chip buffer and
offset and transmission   are coefficients.

We measured the offset and transmission of each board and put the values in the on-board EEPROM memory. They may be accessed by means of the I2C protocol. Contact us for further details.