Double beam modulation is widely used in atomic collision experiments in
the case where the noise arising from each of the beams exceeds the
measured signal. A method for minimizing the statistical uncertainty in a
measured signal in a given time period is discussed, and a flexible
modulation and counting system based on a low cost PIC microcontroller is
described. This device is capable of modifying the acquisition parameters in
real time during the course of an experimental run. It is shown that typical
savings in data acquisition time of approximately 30% can be achieved
using this optimized modulation scheme