A device for detecting a predetermined threshold for filling, with an electrically conductive product, a reservoir made of an electrically insulating material having a storage cavity for containing the product and having a product outlet channel, said device including:
- means to form, with the storage cavity, a capacitive arrangement;
- excitation means for applying, by periodic square waves, an electrical excitation signal to the capacitive arrangement and capture means for taking a measurement signal from the capacitive arrangement, the electrical excitation signal being chosen so that the measurement signal has a characteristic varying substantially when the quantity of product contained in the storage cavity reaches the predetermined filling threshold;
- conversion means to identify an instantaneous value of a quantity representing the characteristic, to compare the instantaneous value with a reference threshold representing the predetermined filling threshold, and to derive therefrom a first binary signal representing the situation of the instantaneous value with respect to the reference threshold;
- digital filtering means to generate third binary signal by producing the convolution product of the first binary signal and a second binary signal derived from the first binary signal by introducing a delay equal to a multiple at least equal to one times the period of the square waves;
- and
- a processing means to derive, from the mean value of the third binary signal, a binary value representing the situation of the quantity of product with respect to the predetermined filling threshold.