Soil fertility is a crucial factor in measuring soil quality, it indicates the extent to which soil can support plant life. Soil fertility is measured by the amount of macro and micronutrients, pH, etc. Soil nutrients are depleted after each harvest and therefore must be added. To maintain soil nutrient levels, fertilizer is added to the soil. Adding fertilizer in the precise amount is a matter of great importance because excess or insufficient application can harm plant life and reduce productivity. The use of modern technology is a solution to this problem. Although automated techniques for sowing, weeding, crop harvesting, etc. have been proposed and implemented, none of the techniques are aimed to maintaining soil fertility. The study aims at how to exploit precision agriculture in determining the amount of fertilizer (nitrogen, phosphorus and potassium levels) and adding it in the required quantity to the soil.