Patent ID: 7285769

Claim:
An optical encoder comprising: an optical scale including a light transmission portion having a flat surface and a light non-transparent portion having inclined surfaces, and producing an output pattern based on incident light, the output pattern functioning as an optical code; a light source portion including at least one light source for emitting the incident light; and a light detecting portion including at least one light detecting element for detecting the output pattern, wherein said light source portion faces said light detecting portion and said optical scale is interposed between said light source portion and said light detecting portion, said light non-transparent portion includes at least one pair of first and second inclined surfaces which are opposite each other and become farther apart from each other towards said light source portion, where the incident light enters said light non-transparent portion, and inclined so that an incident angle of the incident light from said light source on said first and second inclined surfaces is not smaller than critical angle of incidence, and the incident light incident on said first of said inclined surfaces is totally reflected by said first inclined surface and is incident on said second inclined surface so that at least part of incident light is reflected from said second inclined surface, and reflected light, which is reflected from said second inclined surface, does not enter a light emitting portion of said light source and does not enter a reflecting portion disposed around said light emitting portion.