AI BASED TOMATO HARVESTING ROBOT
Agriculture, one of the most important industries for human life, is faced with serious problems, the shortage of workers, the falling birthrate and the aging population, global warming and natural disasters, etc. Tomato is one of the most important fruit vegetables, and now most of the countries ar
2025-06-28 16:30:10 - Adil Khan
AI BASED TOMATO HARVESTING ROBOT
Project Area of Specialization Electrical/Electronic EngineeringProject SummaryAgriculture, one of the most important industries for human life, is faced with serious problems, the shortage of workers, the falling birthrate and the aging population, global warming and natural disasters, etc. Tomato is one of the most important fruit vegetables, and now most of the countries are cultivated tomatoes in the greenhouses, or large scale farms as the solution for effective production toward smart greenhouses, whereas the high temperature and high humidity, construction and management costs are big problems and technologies such as environmental control system, factory automation technology, AI, robotics are required. A tomato harvesting robot was developed for the study, which included a four-wheel-drive steering wheel, a 3-DOF harvesting system, a path following system, and a stereo camera vision system which can measure depth in short distance. An independent four-wheeled system. The proportional-integral-derivative (PID) algorithm was used in the control system. The Harr Cascade algorithm were used for the automatic recognition of ripe tomatoes, and obstacle avoidance strategies were proposed based on the line following and obstacle detection using arduino. A 3 finger gripper is also used for plucking the tomatoes using rotational joint. The maximum load that mechanical arm bear was about 1.5 kg. This study provides some insight into development and the use of a tomato harvesting robot used in the greenhouse. Our proposed model exhibits a good scope not only in Pakistan but all those countries of the world which are moved towards automation and also for those countries in which agriculture are their backbone/great exporter of crops. Because this model not only harvest tomatoes but also harvest cherry, apple, oranges etc. by a little modification.
Project ObjectivesThe main objective of implementing this project is:
- To provide a system that could reduce the labors cost and works continuously 24/7 and very efficient.
- To provide a system that could lessen the humans diseases which is caused by high temperature, humidity and different factors in greenhouse by lessen their presences.
- To provide a system that could work in any pandemic situation like corona virus which recently we face in which humans activities are bounded to homes.
These objectives will be accomplished by designing a system which will work in greenhouse decreased the labors cost, continuously works, and do their job in any situation. To fulfil these objectives, we will be requiring four major components
- Base having 4 wheel: - For the movement of robot in the field/greenhouse a four-wheel independent robot with a high ground clearance is used (Using line following and obstacles detection).
- Three-DOF manipulator: - For grasping, cutting and detaching of tomatoes a 3-DOF manipulator was mainly composed of a robotic arm and an end effector/gripper is used.
- An identifying equipment: - To detect the tomatoes and measure the distance between camera and the tomato. The identifying equipment in the proposed methodology is the stereo camera.
- A controller: - The decision regarding the controlling of robotic arm and gripper will be done by a controller. The controller used in the proposed methodology is the Raspberry Pi 4B+..
From the above examinations, we clearly have the conclusion that there is no other best system for tomatoes harvesting in greenhouse than this. The conventional methods is failing to provide efficiency and reducing in labors cost. Almost similar system is implemented in some developed countries. As we also know that countries nowadays are moving towards an automation. The agriculture industry have also started promoting automation as a mean to solve the issues and to increase the growth rate.
Project Implementation MethodThe proposed system has the integration of both hardware and software. Our project consists of 4-wheel independent system along with manipulator at the end of manipulator there is a gripper and a stereo camera is held above the gripper. Our project is divided into 2 phases. The first phase is to design a hardware for our system and the second phase is to use different techniques/algorithms for the detection of tomatoes and movement of arm for plucking f tomatoes.
(3.2.1) System Compositions & Workflow
As we develop a robot for greenhouse so, our main aim is to create a simple, small and flexible automatic robot which overcome the problems described above specially the cost because in Pakistan the farmer are not so rich so they can’t afford high price robot for harvesting. The robot can be used to harvest ripe tomatoes from the greenhouse, which contains especially of the independent 4-wheeled, a 3-DOF harvesting system, travel system, and stereo vision system. It is a multipurpose harvesting robot used to harvest different types of fruit like cheery, apple, mango and cucumber after simple modification of the griper and control program.
The function of the robot is as follows: the robot automatically moves on a predetermined path using IR sensors (line following robot using arduino), and the binocular stereo pi camera mounted on the robotic arm of the manipulator begins to detect whether there is a ripe tomato in the workplace depending on the color difference between ripe tomato and background. Once the ripe tomatoes are found, the robot stops moving, and there is a place for ripe tomatoes and obstacles to harvest it is further determined by the concept plan, depending on whether the machine arm can guide the gripper to reach the target area using different techniques and algorithms. Then the gripper grip the tomato rotate them and pluck from the plant, then placed in a bucket. After that, the robotic arm moves to their initial position. This whole process continues until all the tomatoes in the operational area are plucked. Then robot move forward and again same process will start. The robot will continuously doing this process until the termination.
The process that we are going to implement for detection is the image processing technique. The stereo pi camera will take images and then using machine learning algorithms detect whether it’s a tomato are not. As the detection is done the controller will decide which joints is to move and control the motion of arm. The camera will keep on taking pictures and send it to controller until all the tomatoes are picked.
All of the decisions taking regards detection of tomatoes and plucking, motion of robotic arm and wheel are done by the controller “Raspberry Pi 4B”.
Benefits of the ProjectAgriculture is considered the backbone of Pakistan's economy, which relies heavily on its major crops. Agriculture sector of Pakistan’s plays a critical role in the economy as it contributes 18.9 percent to GDP. It is also an important source of foreign exchange earnings. The main agricultural products are cotton, wheat, rice, sugarcane, fruits, and vegetables, in addition to milk, beef, mutton, and eggs. Pakistan depends on one of the world's largest irrigation systems to support production. Tomatoes are also an important vegetable on a global scale, the annual production of fresh tomatoes amounts to approximately 160 million tonnes. Almost 40 million tonnes of tomatoes are processed every year in factories belonging to the greatest labels of the global food industry There are several reason two season’s for production of tomatoes in a year, climate, incidence of diseases, harvesting time etc. The reason for choosing this project is that the tomatoes is not our major crop and we import tomatoes from other countries like India and every year their prices increase.
As day by day population increase so demand’s also increase. Firstly the conventional methods to produce tomatoes are limited. Secondly in greenhouse there are also some issue which faced by humans. Thirdly this is laborious and not time efficient. The problems faced or problem statement of the project are categorized into two:
- Effect of greenhouse on labors
- Time efficiency and Labor cost
- Pandemic Situation
Effect of greenhouse on labors
The purpose of greenhouse is to produce crops quick using artificial parameters. But high temperature and humidity in greenhouse effects the health’s of the worker’s and it’s difficult for the worker’s to work in high temperature and humidity. The principal potential effects expected include irritancy, asthma/respirational problem, allergic aleveolitis and dermatitis .
Time Efficiency & Labor Cost
In times of chaos everyone want to do work in very short time. Humans being can’t work 24/7. Humans can works for a specific time there are proper timing in any industry and during working they also need break for food and rest so they can't work continuously for 24 hours.
Pandemic Situation
In pandemic situation like corona virus recently we face in which all the activities are closed. Humans are bounded towards their houses and can’t allowed to work outside. So in this situation it is very difficult for humans to work.
Benefits
- A system that could reduce the labors cost and works continuously 24/7 and very efficient.
- A system that could lessen the humans diseases which is caused by high temperature, humidity and different factors in greenhouse by lessen their presences.
- A system that could work in any pandemic situation like corona virus which recently we face in which humans activities are bounded to homes.
These are the benefits o our project. To provide ease to farmers in cost, work and also protect the humans from diseases.
Technical Details of Final DeliverableAs we develop a robot for greenhouse so, our main aim is to create a simple, small and flexible automatic robot which overcome the problems described above specially the cost because in Pakistan the farmer are not so rich so they can’t afford high price robot for harvesting. The robot can be used to harvest ripe tomatoes from the greenhouse, which contains especially of the independent 4-wheeled, a 3-DOF harvesting system, travel system, and stereo vision system. It is a multipurpose harvesting robot used to harvest different types of fruit like cheery, apple, mango and cucumber after simple modification of the griper and control program.
Requirement Specification
The equipment that are required for the completion of our project and their specifications are list and described below.
Raspberry Pi 4B
In our project the decision making and controlling was implemented by the Raspberry Pi 4B. It has a 64-bit processor and 4 GB of SRAM. It is used for both of the processes. It is the main equipment of our project all processing and decision making are done in it.
Stereo Pi Camera
It is consist of two 8 MP camera. It is a real time depth mapping camera. In our system out of two camera one is used for image taken and detection of tomatoes and second one is used to measure the distance between the camera and the tomato.
Arduino Uno
It is used for the pre-defined path of the robot. By using IR sensor with them we make a line following robot.
Independent 4-Wheel System
It is an independent four-wheel system. This system was driven by several DC gear motors and its frame is made up of aluminum. The load bearing capacity of the system is higher than 100 kg, the dead weight of the robot is about 540 kg.
Three-DOF Manipulator
The 3-DOF manipulator mainly composed of a robotic arm and a gripper. Because this robot is designed for the harvesting of tomatoes in the greenhouse therefore 3-DOF robotic arm and a rotational gripper at the end of arm is composed. The robotic arm mainly consists of the 3 joint (shoulder joint, elbow joint and wrist joint). It is made up of aluminium.

Servo motor
The most common servo motor is used for the rotation of stereo pi camera to take the images. We also use dc gear motor for the movement joint of robotic arm.
Software requirements
There are the two software requirements of our project.
Python
All of the image processing done in our project is in python using opencv library. So we have used python 3.8 IDLE as the compiler. It is used for the detection of tomatoes and also detect whether it is ripe or unripe.
Haar Cascade
For image detection we use haar cascade in our project. It is an open source algoritms we train our data and use this model for detection.
C++
Independent 4-wheel system is controlled by using C++ language in arduino. It is use for the line following and obstacles detection of robot.
Final Deliverable of the Project HW/SW integrated systemCore Industry AgricultureOther Industries Agriculture , Food Core Technology RoboticsOther Technologies Artificial Intelligence(AI)Sustainable Development Goals Industry, Innovation and InfrastructureRequired Resources| Item Name | Type | No. of Units | Per Unit Cost (in Rs) | Total (in Rs) |
|---|---|---|---|---|
| Total in (Rs) | 70240 | |||
| Hardware(4-wheel base along with 3.5ft robotic arm made of aluminum) | Equipment | 1 | 35000 | 35000 |
| Raspberry Pi 4b (4GB) | Equipment | 1 | 15500 | 15500 |
| Stereo Camera raspberry pi | Equipment | 1 | 12000 | 12000 |
| Driver/Controller for joints motion motors | Equipment | 5 | 250 | 1250 |
| DC supply | Equipment | 1 | 500 | 500 |
| IR sensor (for line following) | Equipment | 2 | 120 | 240 |
| Arduino Uno | Equipment | 1 | 750 | 750 |
| Miscellaneous (fair + thesis) | Miscellaneous | 1 | 5000 | 5000 |