  Nitrogen-vacancy (NV) centers in diamond have attracted considerable interest
in sensing of weak magnetic fields, such as those created by biological
systems. Detecting such feeble signals requires near-surface NV centers, to
reduce the distance between NVs and sources. Moreover, dense ensembles of NVs
are highly desirable to reduce measurement time. However, robust charge state
switching is often observed in these systems, resulting in a complex interplay
between charge and spin dynamics that can reduce the attainable level of spin
polarization, and consequently, sensitivity. Understanding the mechanisms
behind charge state switching is, therefore, crucial to developing NV based
sensors. Here, we demonstrate a novel method to selectively measure charge
dynamics in an ensemble of NVs by quenching the spin polarization using an
off-axis magnetic field. Utilizing this technique, we show that, in
nanodiamonds, charge state instability increases with increasing NV density. In
the case of bulk single crystal diamond, we show that NV centers located near
the surface are more stable in the neutral (NV$^{0}$) charge state, while the
negatively charged (NV$^{-}$) form is more stable in bulk.
