Optical Sensor for the diagnostic of high voltage equipment