Model for the response of an optical sensor based on absorbance measurements to HCl