Christian
Published © LGPL

Professional Hydroponics pH and DO Monitoring

Build a monitoring system that will measure your pH and DO levels.

IntermediateFull instructions provided1 hour1,523

Things used in this project

Hardware components

IO Expander Bundle
×1
pH Kit
Atlas Scientific pH Kit
×1
Dissolved Oxgyen Probe
Atlas Scientific Dissolved Oxgyen Probe
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Professional Hydroponics DO Wiring Diagram

How to connect your DO sensor

Professional Hydroponics pH Wiring Diagram

How to connect your pH sensor

Code

Professional Hydroponics pH and DO Monitoring

C/C++
Monitor your pH and DO levels in your Hydroponics System
const char ONEWIRE_TO_I2C_PH[] = "i2s56";    // I2C BUS - pH Sensor *** Change 56
const char PH_SENSOR[] =        "iw63\"r\""; // pH Sensor
const char PH_SLEEP[] =         "iw63\"Sleep\""; // pH Sleep
 
const char ONEWIRE_TO_I2C_DO[] = "i2s08";    // I2C BUS - DO Sensor *** Change 08
const char DO_SENSOR[] =        "iw61\"r\""; // DO Sensor
const char DO_SLEEP[] =         "iw61\"Sleep\""; // DO Sleep
 
void loop() {
 
...
 
  long rc;
  float pH,DO;
 
...
 
        // Check for Atlas Scientific pH probe
        pH = -1;
        if (SerialCmdNoError(ONEWIRE_TO_I2C_PH))
        {
          if (SerialCmdNoError(PH_SENSOR)) {
            delay(900);
            SerialCmd("ia");
            SerialReadInt(&rc);
            if (rc == 1) SerialReadFloat(&pH);
            SerialReadUntilDone();
            SerialCmdDone(PH_SLEEP);
          }
        }
        // Check for Atlas Scientific DO probe
        DO = -1;          
        if (SerialCmdNoError(ONEWIRE_TO_I2C_DO))
        {
          if (SerialCmdNoError(DO_SENSOR)) {
            delay(600);
            SerialCmd("ia");
            SerialReadInt(&rc);
            if (rc == 1) SerialReadFloat(&DO);
            SerialReadUntilDone();
            SerialCmdDone(DO_SLEEP);
          }
        }
 
...
 
}

Credits

Christian

Christian

23 projects • 132 followers

Comments