Novel optical pH sensor for high and low pH values