The working principle is based on a mechanism that can carry the skittle when rotating in one direction and drop it when rotating in the opposite direction, the following animation shows the operation:
The servo drives the lower disc, which also drives the upper disc after rotating 25.7º (or 1/7 of 180º)
There are 6 phases:
1. The skittle enters the upper disc
2. The colour sensor (located below the loading position) reads the colour
3. The lower disc rotates 1 position, holding the skittle in the upper disc and closing the colour sensor
4. Both discs rotate the requested number of positions to reach the correct container slot
5. The lower disc then rotates back 1 position, letting the skittle to drop
6. Both discs now rotate back to the initial position, letting the next skittle to enter the upper disc, and restarting the cycle
Because of its simplicity, the electronics are quite straightforward:
Just a servo, an Arduino and a color sensor, all neatly packed under the main body.
Here is a video of the first functional prototype: