One of the factors that affect the quality and quantity of crops is due to stress factors caused by weeds. The presence of weeds in a field of crop is always stressful for the crop plant due to the competition for nutrients, light and moisture. Conventional sprayers have been reported to reduce these negative impacts by simply reducing the herbicide use through selective spraying -targeting only weeds and avoiding the crops. But these systems are inconsiderate to the effects of herbicides’ soil persistence. Soil pH influences the persistence of herbicides especially for triazine. In alkaline soils (higher pH), lesser amount of these herbicides is bound to soil particles, making more available for plant uptake, to which the herbicide persists much longer. As a response to this dilemma, a model that utilizes machine learning and machine vision implemented on an actual sprayer robot was developed to distinguish weeds from crops and considers the soil pH for weed management. The study achieved an accuracy of 77.90 % for weed detection and 64 % for soil pH determination through image processing. The overall precision of the sprayer robot was 89.19 %. The data indicates a promising result as an attempt in considering herbicide persistence through soil pH in weed management. This study further the support and adherence to the principles of conservation agriculture.