U-shaped photo sensor