the first reflecting portions 39a from the ends of the light sending optical fibers 14a 15a 35a 36a and is reflected by the first reflecting portions 39a toward the first to third light shielding discs 26a 26b 26c when the light shielding areas 27 28 31 34 of the first to third light shielding discs 26a 26b 26c are in transmitting positions light is transmitted through the first to third light shielding discs 26a 26b 26c and directed to the second reflecting portions 39b then reflected by the second reflecting portions 39b to the light receiving optical fibers 14b 15b 35b 36b the light directed to the light receiving optical fibers 14b 15b 35b 36b enters the light receiving devices 21 fig5 is photoelectrically translated therein and is output as an electrical signal e g a low level signal in a conventional manner by way of contrast when the light shielding areas 27 28 31 34 of the first to third light shielding discs 26a 26b 26c are in shielding positions light is not transmitted through the first to third light shielding discs 26a 26b 26c i e light does not reach the second reflecting portions 39b and is not directed to the light receiving optical fibers 14b 15b 35b 36b in this situation the light or its absence is converted to an electrical signal e g a high signal by the light receiving devices 21 thus a speed signal for detecting the speed of a sewing machine 1 can be detected by the speed detecting light shielding area 27 a sewing machine needle up position by the needle up position detecting light shielding area 28 a sewing machine needle down position by the needle down position detecting light shielding area 31 and a thread.