The invention relates to a dosing mechanism (5) for a fluid comprising an inlet (8) an outlet (9) a dosing pipe (10) and two valve groups (A B) with an inlet valve (A1 B1) and an outlet valve (A2 B2) each wherein the inlet (8) is connected to both inlet valves (A1 B1) and the outlet (9) is connected to both outlet valves (A2 B2) wherein the inlet valve (A1) of one group (A) is arranged to connect the inlet (8) to a first end (10.1) of the dosing pipe (10) while the outlet valve (A2) of the same group (A) is arranged to connect the outlet (9) to a second end (10.2) of the dosing pipe (10) wherein the inlet valve (B1 ) of the other group (B) is arranged to connect the inlet (8) to the second end (10.2) of the dosing pipe (10) while the outlet valve (B2) of the same group (B) is arranged to connect the outlet (9) to the first end (10.1) of the dosing pipe (10) wherein control means are arranged to open only the valves (A1 A2 B1 B2) of one group (A B) at a time thereby allowing the fluid to flow from the inlet (8) through the dosing pipe (10) to the outlet (9) wherein a dosing object (11) is arranged in the dosing pipe (10) in a manner to be translated from one end (10.1 10.2) towards the other (10.2 10.1) by the fluid wherein a dose to be delivered from the output (9) is determinable by a position of the dosing object (11) in the dosing pipe (10).