Development of a molecular dispersion spectroscopy instrument for livestock farming