A new procedure is presented with which the diffusion coefficient of water in partially saturated porous materials can be measured. The first step in the procedure is the creation of a non-equilibrium situation inside a sample by placing it into a centrifuge. In the second step, the mass of the sample is measured by hanging it from two cables, each connected to a balance. The comparison of the time evolutions of the measured masses and the masses as predicted using Fick's second law gives the diffusion coefficient.