Arduino Hydroponic Nutrient Doser with TDS Sensor and Peristaltic Pump
Build a nutrient doser for a hydroponic tank: read a TDS probe through its datasheet curve, add nutrient one short dose at a time with a mixing wait, and warn when the water is too strong.

Your project challenge
Read A0 and turn it into ppm with the TDS curve. Show TDS and the ppm on row 1. Below 400: pump 1 second (DOSING), then wait 4 seconds (MIXING) before measuring again. 400 to 700: OK, pump off. Above 700: ADD WATER, never pump. Relay IN is D7, active LOW.
Components you’ll use
- Arduino Uno
- TDS Sensor Module (TDS Meter V1.0)
- Relay Module
- Peristaltic Dosing Pump (12V)
- Battery
- LCD 16x2 Display
What you’ll build
A nutrient doser for a hydroponic tank, where lettuce grows in water instead of soil. Farms and rooftop gardens in India use machines like this to feed their plants.
How it works
The TDS probe measures how much is dissolved in the water, in ppm. More nutrient gives a higher voltage on A. A small peristaltic pump adds concentrate. It runs from a 12V pack, and the relay switches it. LOW on IN runs the pump. Use the slider to change the water.
The key idea
The voltage is not a straight line. Use the module’s curve: ppm = (133.42 V³ − 255.86 V² + 857.39 V) × 0.5. Lettuce likes 400 to 700 ppm. When it is low, dose a little, then wait for it to mix before you measure again.
⚠ Watch out
Never run the pump nonstop: the probe needs time to see the new nutrient. Above 700, adding more would burn the roots, so ask for water instead.
Make it yours: add a DS18B20 thermometer and use its temperature in the curve.
The editor has the wiring guide, the code and the simulator.
Build this project