A photoelectric detector includes an electronic card connected to an emit member and a receive member, the emit member emits at least a first light signal, and the receive member receives at least a second light signal reflected from the first light signal; a cap that includes an emit lens and a receive lens made of a translucent material and positioned in front of the emit member and the receive member, respectively; and a fixing support made of an opaque material to which the card and the cap are fixed. The support has a protruding central blade that is inserted into a separating slot in the cap, between the emit lens and the receive lens.