Taqi al-Din's six-cylinder pump was powered by a waterwheel on a shaft with six spiral-spaced cams. The cams on the rotating shaft activated a series of connecting rods, which would in turn each pull a piston up to such water through a valve into the cylinder. As the shaft rotated, releasing the rod, a weight pushed the piston down again, forcing the water to leave the cylinder through a pipe that was connected to the supply system.