Mechanical weeding is considered as an essential component in organic farming because there are few alternative methods to control intra-row weeds. However, intra-row mechanical weed control still has problems with efficacy due to the absence of, or poor, working depth control, of intra-row mechanical weeders. To improve depth control, intra-row mechanical weeders need to be combined with a sensor, whose output is used to control the depth of the weeders. The purpose of this work was to develop and evaluate a laser-based optical sensor that can be used to improve the working depth control of intra-row mechanical weeders. The performance of the depth sensor in frame height measurement and soil/crop discrimination was investigated under different soil properties and crop types representing field conditions during mechanical weeding. The results showed that the sensor depth measurement was not affected by the soil texture and soil moisture content of Belgian soils under organic farming conditions. The range of depth measurement is approximately 190 mm comprising a mid-point at 365 mm from the Measured surface with a precision of at least 1 mm. Because optic filters were used the depth sensor was not influenced by sunlight. The sensor had a mean measurement speed of 35 ms. Furthermore, the sensor has been proved to be able to discriminate between soil and crop samples with a maximum error of 5% and is able to detect the depth in motion with a repeatable precision of 5 mm. in conclusion, the sensor has the ability to detect the working depth and to provide improved depth measurement to enhance depth regulation of intra-row mechanical weeders. (C) 2008 IAgrE. Published by Elsevier Ltd. All rights reserved.