Optical pH sensors are devices that measure the pH of a solution by using light. These sensors typically operate based on the principle of absorbance or fluorescence of pH-sensitive dyes. When the pH of the solution changes, the optical properties of the dye change, allowing the sensor to detect and quantify the pH level.