The structural properties of r.f. planar magnetron sputtered ZnO films are studied as a function of deposition parameters: substrate type, substrate temperature, sputter gas pressure, growth rate and sputtering power. These films are applied as piezoelectric transducers in micromechanical sensors and actuators. The electric properties, and consequently the piezoelectric behaviour, depend strongly on the structural properties of the layers. All films are polycrystalline. The individual grains are highly oriented with their crystallographic c axis perpendicular to the substrate. Crystalline substrates such as silicon or SiO2 induce a growth of small grains, a few hundredths of a micron wide and long. Amorphous substrates such as metals or amorphous SiO2 induce a growth of broad columnar grains extending through the film thickness and a few tenths of a micron wide. Trends in density and grain size are in agreement with Thornton's structure zone model.