If the right amount of balls are installed in the machine then it is a trough opto problem.
Usually it will be a broken solder joint or trace on the transmit side on one of the LEDs or resistors.
Or you have a faulty led
Do a switch test and put 1 ball at a time into the trough and make sure all of the Ball positions are triggered as you put the balls in