Arduino Fertigation

2,066

23

5

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.

More technical details can be found at https://fertigation.wixsite.com/fertigation

Step 1: List of Parts

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.

Step 2: Control Box

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.

Step 3: Mixing Tank

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.

Step 4: Chemical Storage

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.

Step 5: Photo Diode

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

Step 6: Fertilizers

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.

Step 7: 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
}

Step 8: Thank You for Viewing This Instructable...

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

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Plastics Contest

      Plastics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    5 Discussions

    0
    None
    MatthewB456

    3 months ago

    Would be interesting to understand the results you are achieving with this system versus an organic approach

    1 reply
    0
    None
    ItriumMatthewB456

    Reply 3 months ago

    I believe this method has the advantages of both organic and purely hydoponic growth. The plants are grown in organic compost, a natural product which supplies nutrients and provides a sympathetic rooting environment. The fertigation system adds the essential nutrients and water in a well controlled manner to match the plant growth pattern.

    By organic, I suspect you mean using farmyard manure or similar... If you are lucky, you may hit on the right product or have access to laboratory analysis of the material so that you can make an informed application. More likely, it will be loaded with nitrates which will give exuberant leaf growth at the expense of fruit yield.

    0
    None
    baudeagle

    3 months ago

    Looks like a great project. I was curious, why don't you monitor the moisture in the soil and possibly the acidity.

    1 reply
    0
    None
    Itriumbaudeagle

    Reply 3 months ago

    The original plan was to use a gypsum block moisture sensor but it took 12 hours to dry out, much longer than the compost on a sunny day. Also, it was quite temperature sensitive and needed a temperature probe and compensating algorithm. Further research showed irrigation needs closely followed solar radiation and so I went for that option and it has worked well. The only problem was a growing leaf shading the diode, easily cured!

    A pH meter is quite delicate and needs regular calibration. I did not want to take the risk of a faulty feedback loop. Once set up, the fixed dose of acid gave a stable pH feed with no problems.

    0
    None
    DIY Hacks and How Tos

    3 months ago

    Great first instructable. Thanks for sharing with the community.