the rising point and the falling point of the signal a respectively and the pulse signal e is generated at a point a little lagging from the signal d these signals c d e are respectively given to the reset terminal r of a counter ct to the trigger terminal cp of a latch circuit lu to the load terminal l of a presetable counter pc and to the reset terminal r of a flip flop circuit ff am is an astable multivibrator which produces pulses independently of the rotation of the sewing machine with a frequency dividing one reciprocation of the needle into about 128 at the highest possible high rotation of the sewing machine and is connected to the other inputs of and circuits and 1 and 2 respectively the counter ct is a binary counter which is reset when the control power source is supplied and when the terminal r receives a signal and receives the output of the and circuit and2 at the trigger terminal cp to count each of the outputs of 5 bits from 0 0 0 0 0 to 1 1 1 1 1 in one unit of 16 pulses and the output is applied to the so many inputs of the latch circuit lu and to the inputs of nand circuit na the output of the nand circuit na is connected to the third input of and circuit and2 to stop the counting operation of the counter ct.