NOTE: pH Probe does not come with this Click board™. If you are interested in a probe we offer, you can find Plastic BNC-connector pH Electrode in our shop.
How does it work?
pH 2 Click is based on the MCP607, a low-bias current operational amplifier from Microchip. This Click board™ operation is based on measuring hydrogen ion activity and produces an electrical potential or voltage. An electric potential develops when two liquids of different pH come into contact at opposite sides of a pH electrode thin glass membrane. The pH electrode represents a passive sensor, which means no excitation source (voltage or current) is required. It is classified as a bipolar sensor because its output can swing above and below the reference point. This board is a perfect solution for a wide variety of pH-sensing applications, including water treatment, chemical processing, medical instrumentation, and environmental test systems.
pH 2 Click is used to detect the concentration of hydrogen ions in a solution and convert it into a corresponding usable output signal. Because the pH electrode produces a bipolar signal, the electrode signal is first level shifted by the MCP607, a low bias current Op Amp set up in a unity-gain configuration with configurable reference for its calibration. Second, due to the high impedance of the electrode, another Op Amp inside the MCP607 provides the required high-input impedance buffer. A buffered signal can be then converted to a digital value using the MCP3221, a successive approximation A/D converter with a 12-bit resolution from Microchip using a 2-wire I2C compatible interface, or can be sent directly to an analog pin of the mikroBUS™ socket labeled as AN. The selection can be performed using an onboard SMD switch labeled OUT SEL, placing it in an appropriate position marked as AN or ADC.
It is important to note that a pH electrode’s sensitivity varies over temperature. For this reason, it is possible to add the DS18B20, 1-wire thermometer via the DQ terminal to the pH 2 Click, whose temperature can be monitored via the DQ pin on the mikroBUS™ socket. In addition, the user can digitally monitor different statuses in operation through the ST1 and ST2 pins on the mikroBUS™ socket or through visual detection on the STAT1 and STAT2 LEDs.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Environmental
Applications
Can be used for measuring pH in various applications, including water treatment, chemical processing, medical instrumentation, and environmental test systems
On-board modules
MCP607 – low-bias current dual operational amplifier from Microchip
Key Features
High stability and accuracy, flexible calibration, works with any off-the-shelf pH probe, temperature compensation with additional thermometer, selectable analog or digital output, user-configurable LED indicators, and more
Interface
Analog,I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on pH 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
LD2-LD3 | STAT1-STAT2 | – | User-Configurable LED Indicators |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
SW1 | OUT SEL | Right | Output Signal A/D Selection AN/ADC: Left position AN, Right position ADC |
VR1 | VREF | – | Calibration Potentiometer |
pH 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Software Support
We provide a library for the pH 2 Click as well as a demo application (example), developed using Mikroe compilers. The demo can run on all the main Mikroe development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for pH 2 Click driver.
Key functions
-
ph2_calibrate
Ph 2 calibrate function. -
ph2_calculate_ph
Ph 2 calculate pH value function. -
ph2_calibrate_offset
Ph 2 calibrate offset function.
Example Description
This library contains API for pH 2 Click driver. The library initializes and defines the I2C bus drivers or ADC drivers to read data from pH probe.
void application_task ( void )
{
float pH_val = 0;
ph2_calculate_ph( &ph2, &pH_val );
log_printf( &logger, " pH value: %.3f rn", pH_val );
log_printf( &logger, " ================================ rn" );
Delay_ms( 1000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.pH2
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all Mikroe compilers.
mikroSDK
This Click board™ is supported with mikroSDK – Mikroe Software Development Kit, which needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
For more information about mikroSDK, visit the official page.