What are you looking for?
Log in Sign up
Projects News Contests Events Videos Workshops
Overview Atlas Scientific
Published June 27, 2019 © CC BY-NC
Things
Story
Advantages
Make Your Own pH and Salinity
Step 1: Pre- assembly
Requirements
Monitoring System
Step 2: Assemble Hardware Real-time pH and salinity monitoring with LED indicators.
Step 3: Load Program Onto
Arduino Intermediate Protip 2 hours 22,541 Ad
Demonstration RELATED CHANNELS AND TAGS
Schematics
Code
Credits
Comments (0)
1 2 3 Join Hackster to access over 26,000+ free projects featuring Arduino and more. Sign up
32 aquaponics aquarium
environmental sensing
hydroponics sensor
RELATED PROJECTS
DIY pH Dosing Pump
Temperature
Compensating Atlas's
Salinity Sensor
DIY Benchtop pH Meter
Things used in this project Arduino pH Sensor
Calibration
Hardware components
Connecting Multiple
Sensors to One Arduino
Arduino UNO × 1 Uno Serial Port
View more related projects
Breadboard (generic) × 1
Inline Voltage Isolator × 1
LED (generic) × 2
Resistor 220 ohm × 2
Jumper Wires × 1
Atlas Scientific pH Sensor Kit × 1
Atlas Scientific Conductivity Sensor K1.0 Kit × 1
Atlas Scientific EZO™ Inline Voltage Isolator × 1
Software apps and online services
Arduino IDE
Story
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. You can modify this project to include
other EZO sensors such as the temperature (RTD), oxidation-reduction
potential (ORP) and dissolved oxygen (DO).
Advantages
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: pH calibration, salinity calibration. If you are using other sensors
refer to their respective datasheet which can be found on the Atlas Scientific
website.
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. For more information on isolators refer to this LINK.
Datasheets: EZO pH, EZO EC, Inline Voltage Isolator
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 ->
[Link] 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 pH and EC reading should now be outputting to the serial monitor.
Demonstration
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.
Schematics
pH-salinity monitor wiring diagram
Code
pH-salinity monitor code C/C++
26 [Link](); //start the I2C
27 [Link](9600); //start the serial communica
28 pinMode(PH_led, OUTPUT); //set pin of pH led as outpu
29 pinMode(EC_led, OUTPUT); //set pin for EC led as outp
30 }
31
32
33 void loop() {
34 if (reading_request_phase) { //if were in t
35
36 //send a read command. we use this command instead of PH.send_cmd(
37 //to let the library know to parse the reading
38 PH.send_read_cmd();
39 EC.send_read_cmd();
40
41 next_poll_time = millis() + response_delay; //set when the
42 reading_request_phase = false; //switch to th
43 }
44 else { //if were in t
45 if (millis() >= next_poll_time) { //and its time
46
47 receive_reading(PH); //get the read
48 if(PH.get_last_received_reading() > 10) {
49 digitalWrite(PH_led,HIGH); //if condition
50 }
51 else{
52 digitalWrite(PH led LOW); //if condition
Credits
Atlas Scientific
30 projects • 117 followers
Atlas Scientific specializes in building laboratory grade sensing
equipment for robots, appliances, and industrial control systems.
Follow Contact
Comments
Please log in or sign up to comment.
Start the conversation!
Similar projects you might like
Solar-Powered Compost Water Quality Monitoring and Arduino Salinity Sensor Plant Monitoring System
Monitoring System and Database Notification System Calibration
kaylakim20 Emmanuel Ani Atlas Scientific Ryan Gill
64 12K 201 101K 3 3.7K 229 77K
Baby-Pram Monitoring System IoT Based Simple Air Pollution The Atlas IoT Monitoring Station Professional Hydroponics pH and
Monitoring System DO Monitoring
IP vishnutheerth_e_p Atlas Scientific Christian
15 11K 3 4.8K 16 4.7K 2 592
More cool stuff Legal thingies About us We're fairly social people [Link], an Avnet Community © 2021
Community members Terms of Service Hackster's story Facebook
Other community hubs Code of Conduct Hackster for Business Instagram
Privacy Policy Support Center LinkedIn
Visit our Avnet family Privacy Policy for California Brand Resources Twitter
Avnet Residents Sitemap YouTube
Element14 Cookie Policy
Newark