The HomeLab-pH is a circuit board for pH measurements. It is used in tandem with a computing module, usually - Raspberry Pi mini-computer, Arduino controller or ESP8266 module.
The HomeLab-pH board lacks a processor, so it has to be connected to an external CPU board to do the calculations. This site shows how to connect to and use HomeLab-pH with an Arduino controller or as an expansion board to a Raspberry Pi (RPi) or compatible mini-computer.
There is a more detailed description of the board capabilities to help those aimed at an integration with different types of processing boards. Note that, to do pH measurements, a combination pH-electrode and calibrating buffers have to be available in addition to a processing unit.
For reading, controlling and calibrating the pH module we prepared various software packages to be used with Arduino controller or with Raspberry Pi and its compatibles. Evidently the packages are somewhat different in their capabilities.
It is somewhat tricky to measure pH in volumes where immersed appliances leak direct electric current into the liquid. Due to the very high input impedance of the pH-probes these currents, even small, may impact the measurement and result in unstable or shifted pH value. This is the case with aquariums where immersed air or water pumps, heaters and lighting leak small electric currents through their insulating shells.
Aquarium owners or hydroponics enthusiasts interested in on-line pH-measurement may benefit of the functionality added by our HomeLab isolator module. When coupled with HomeLab-pH it assists the pH measurement by effectively filtering the interfering currents of the environment.
It is a small size circuit board, which is to be mounted between the computing board (PRi, Arduino) and the HomeLab-pH module.
|input voltage range||-800 mV ÷ 2048 mV|
|supply voltage||3.3 to 5 V (through the VCC pin)|
|GPIO voltage (VCC)||equal to the supplied voltage|
|max. supply current||25 mA|
|working temperature range||0 ÷ 50°C (32 ÷ 122°F)|
|working relative humidity range||up to 90 % (non-condensing)|
|board dimensions, W:D||56 : 20 mm, (2.20 : 0.79 in)|
|overall dimensions, W:H:D||57 : 23 : 41 mm,
(2.20 : 0.91 : 1.61 in)
|input voltage range||inaccuracy|
|-800 ÷ -512 mV||less than 0.50 mV|
|-512 ÷ -256 mV||less than 0.25 mV|
|-256 ÷ 256 mV||less than 0.13 mV|
|256 ÷ 512 mV||less than 0.25 mV|
|512 ÷ 1024 mV||less than 0.50 mV|
|1024 ÷ 2048 mV||less than 1.00 mV|
|response time at 90%||max 25 s (typical 15 s, water, 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 5°C. If calibration buffers of ± 0.01 pH are used, the inaccuracy of the measured pH value will be as low as 0.03 pH.
You may purchase a HomeLab-pH or a HomeLab-Isol module at eBay or Tindie. Current HomeLab-pH revision is 3.
HomeLab-pH optionally complemented by:
HomeLab-Isol module and/or
stand for Raspberri Pi Zero and/or
temperature sensor with longer cable.
Purchase of a HomeLab-pH module includes:
If both HomeLab-pH and HomeLab-Isol are purchased the following is included as well:
When purchased alone the HomeLab-Isol comes with a spacer (12 mm), screw (M2.5) and a nut.
The spacers, screws and nuts are made of either brass or polyamide.
CAUTIONAvoid to mount or dismount the HomeLab-pH board when powered. You risk to damage the meter. Always switch off the data processing unit in advance.
Please, follow strictly the directions below.
If an isolator module (HomeLab-Isol) is to be used as well, prepare it to be placed between the RPi and the HomeLab-pH module. First screw tightly two of the shorter spacers through the module's mounting hole.
Instead, if a HomeLab-Isol module is prepared at point 1, mount it on the left-hand mounting hole of the RPi. Insert the pins of the first 5 rows of the RPi header into the module's JP1 female header. The longest spacer fix on the right-hand side mounting hole.
Note that to control and read the HomeLab-pH board we provide free software for Arduino IDE. The software is applicable both for Arduino controllers and ESP8266 modules. The IDE is also offered free at their site.
CAUTION This chapter is about wiring HomeLab-pH board Revision 3 to Arduino controller. For previous revisions visit Rev.2 . The revision number is printed on the bottom side of the board.
There is a huge family of Arduino boards and their clones currently on sale. And while even some more are waiting for their next job in our drawers, most but not all controllers are suitable to read HomeLab-pH data. The meter and its companion software would meet those covering the following minimum spec:
These hardware requirements exclude from support the following Arduino boards (non-exhaustive list): Gemma, NG, Mini V3 & V4, Nano V2, Diecimila, Duemilanove (ATmega168), Fio, Esplora, Pro (3.3V).
Pictures of connected devices and diagrams of the wiring are shown below. Note that any set of 4 Arduino digital pins are suitable to connect the board's SDA, SCL, 1-wire and LED pins. The wirings shown in the diagrams are a good choice because 1.the pins are conveniently positioned for a ribbon cable connection and 2.their GPIO addresses are coded in our software (these can be altered if needed).
Wirings with a HomeLab-Isol digital isolator mounted in-between are shown separately as this module works at 5 V and requires an additional wire.
Click/tap on the images for a larger view.
HomeLab-pH bottom-side wiring. This wiring scheme is applicable for models Nano V3, Mini V05 and Micro.
HomeLab-pH connected to Arduino Uno by the female part of its stackable JP1 connector. This wiring scheme is applicable for models Uno, Mega, BT, Ethernet, Leonardo, Pro (5v) and Duemilanove (ATmega328).
The wiring scheme is applicable for models M0, Zero, Due and Tian. It is the quite the same as that for the Uno the only deference being module's VCC connected to Arduino 3.3 V power pin instead to 5 V.
Note the additional wiring needed to supply 5V to the POWER pin of the HomeLab-Isol JP1 connector.
CAUTION During the wiring be careful to switch off in advance the power of the controller. Pay particular attention to the HomeLab-pH power pins: GND and VCC. We recommend to connect the GND line before any other line is connected. The VCC pin should be connected to +3.3V or +5V depending on VccIO (VddIO) of the Arduino controller. Supplying voltage lower or higher than this can damage either the board or the controller. An error in wiring a digital line most probably will result only in bad communication which the software can detect.
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 board specific data available for retrieving from the on-board EEPROM chip. These data sources are shown on the functional block diagram below.
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 when low inaccuracy of the measurement is the target. So the individual differences of each board are accounted for as we measure and put two coefficients in an on-board EEPROM chip.
The pinout scheme of the header to couple the CPU board is shown below. Some of the 10 pins are not connected (NC) to the board circuit though 2 of these connect to a stacked board. The rest of the pins follow the pattern of the Raspberry Pi header (P1).
|pin #1||The VCC pin. The board logic is powered through this pin from as low as 3.3 V (RPi) to up to 5 V (Arduino Uno).|
|pins #2 & #4||These pins are not connected but may transmit power or signal from the source board below the module to the eventually stacked one. This way 5 volts are supplied when the board rides Raspberry Pi or HomeLab-Isol module.|
|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 through it.|
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 to achieve precise measurements the individual specifics of each HomeLab-pH board should be taken into account. We do it by measuring in the lab the board's offset and transmission. We then put the measured values in an on-board EEPROM memory. Using these values our software applies simple formula to correct the biased voltage reading from the sensor:
voltage is the value to be used in pH calculation and
raw_voltage is the digitalized output voltage collected by reading the ADC chip buffer.
The software reads the offset and transmission values using the I2C protocol. Contact us for further details.
We developed the HomeLab-Isol module to assist the HomeLab-pH in giving stable and unaltered values when measuring pH in volumes with immersed electrical appliances. There the HomeLab-Isol effectively isolates both the power and the digital lines of the HomeLab-pH module.
The module features 4 isolated bidirectional digital lines as well as an isolated power source. The lines are open-drain with 10K pull-up to VCC at the direct and at the isolated sides.
The module has input (JP1) and output (JP2) connectors placed opposite to each other on the direct and isolated sides respectively. Below are given the descriptions and the schemes of the connectors' pinout.
|Direct side||Isolated side|
VCCrange of +3 to +5 VDC
VCC-iso+3.3 ± 0.1 VDC
if +5V is required as VCC, it is safe to shortcut this to 5V-iso (supply voltage)
POWER (supply voltage)+5 VDC
5V-iso (supply voltage)+5 ± 0.2 VDC
IO1, IO2, IO3 and IO43 mA current sink capability
1000 kHz operation
with 10K pull-up to VCC
IO1-iso, IO2-iso, IO3-iso and IO4-iso30 mA current sink capability
1000 kHz operation
with 10K pull-up to VCC-iso
Isolation power characteristicsTotal output current VCC-iso + 5V-iso: 200 mA
Isolation voltage: 1000 VDC
Isolation resistance: 1000 MΩ (min)
As "standard" the input of the IO4 digital line is pin 10 of the JP1 connector but the line can have an alternative input source. Next to JP1 there is a 2-pins header which normally is short-cut with a jumper. If alternative source is need remove the jumper and connect the source as shown on the picture.
This feature has been introduced since Rev 1.1 for applications which need pin 10 of the Paspberry Pi header free for serial connection.
A special stand is available if Raspberry Pi Zero is to be used as a computing unit.