How to integrate two pumps for water solution with esp32 and ph sensor

Subject: ESP32 pH Sensor Project with Water Pump Integration

Hello Arduino Forum,

I hope this message finds you well. I would like to share and seek assistance with my ongoing project involving an ESP32-based pH sensor. The current state of the project is a functional pH sensor using the ESP32 platform. The next step is to integrate two water pumps to manage a water solution effectively.

image

Hardware Used:

  • ESP32
  • Gravity: Analog pH Sensor/Meter Kit V2
  • Dupont cable
  • USB micro type B cable

Connection Details:

My connection from the Dupont cable to the pH Signal Conversion Board to the ESP32 is GND, 3V3, and GPIO 35.

Code Snippet:

#include "DFRobot_ESP_PH.h"
#include "EEPROM.h"

DFRobot_ESP_PH ph;
#define ESPADC 4096.0  
#define ESPVOLTAGE 3300 
#define PH_PIN 35		

float voltage, phValue, temperature = 25;

void setup() {
    Serial.begin(115200);
    EEPROM.begin(32);
    ph.begin();
}

void loop() {
    static unsigned long timepoint = millis();
    if (millis() - timepoint > 1000U) //time interval: 1s
    {
        timepoint = millis();
        voltage = analogRead(PH_PIN) / ESPADC * ESPVOLTAGE; 
        Serial.print("voltage:");
        Serial.println(voltage, 4);
        Serial.print("temperature:");
        Serial.print(temperature, 1);
        Serial.println("^C");
        phValue = ph.readPH(voltage, temperature); 

        Serial.print("pH:");
        Serial.println(phValue, 4);
    }
    ph.calibration(voltage, temperature); 
}

float readTemperature() {
    // Add your code here to get the temperature from your temperature sensor
}

Project Expansion:

Now, I'm looking to integrate two water pumps into the project. I would greatly appreciate your guidance on the materials needed and the connections required to make this integration possible. Any tutorials, documentation, or references you can provide will be immensely helpful.

Thank you in advance for your assistance! I'm looking forward to your valuable insights.

Best regards, Leo

A good start to get help here would be to meet the expected quality level of the questions.

Please read How to get the best out of this forum and modify your post accordingly (including code tags and necessary documentation for your ask).

1 Like

Thank you so much for informing me about the rules and the best way to post in this forum ^^.

think we need more details - e.g. what size water pump?
the last water pump I used was a Jabsco_28520_pump

1 Like

I believe I'll opt for a smaller one for the prototype.

Thanks for cleaning up your post. Looks much nicer and is easier to read !

do you need pumps for the prototype ? you could just use a LED that will represent the state of the pump. Later on instead of the LED you'll have a MOSFET driving power for your pump.

1 Like

Thanks, bro! I just tested my project for prototyping, and it worked. I followed your advice to use an LED temporarily.

Great!
Have fun

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.