Abstract: A device for controlling the stroke of a piston 3 of a metering pump comprising an electromagnet 1 formed by a fixed part and a mobile part fixed with respect to said piston 3 in such a way that at each displacement of the piston there corresponds a different value of inductance of the electromagnet 1 and hence of the piston stroke itself.