DIY Agribot – Smartphone Controlled Agricultural Robot

About This Project

Make your own DIY agribot and nurture your garden intelligently with its automatic irrigation system!

Project Info




Robots these days help us with a lot of things. But can gardening be one of them? Presenting to you the DIY agribot – a smart agriculture robot with its own automatic irrigation system that measures the moisture of soil and water it when required. Pretty smart, eh? You can easily make the agribot on your own using components from the evive Starter Kit, program it in PictoBlox – our graphical programming software based on Scratch Blocks, and control it with your Smartphone via Dabble – our Bluetooth controller and project interaction Smartphone app. You can download PictoBlox from HERE and Dabble for Android from HERE and for iOS from HERE.

Ready to make automate gardening? Let’s go!

Components Required

ImageComponentQuantityAvailable in Kit
DabbleDownload from App Store or Play Store
PictoBloxDownload from here:
Bluetooth Module1
Soil Moisture Sensor1
    12V 3W Water Pump1
    • None
    Dual Shaft BO Motor4
    Micro Servo Motor with Accessories1
    BO Motor Mount5
    BO Wheel4
    Lithium Polymer Battery1
    • None
    Acrylic Part: Base Plate2
    Ice Cream Stick1
    Cable Ties2
    20mm M3 (Female to Female)Few
    M3 NutsFew
    Male to Female Jumper Cable 20cmFew

    Building Guide

    Step 1: Turning Your 4-Wheel Drive into the AgriBot

    We have made the automatic plant watering system and we have our 4-Wheel Drive Robot, why no combine them and make a Smartphone controlled agricultural robot.

    Thus, agribot or the agricultural robot is the advanced modified version of the 4-Wheel Drive Robot.

    Bringing in the Servo Motor

    We will be using a servo motor to move the soil moisture sensor in and out of the ground to get the readings of the soil moisture level.

    Setting the Servo Angle to 90°
    1. Before mounting the servo motor, let’s set the servo angle to 90°.
    2. Connect the servo motor on servo channel 1.Testing the IR Sensor
      evive Notes Icon
      Make sure to attach the brown wire of the servo to the left-most pin of the S1 Channel of evive.
    3. We will be using evive’s firmware to change the servo angle.
    4. Switch ON evive.
    5. From the menu go to Controls.Menu Sensing Selected
    6. Then select Servos.Control Menu Servo Selected
    7. Finally, navigate to  Servo 1.Servo Select Menu
    8. Using potentiometer 1 set the servo angle to 90 degrees.Servo Angle control Panel 1
    Mounting the Servo Motor

    Now, glue the servo motor to the motor clamp using hot glue.Making of the Agribot

    As we need to keep our soil moisture sensor to the front of the 4-wheel robot. Thus attach the clamp to the front of the chassis of the 4-wheel robot using M3 nuts and bolts.Making of the Agribot

    Bringing in the Soil Moisture Sensor

    Our main objective for making an agricultural robot is to measure the soil moisture level and water the plants if the soil moisture level is low.

    The soil moisture sensor gives different analog values depending upon the moisture level. Thus, before attaching the soil moisture sensor to our agribot, let’s first test it whether it is working properly or not. To make the testing of the sensor easier, we will be using the pin state monitor feature of the evive.

    Testing the Soil Moisture Sensor
    1. Firstly, connect the probes of the soil moisture sensor to the sensor using jumper cables. Then let’s connect the sensor to evive as given here:
      1. Connect VCC to evive’s +5v pin
      2. Connect GND to GND on evive
      3. Connect signal pin to evive’s A0 pin.soil moisture testing connection
    2. Switch ON evive.
    3. From the firmware, go to pin state monitorMenu Pin State Monitor Selected
    4. And then select Analog pin States.Pin State Monitor Analog
    5. Observe the value in next of A0
    6. When the probe is in the open air, the value next to A0 will show value around  1023. Now, as soon as you dip it inside a cup filled with water, the value would decrease significantly.Pin State Monitor Analog Panel
    7. Now that our sensor works time to mount it to our agribot.

    Mounting the Soil Moisture Sensor

    Take the sensor module and mount it in front of the robot chassis by using M3 nuts and bolts.Making of the Agribot

    Connecting the Servo Motor and the Soil Moisture Sensor

    1. Now first we would connect the servo motor by extending the jumper cables.
      1. Connect VCC to +5v on evive
      2. Connect GND to GND on evive
      3. Connect Signal pin to evive’s pin 3
    2. Now, let’s connect the Soil Moisture Sensor to the Agribot
      1. Connect VCC to evive’s +5v pon
      2. Connect GND to GND on evive
      3. Connect signal pin to evive’s A0 pin.Making of the Agribot

    Making the Soil Moisture Tester

    Let’s make the soil moisture tester that will dip the probe of the soil moisture sensor upon giving the commands via Dabble.

    1. Take a single-sided servo horn and attach it to an ice cream stick using some hot glue.Making of the Agribot
    2. Take the probes of the soil moisture sensor and glue it to the other end of the ice-cream stick.Making of the FarmBot

    Step 2: Turning it into Automatic Irrigation System

    Now, that we want to make our automatic irrigation system, we need to process the data and maintain the parameters like soil moisture by watering the plants.

    1. We will be using a relay to switch on and off the water pump so for that we would attach some jumper cables to evive, i.e. connect the cable to VCC, GND and Digital pin 10 of evive.
    2. Next, take a soft PU pipe and attach it to the ice cream stick.Making of the FarmBot
    3. Now that the assembly of the bottom chassis is complete, we’ll attach another chassis on top of the current one so that we can place our water storage tank on top of it.
    4. Take 4, 45 mm male to the female spacer and attach it to 4 corners on the base chassis.Making of the FarmBot
    5. Then, attach the servo horn to the servo motor.
    6. Next, take another chassis and firstly pass the jumpers for relay and pipe through the space given on chassis and then mount the chassis by using 12mm M3 bolts to the spacers.Making of the FarmBot

    Connecting the Relay

    1. Take the relay and fix it on top of the chassis using double-sided tape.
    2. Next, connect it to evive.
      1. Connect VCC to evive’s +5V.
      2. Connect GND to evive’s GND.
      3. Connect Signal to evive’s digital pin 10.Making of the FarmBot

    Making the Water Storage Tank for our Agricultural Robot

    1. For holding water we would be using a PET bottle.
    2. Take a bottle and cut off the top.
    3. Glue the bottle on top of the second chassis using hot glue.
    4. Take a DC Water Pump and fix the PU pipe to its outlet.
    5. Place the pump inside the bottle.

    Powering up our Agricultural Robot

    As our water pump works on 12 V DC, we will be using a lipo battery to power up our agricultural robot.

    1. Take two cable ties and tie it at the back of the upper chassis to make a loop.
    2. Fit the lipo inside the loop.Making of the FarmBot

    Connecting the Battery

    We have connected a MALE DC jack which helps us to connect wires to the pumps female connector.

    1. Connect the negative terminal of the lipo battery to the pump’s negative terminal.
    2. Connect the positive terminal to the com on lipo.
    3. Now, take a small wire and connect the positive terminal of the pump to NC on the relay.Agricultural Robot Conenction

    With this the assembly of our agricultural robot is ready. You can even decorate the robot if you want.Agribot: Agricultural Robot

    Step 3: Writing the Code in PictoBlox

    To make the programming part of the robot even simpler, we are going to write the code in PictoBlox.

    1. Since we need to control the agriculture robot wirelessly, we’re going to write the code in the Upload mode.
    2. The when evive starts up block will make sure that the program starts running as soon as evive starts up.
    3. The relay connected to pin 10 should initially be OFF and the screen should be blank.
    4. Since the agribot is a modified 4-wheel drive robot, let’s first write the code for the 4-wheel drive robot.
    5. On pressing Up on gamepad in Dabble, the robot should go straight and Straight should be displayed on the screen. Similarly on pressing down, the robot should move backward and Backward should be displayed on the screen. The robot should turn Left on pressing the Left arrow and Left should be displayed on the screen. Finally, the robot should turn Right on pressing the right button and Right will also be displayed on to the screen.
    6. To this point, we’ve written the code for controlling the robot’s movements. Now let’s write the code for the automatic irrigation system.
    7. On pressing the triangle button, the servo angle should change to 0 thus inserting the terminals of the soil moisture sensor into the soil.
    8. If the reading of the soil moisture sensor at Analog Pin A0 is more than 800, it means that the soil is dry. Therefore, the motor should turn ON and water the soil. 
    9. Once done, it should turn OFF.
    10. Finally, on pressing the cross, the servo should return to its original angle.
    11. But, what if nothing is pressed? In that case, the Robot should stop moving and Brake should be displayed onto the screen.
    12. Upload the code to evive and watch your agribot take care of the soil for you!.Agribot PictoBlox CodeFarmbot Code

    Step 4: Conclusion

    With this, your DIY agribot is ready to make gardening smart for you!

    Circuit Diagram

    DescriptionCircuit Diagram

    Make the connection as shown in the given fritzing diagram:


    DescriptionDownload Code
    PictoBlox Code for AgriBotDownload
    Arduino Code for AgriBotDownload
    evive LibraryDownload
    Dabble LibraryDownload
    Share this Project
    Share on facebook
    Share on twitter
    Share on pinterest
    Share on reddit
    Share on print
    Featured Projects