A sample preparation device comprising a first chamber containing a first movable piston separating a first volume upstream and a second volume downstream the first piston, a second chamber containing a second movable piston separating a third volume upstream and a fourth volume downstream the second piston, and an inlet to the first volume and an outlet from the first volume. The first volume is connected with the third volume by a first communication path and the second volume is connected with the fourth volume by a second communication path.