Contact and dispersive forces are important in the design of Micro Electro Mechanical Systems (MEMS). The influence
of random surface roughness of Au films on capillary and Casimir forces is explored with atomic force microscopy in
the plane-sphere geometry. In case of the Casimir force the experimental results are confronted to theoretical predictions
for plane-sphere separations ranging between 20 and 200 nm. The optical response and roughness of the Au films were
measured and used as input in calculations of the Casimir force. It is found that at separations below 100 nm the
roughness effect manifests itself through a strong deviation from the usual scaling of the force as a function of distance.
The difference with predictions based on perturbation theory can be larger than 100%. In addition, the capillary force
was measured using an atomic force microscope between a gold coated sphere and gold surfaces with different
roughness, i.e. from atomically flat up to 10nm rms roughness. A substantial decrease in the capillary force was
observed with increasing RMS roughness up to a few nanometers. For smooth surfaces, in contact, the capillary force
surpasses other force fields either the van der Waals/Casimir or the electrostatic force. For rougher films the different
forces become comparable in magnitude. From these measurements two limits can be defined, i.e. a smooth limit where
the whole surface interacts through the capillary force and a rough limit where only a single up to a few asperities yield
a capillary contribution.