So, I've been coding for many years, but am new to sensors and electronics. As a learning project I've decided to make a foosball game with automatic scoring count.
Basically what I need is a sensor which detects when the ball passes through the goal opening.
One way would be to lead the ball, when it is inside the goal pit, toward to a single optical (or pressure) sensor. But this gives some time lag, and also may fail if the ball bounces back out.
So ideally I would like it to detect exactly when something passes through the opening, perhaps also say something about its size.
Could this be done with a relatively simple (i.e. not too expensive) sensor set up? Would I need some kind of array, or can it be done with one or two sensors?
Any pointers on this is much appreciated :)