An optical encoder module for detecting light which is modulated by a code wheel. The optical encoder includes an emitter (80) comprising a light emitting element (120), and a transparent medium encapsulating the light emitting element, the transparent medium having a convex aspherical external surface (140) shaped so as to focus light received from the light emitting element into a substantially collimated beam of light for illuminating the movable member. The optical encode module also includes a detector (90) facing the emitter for detecting modulated light of the collimated beam transmitted through the movable member.