The problem
An ESP32 hydroponics controller with pH and EC nutrient dosing is a self-contained growing system that keeps a hydroponic nutrient solution inside its target chemistry without daily manual testing. The ESP32 reads a pH probe, an electrical-conductivity (EC) sensor and a water-temperature sensor from the reservoir, compares each reading against crop-specific target bands, and switches peristaltic dosing pumps to add pH-up solution, pH-down solution or concentrated nutrients in small, timed doses. In a home or college hydroponics setup, pH drifts as plants absorb ions and water evaporates, and nutrient strength falls as plants feed; left unchecked, both drifts lock nutrients out of the roots and stunt growth within days. This project automates the correction loop — sense, compare, dose, re-check — and publishes every reading to a web dashboard, so the grower sees pH, EC and temperature live and only intervenes to refill tanks or recalibrate probes.
This is a built-to-order hybrid project: the working prototype, firmware, dashboard and the complete documentation kit (report, PPT, abstract, viva Q&A) are prepared fresh for you.
Builder note from the demo build: the pH probe was calibrated with a two-point routine (pH 4.0 and 7.0 buffer solutions, rinsed in distilled water between buffers), and the EC probe is powered only during its own reading window — when both probes were left powered in the same reservoir, the EC probe's excitation signal shifted pH readings by up to 0.3 pH, so sequential sampling is built into the firmware.
SEN0161 pH and DFR0300 EC probes sit in the nutrient tank.
Follow the working sequence
How it works
The system runs a continuous sense–compare–dose–recheck loop. The pH probe, EC probe and DS18B20 temperature sensor sit in the nutrient reservoir and feed analog and digital signals to the ESP32, which converts them to pH, EC in mS/cm and temperature in °C using the two-point calibration constants stored in firmware. Every sampling cycle the controller compares each value against its target band — pH 5.5–6.5 and EC 1.2–1.8 mS/cm for leafy greens — and, when a value is out of band, switches on the matching peristaltic pump through a relay for a short timed dose: pH-up when the solution is too acidic, pH-down when too alkaline, nutrient concentrate when EC is low. After dosing, it waits for the solution to mix, re-measures, and only doses again if the reading is still out of band. All readings, pump events and tank levels are published over Wi-Fi to the dashboard, which also lets the grower change thresholds and trigger a manual dose.
- The pH probe (SEN0161-V2), EC probe (DFR0300 K=1) and DS18B20 temperature sensor are mounted in the nutrient reservoir, with the EC probe powered only during its own reading window to avoid disturbing the pH measurement.
- The ESP32 reads the two analog sensor voltages through its 12-bit SAR ADC (0–4095 counts, datasheet value) and the temperature over the DS18B20 one-wire bus.
- Firmware converts the raw readings to pH, EC in mS/cm and temperature in °C using the stored two-point calibration constants, applying temperature compensation to the EC value.
- Each converted value is compared with its configured target band (pH 5.5–6.5, EC 1.2–1.8 mS/cm for leafy greens as design targets) and logged with a timestamp.
- When a value is out of band, the ESP32 switches the matching peristaltic pump on through the relay module for a short timed dose (approximately 5–8 seconds per dose — 5 s for the pH pumps, 8 s for the nutrient pump; design target).
- The controller waits for a mixing pause (approximately 10 minutes, design target), re-measures, and doses again only if the reading is still outside its band.
- All readings, pump events and tank levels are served over Wi-Fi to the dashboard, which highlights out-of-range values and low tanks.
- The grower can change thresholds, trigger a manual dose, or recalibrate probes from the dashboard without reflashing the firmware.
Tech stack:
- ESP32 DevKit
- Arduino IDE
- DFRobot SEN0161-V2 pH sensor kit
- DFRobot DFR0300 EC meter (K=1)
- DS18B20 waterproof temperature sensor
- Peristaltic dosing pumps · 12 V DC
- 4-channel relay module
- HTML · CSS · JavaScript dashboard
| Parameter | Value |
|---|---|
| Controller | ESP32 DevKit, dual-core Xtensa LX6 up to 240 MHz (datasheet value) |
| pH sensor | DFRobot SEN0161-V2, detection range 0–14 pH, accuracy ±0.1 pH at 25 °C (datasheet value) |
| EC sensor | DFRobot DFR0300 (K=1), measurement range 0–20 mS/cm, accuracy ±5% of full scale (datasheet value) |
| Temperature sensor | DS18B20 waterproof, range −55 to +125 °C, accuracy ±0.5 °C (datasheet value) |
| ADC | ESP32 12-bit SAR ADC, 0–4095 counts, 18 channels, ADC1 used while Wi-Fi is active (datasheet value) |
| Dosing pumps | 3 × 12 V DC peristaltic pumps, flow approximately 100 mL/min (design target) |
| pH target band | 5.5–6.5 (horticulture reference: University of Missouri extension guidance) |
| EC target band | 1.2–1.8 mS/cm for leafy greens (horticulture reference: Oklahoma State extension guidance) |
| Sampling interval | Approximately 5 minutes (design target) |
| Dose duration | Approximately 5–8 seconds per dose — 5 s for the pH pumps, 8 s for the nutrient pump (design target) |
| Mixing pause | Approximately 10 minutes between dose and re-measurement (design target) |
| Reservoir | Approximately 20 L (design target) |
| Dosing tanks | 3 × approximately 1 L tanks for pH-up, pH-down and nutrient concentrate (design target) |
| Connectivity | Wi-Fi 2.4 GHz (802.11 b/g/n), dashboard served from the ESP32 |
| Power supply | 12 V DC, approximately 2 A (design target) |
| Calibration standards | pH 4.0 and 7.0 buffers; EC 1413 µS/cm and 12.88 mS/cm standards |
Project features
At its core, this controller delivers four capabilities that together replace the daily testing routine of a hydroponics grower. First, continuous three-parameter sensing: pH, EC and water temperature are sampled every few minutes from the reservoir, so drift is caught the same day it starts instead of at the next weekly check. Second, closed-loop dosing: three peristaltic pumps add pH-up, pH-down or nutrient concentrate in timed doses whenever a reading leaves its band, then wait and re-measure before dosing again, so the solution is corrected gradually rather than overshot. Third, a live web dashboard: current readings, pump activity, tank levels and threshold settings are visible on any phone or laptop on the local network, with alerts when a tank runs low or a reading stays out of range. Fourth, two-point calibration: the pH probe is calibrated against pH 4.0 and 7.0 buffers and the EC probe against 1413 µS/cm and 12.88 mS/cm standards, keeping readings trustworthy across a season.
- [Continuous pH monitoring] A DFRobot SEN0161-V2 pH sensor kit reads the nutrient solution on a 0–14 pH scale with ±0.1 pH accuracy at 25 °C (datasheet value), so acidity drift is visible within minutes instead of at the next manual test.
- [EC nutrient-strength monitoring] A DFRobot DFR0300 (K=1) EC meter measures dissolved nutrient concentration over a 0–20 mS/cm range with ±5% of full scale accuracy (datasheet value), showing directly whether the solution is feeding the plants or running weak.
- [Closed-loop three-pump dosing] Three 12 V DC peristaltic pumps dose pH-up, pH-down and nutrient concentrate through a relay module, each in short timed doses with a mixing pause and re-measurement before any repeat dose.
- [Live web dashboard] Current pH, EC and temperature, pump activity, tank levels and threshold settings are shown on a single page served by the ESP32, viewable from any phone or laptop on the local network.
- [Two-point probe calibration] The pH probe is calibrated against pH 4.0 and 7.0 buffer solutions and the EC probe against 1413 µS/cm and 12.88 mS/cm standards, with the constants stored in firmware and a documented recalibration routine.
- [Temperature-compensated EC] A waterproof DS18B20 sensor measures reservoir water temperature and feeds the EC temperature-compensation calculation, since conductivity readings shift with temperature.
- [Out-of-range and low-tank alerts] The dashboard flags a reading that stays outside its band after dosing and warns when any dosing tank falls below its low level, so the grower intervenes before the crop is affected.
- [Manual dose and threshold controls] Thresholds for pH and EC can be changed from the dashboard, and each pump can be triggered manually for priming, calibration or testing without editing firmware.
What is included
- Working ESP32 hydroponics controller prototype with pH, EC and temperature sensing and three-pump dosing
- Complete firmware (Arduino IDE) with calibration routines, dosing logic and dashboard server
- Live web dashboard for readings, pump activity, tank levels, thresholds and manual dosing
- Circuit and wiring documentation with component list
- Probe calibration guide (two-point pH and EC routines with buffer and standard solutions)
- Project report PDF (background, sensor theory, methodology, results, limitations)
- Project abstract PDF
- PPT presentation for final review
- Viva Q&A preparation document (pH/EC chemistry, ADC, calibration, dosing control)
Limitations & prerequisites
- The pH and EC probes are laboratory-grade and must not be left submerged permanently; DFRobot rates probe life above 0.5 years depending on use, and the probes are lifted out of the reservoir between growing runs.
- EC accuracy is ±5% of the 20 mS/cm full scale (datasheet value), which is up to ±1 mS/cm — coarse against a 1.2–1.8 mS/cm leafy-green band, so EC readings are a trend guide rather than a laboratory measurement.
- The ESP32 ADC is sensitive to noise, so firmware averages multiple samples per reading; unaveraged single samples can vary noticeably.
- The EC probe's excitation signal disturbs the pH probe in the same reservoir, so the firmware samples them sequentially — readings are not simultaneous.
- The dashboard is served on the local Wi-Fi network; remote access from outside the network needs additional port-forwarding or cloud setup, which is not part of the base build.
- Dosing accuracy depends on peristaltic pump calibration; tubing wear changes flow rate over time, so the pumps need periodic recalibration.
- This is an academic prototype for leafy-green hydroponics, not a certified system for commercial food production.
Frequently Asked Questions
Is this project suitable for a final-year project?
Yes — for Electronics & Telecommunication, Electrical and IoT & Embedded programs, because it combines analog sensor interfacing, two-point calibration, closed-loop dosing control and a web dashboard in one demonstrable system. The build exercises ADC usage, relay control and Wi-Fi serving, and the report explains the pH and EC chemistry behind the control bands. The dosing thresholds can also be reconfigured for a different crop profile if your guide asks for one.
Which controller and sensors are used?
The controller is an ESP32 DevKit, chosen for its built-in Wi-Fi and 12-bit ADC. Sensing uses a DFRobot SEN0161-V2 pH sensor kit (0–14 pH range, ±0.1 pH at 25 °C), a DFRobot DFR0300 K=1 EC meter (0–20 mS/cm, ±5% of full scale) and a waterproof DS18B20 temperature sensor for EC temperature compensation. All three sensor figures are datasheet values, and equivalent probes can be substituted with a recalibration.
How does the automatic dosing work?
Every sampling cycle the ESP32 compares pH and EC against the configured bands and switches the matching peristaltic pump on for a short timed dose when a value is out of band. After each dose the controller waits for a mixing pause of approximately 10 minutes, re-measures, and doses again only if the reading is still outside its band. This dose–wait–recheck loop prevents overshooting the target chemistry, and the dose duration and pause can be tuned in firmware.
Does this project need internet connectivity?
No — the dashboard is served by the ESP32 over the local Wi-Fi network, so monitoring and control work without internet access. Wi-Fi is required only for the local network link between the controller and the grower's phone or laptop. If the router is down, the controller keeps sensing and dosing on its stored thresholds, but the dashboard is unreachable until the network returns. Remote access from outside the home network would need extra port-forwarding or cloud setup.
How often do the probes need calibration?
The pH probe should be recalibrated with pH 4.0 and 7.0 buffer solutions approximately once a month, or once a week with heavy use, following DFRobot's guidance. The EC probe needs a two-point calibration against 1413 µS/cm and 12.88 mS/cm standards on the same schedule. The firmware stores the calibration constants, and the calibration guide documents the full routine step by step. Probes are lifted out of the reservoir between growing runs to extend their life.
What will I receive with the project?
You receive the working prototype with all three sensors, three peristaltic dosing pumps, relay module and reservoir plumbing, plus the complete firmware, the live dashboard, wiring and calibration documentation, project report, abstract PDF, PPT and viva Q&A document. The build is prepared fresh for your order, and the dosing thresholds are configured for leafy greens unless you request a different crop profile. Extra grow channels or a larger reservoir can be added as a customization.
Components & software requirements
- ESP32 DevKit
- Arduino IDE
- DFRobot SEN0161-V2 pH sensor kit
- DFRobot DFR0300 EC meter (K=1)
- DS18B20 waterproof temperature sensor
- Peristaltic dosing pumps · 12 V DC
- 4-channel relay module
- HTML · CSS · JavaScript dashboard
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.