  We use a string of confined $^{40}$Ca$^+$ ions to measure perturbations to a
trapping potential which are caused by light-induced charging of an
anti-reflection coated window and of insulating patches on the ion-trap
electrodes. The electric fields induced at the ions' position are characterised
as a function of distance to the dielectric, and as a function of the incident
optical power and wavelength. The measurement of the ion-string position is
sensitive to as few as $40$ elementary charges per $\sqrt{\mathrm{Hz}}$ on the
dielectric at distances of order millimetres, and perturbations are observed
for illumination with light of wavelengths as long as 729\,nm. This has
important implications for the future of miniaturised ion-trap experiments,
notably with regards to the choice of electrode material, and the optics that
must be integrated in the vicinity of the ion. The method presented can be
readily applied to the investigation of charging effects beyond the context of
ion trap experiments.
