A sensor for determining presence of an object comprising: - a transducer configured for receiving external signals reflected by the object and for generating corresponding transduced signal; and - a processing module for determining presence of the object, the processing module being configured to be in communication with the transducer, and further being configured to: ∘ receive the transduced signal from the transducer, the transduced signal is generated based on received external signals reflected by the object; ∘ determine an envelope of said transduced signal; ∘ determine slope and amplitude of one or more portions of the envelope; ∘ generate a first output signal if at least one of the one or more portions of the envelope satisfies at least one of the following conditions: ▪ the one or more portions of the envelope has a positive amplitude and a positive slope, ▪ the one or more portions of the envelope has a negative amplitude and a negative slope, ∘ determining if the object is present based on the first output signal; the sensor being characterized in that before determining if the object is present, the processing module is further configured ∘ to output a second output signal corresponding to a condition of no presence of the object if none of the said conditions is satisfied, ∘ to compare the first or the second output signal (8; 10) with a threshold, wherein the first output signal is the envelope of the transduced signal and corresponds to the at least one or more portions of the envelope which satisfies at least one of said conditions and the second output signal has a value which is always below the threshold. - a transducer configured for receiving external signals reflected by the object and for generating corresponding transduced signal; and - a processing module for determining presence of the object, the processing module being configured to be in communication with the transducer, and further being configured to: ∘ receive the transduced signal from the transducer, the transduced signal is generated based on received external signals reflected by the object; ∘ determine an envelope of said transduced signal; ∘ determine slope and amplitude of one or more portions of the envelope; ∘ generate a first output signal if at least one of the one or more portions of the envelope satisfies at least one of the following conditions: ▪ the one or more portions of the envelope has a positive amplitude and a positive slope, ▪ the one or more portions of the envelope has a negative amplitude and a negative slope, ∘ determining if the object is present based on the first output signal; ∘ receive the transduced signal from the transducer, the transduced signal is generated based on received external signals reflected by the object; ∘ determine an envelope of said transduced signal; ∘ determine slope and amplitude of one or more portions of the envelope; ∘ generate a first output signal if at least one of the one or more portions of the envelope satisfies at least one of the following conditions: ▪ the one or more portions of the envelope has a positive amplitude and a positive slope, ▪ the one or more portions of the envelope has a negative amplitude and a negative slope, ▪ the one or more portions of the envelope has a positive amplitude and a positive slope, ▪ the one or more portions of the envelope has a negative amplitude and a negative slope, ∘ determining if the object is present based on the first output signal; the sensor being characterized in that before determining if the object is present, the processing module is further configured ∘ to output a second output signal corresponding to a condition of no presence of the object if none of the said conditions is satisfied, ∘ to compare the first or the second output signal (8; 10) with a threshold, ∘ to output a second output signal corresponding to a condition of no presence of the object if none of the said conditions is satisfied, ∘ to compare the first or the second output signal (8; 10) with a threshold, wherein the first output signal is the envelope of the transduced signal and corresponds to the at least one or more portions of the envelope which satisfies at least one of said conditions and the second output signal has a value which is always below the threshold.