Sensor for paint thickness measurement