Make Your Own pH and Salinity Monitoring System

Make Your Own pH and Salinity Monitoring System © CC BY-NC

Real-time pH and salinity monitoring with LED indicators.

  • 37 respects

Components and supplies

Apps and online services

About this project

In this project, we will be making a pH and salinity/conductivity monitoring system with LED indicators. The pH and salinity sensors from Atlas Scientific are used. Operation is via I2C protocol and readings are displayed on the Arduino serial monitor.

The LEDs are turned on if the sensor readings go out of the predefined limits. In this case, the limits are as follows: If the conductivity reading goes over 500 μS/cm, the yellow LED will turn on; if the pH reading goes over 10, the red LED will turn on. The use of LEDs offers a demonstration of how sensor readings can be used to trigger other hardware.


  • Atlas Scientific does not make consumer electronics. This equipment is intended for electrical engineers. If you are not familiar with electrical engineering or embedded systems programming, these products may not be for you.
  • This device was developed and tested using a Windows computer. It was not tested on Mac, Atlas Scientific does not know if these instructions are compatible with a Mac system.


  • Real-time pH and salinity readings.
  • Can be expanded to include more types of Atlas's sensors.
  • Ability to use sensor readings to control other hardware.
  • Minimum programming skills needed unless you plan on modifying the project.

Step 1: Pre- assembly Requirements

a) Calibrate the sensors. Each sensor has a unique calibration process. Refer to the following: Ezo pH datasheet, Ezo EC datasheet.

b) Set sensors' protocol to I2C. Each sensor needs a unique I2C address. In accordance with the sample code for this project, the following addresses are used: pH sensor address is 99, and salinity sensor address is 100. For information on how to change between protocols and assign addresses, refer to this LINK.

The calibration and the switch to I2C MUST be done before implementing the sensors into this project.

Step 2: Assemble Hardware

Connect the hardware as shown in the schematic above.

You can use either an Arduino UNO or a STEMTera board. The STEMTera board was used in this project for its compact design where the Arduino is combined with the breadboard.

The 220Ω resistors limit the current to the LEDs, preventing them from blowing out.

The Inline Voltage Isolator isolates the pH circuit from the salinity circuit, thus protecting it from any electrical interference (noise) that may originate from the salinity sensor or other electronics in the system.

Step 3: Load Program Onto Arduino

The code for this project makes use of a customized library and header file for the EZO circuits in I2C mode. You will have to add them to your Arduino IDE in order to use the code. The steps below include the process of making this addition to the IDE.

a) Download Ezo_I2c_lib, a zip folder from GitHub onto your computer.

b) On your computer, open the Arduino IDE (You can download the IDE from HERE if you do not have it). In the IDE, go to Sketch -> Include Library -> Add.ZIP Library -> Select the Ezo_I2c_lib folder you just downloaded. The appropriate files are now included.

c) Copy the code from pH_EC_led_indicator onto your IDE work panel. You can also access it from the Ezo_I2c_lib zip folder downloaded above.

d) Compile and upload the pH_EC_led_indicator code to your Arduino Uno or StemTera board.

e) In your IDE, go to Tools -> Serial Monitor or press Ctrl+Shift+M on your keyboard. The serial monitor will open. Set the baud rate to 9600 and select "Carriage return"


  • The initial pH and EC of water are measured.
  • Some NaCl (salt) is added to the water, the conductivity reading rises and as soon as it crosses 500μS/cm the yellow LED turns on.
  • Then some pH UP solution is poured into the beaker, the pH increases and upon crossing 10 and the red LED turns on.
  • Finally, some pH DOWN solution is added and the pH decreases. When the reading is less than 10, the red LED turns off.



pH-salinity monitor wiring diagram
Ph ec wiring diagram qscta9nvth


Similar projects you might like

pH Dosing Pump

by Atlas Scientific

  • 55 respects

Arduino pH Meter

Project tutorial by Atlas Scientific

  • 43 respects

Water Quality Monitoring and Notification System

Project showcase by Emmanuel Ani

  • 224 respects

Plant Monitoring System

Project showcase by Ryan Gill

  • 261 respects
Add projectSign up / Login