MAKE YOUR OWN PH AND SALINITY MONITORING SYSTEM WITH LED INDICATORS
by AtlasScientific in Circuits > Arduino
15602 Views, 19 Favorites, 0 Comments
MAKE YOUR OWN PH AND SALINITY MONITORING SYSTEM WITH LED INDICATORS
![ph-ec.png](/proxy/?url=https://content.instructables.com/FV9/2YHM/JVWNOARA/FV92YHMJVWNOARA.png&filename=ph-ec.png)
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.
WARNINGS:
- 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.
ADVANTAGES:
- Real-time pH and salinity readings.
- Can be expanded to include more types of Atlas's EZO sensors.
- Ability to use sensor readings to control other hardware.
- Minimum programming skills needed unless you plan on modifying the project.
MATERIALS:
- 1- Arduino Uno or STEMTera board
- Breadboard (If a STEMTera board is not being used)
- Jumper wires
- 1- pH sensor kit
- 1- salinity sensor kit
- 1- Inline voltage isolator
- 2- LEDs
- 2- 220 Ω resistors
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.
ASSEMBLE HARDWARE
![pH-EC-wiring-diagram.png](/proxy/?url=https://content.instructables.com/F1U/0BQU/JVR6058B/F1U0BQUJVR6058B.png&filename=pH-EC-wiring-diagram.png)
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.
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"
DEMONSTRATION
![pH and Conductivity monitoring](/proxy/?url=https://content.instructables.com/FCR/YQOZ/JZ93UW0B/FCRYQOZJZ93UW0B.jpg&filename=pH and Conductivity monitoring)
Summary of the experiment shown in the video:
- 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.