Arduino Fertigation

by Itrium in Circuits > Arduino

9892 Views, 42 Favorites, 0 Comments

Arduino Fertigation

cover.png

There is nothing better, more tasty than a fresh home grown tomato but they must be well fed and watered to give a good crop all through the summer. The plants often get neglected at holiday time and so this watering and feeding system was made and installed so that the plants were irrigated all the time.

Sunlight is the driving force behind plant growth and the water requirements depend closely on the amount of solar radiation received. A small photo diode measures the amount of sunlight and the plants are irrigated accordingly using an Arduino Uno to measure and control everything.

The mixing tank is filled with water through the solenoid valve. Once the tank is full, the level sensor turns off the water supply and the mixer pump is turned on. The peristaltic pumps dose the tank with the required amount of fertilizer and then the mixer pump is turned off. The mixture drains into the growing media under gravity.

List of Parts

parts.jpg

The parts for this project can be found on ebay, mostly quite cheaply from Chinese suppliers. All the electronics use 12V components, for safety as much as anything in an outside environment.

The transistors and resistors are soldered to the tag strip and then wired to the Arduino and external components. Diodes must be connected the right way so that they are reverse biased. The band on the 1N4007 diodes must always go to the positive 12V line. The photo diode is quite small and difficult to check the polarity, trial and error works well here, if it is the wrong way round, the Arduino will measure a high voltage.

Control Box

ezgif.com-apng-maker.png

The peristaltic pumps and the Arduino Uno are mounted in a small plastic box and the water solenoid mounted separately outside the box. Anything that could leak is kept outside the box.

Mixing Tank

IMG_0067.JPG

A 4 liter food container was used as the mixing tank. The float switch fills the tank with about 2 liters of water and the submersible pump is used to mix everything. Chemicals are pumped into the tank through the clear tubes.

Although the tank is shown uncovered in the picture, it should be covered in a black bag to keep out the light. The fertilizer solution is ideal for growing algae as well as tomatoes and the tank will soon go green inside and clog up everything. The clear tubes contain concentrated chemicals which are too strong for plant life.

Chemical Storage

IMG_0069.JPG

Three bottles of chemical are used to feed the plants. A high potassium soluble fertilizer is used in one bottle, calcium nitrate in a separate bottle because the calcium would precipitate out with the soluble fertilizer at high concentrations. Phosphoric acid is stored in the third bottle for bringing the pH down to 6.

Photo Diode

IMG_0072.JPG

A BPW34 photo diode is used to measure the solar radiation. This is mounted facing the midday sun.

Fertilizers

meter.jpg

The stock solutions were made from Solufeed F and calcium nitrate using 100 gm/L see. No doubt similar soluble fertilizers will be available locally. The acid tank was made from 50ml of 80% phosphoric acid per liter water.

The peristaltic pumps need calibrating by measuring how much liquid is dispensed in about 10 seconds, the pumps used in this instructable delivered 14ml in 10 seconds. The required time to give the right amount of chemical is entered into the Arduino sketch.

The pH of the tank is measured with a calibrated pH meter, the acid dispense time needs tweaking to give a pH of 5.5-6.5. Dissolved fertilizer is measured using the TDS meter, a value of 1000 to 1500 ppm is about right for tomatoes. True aficionados can change the ppm and nitrogen to potassium ratio depending on the plant growth stage...

As a final check on the frequency of watering, a tensiometer was included in one pot to monitor moisture content. This system gave tensiometer readings of 26-34 mBar at a depth of 15 cm into the compost. The ultimate check is the health of the plants, dark green leaves, deep yellow flowers and the stem thickness about 1 cm diameter 15 cm below the growing tip.

Arduino Uno Sketch

/*Arduino Uno fertigation sketch
After the setup, the program loops every 20 seconds and measures 
the light intensity.
This is summed together with a constant value until a 
predetermined value is reached.
When this happens, the fertigation cycle is triggered and the 
sum reset to zero.
Typical light values for a sunny day are 260 for 4 hours. 
This will give a sum value of 187200 from which 3 tanks of 
2 liters are triggered. 
Thus the trigger level will be 62400. We also need a single tank per day as a background fertigation level. 
A constant sum of 15 will give a total count of 64800 which is 
close to the 62400 trigger level. 
On this basis, 4 tanks will be dispensed on a sunny day. 
The exact values will need choosing depending on the plant 
growth stage and local conditions.
*/

const int pumpA = 8;
const int pumpB = 9;
const int pumpC = 10;
const int mixer = 11;
const int valve = 12;
const int level = A0;
const int BPW34 = A1;
 
int long count = 0;
int lux    = 0;
 
void setup()
{
    pinMode(BPW34, INPUT);
    pinMode(level, INPUT_PULLUP);
    pinMode(valve, OUTPUT);
    pinMode(mixer, OUTPUT);
    pinMode(pumpA, OUTPUT);
    pinMode(pumpB, OUTPUT);
    pinMode(pumpC, OUTPUT);
    delay(100);
    }
void loop()
{
lux = analogRead(BPW34);        // Measure light
if(lux > 500) lux=25;           // Check for shorted diode
  
count = count + lux + 15;       // Sum lux and background
 
if (digitalRead(level) == HIGH)  count=0; //Tank full error
if(count > 62400)    // Sunlight and background count trigger
{
  count = 0;
while (digitalRead(level) == LOW)  //Filltank
{
digitalWrite(valve, HIGH);
delay(1000);
}
digitalWrite(valve, LOW);    //Close valve when tank full
delay(2000);
digitalWrite(mixer, HIGH);   //Turn on mixer pump
delay(5000);
digitalWrite(pumpA, HIGH);   //Turn on pump A
delay(10000);                //Pump A on time
digitalWrite(pumpA, LOW);    //Turn off pump A
delay(5000); 
digitalWrite(pumpB, HIGH);   //Turn on pump B
delay(10000);                //Pump B on time
digitalWrite(pumpB, LOW);    //Turn off pump B
delay(5000);           
digitalWrite(pumpC, HIGH);   //Turn on pump C
delay(7000);                 //Pump C on time
digitalWrite(pumpC, LOW);    //Turn off pump C
delay(30000);                //30 seconds mixing
digitalWrite(mixer, LOW);    //Turn off mixer
}
delay(20000);                //Cycle time of 20s
}

Thank You for Viewing This Instructable...

toms.jpg

Here is a picture of some tomatoes grown with this system, there were many more but people keep eating them!