For the large candy container warehouse that I am building (click here to read more details), I need three more builds:
A candy feeding mechanism. I need a mechanism that feeds one candy at a time to a conveyor belt.
Color detection. The color of the candy needs to be determined.
Systems that puts the candy into a container.
The container can then be conveyed to the warehouse where it can be stored sorted by color. The color as determined in step 2, needs to be passed to the warehouse brick so it can store the container on the right level.
Color detection (step 2)
I started with step 2. To realize the candy sorter, I needed to know if a Pixycam (see www.charmedlabs.com/default/pixy-lego/) can distinguish the colors of the candy. The colors are not bright (like the Lego bricks), so I wasn't sure if it was possible.
I created a quick setup to test the color detection:
Next, I placed the four different candies (Fruit-tella) on the conveyor belt and programmed the camera for the four colors.
This is the image of the camera, from left to right: (1) raw video, (2) cooked video (= mix of raw video + color detection) and (3) detection only video.
Finally, I made a simple test EV3 program. With the addition that the detected block should be more than 20 pixels in width, it detects the candies in the correct color.
Candy feeding mechanism
Ok, so I have a conveyor belt with a candy on it. But how do I get the candy, one by one, on the conveyor belt. This is where the feeder comes in. I searched the internet for 'real life' solutions. I found out that a rotary feeder or bowl feeder would do best. I tried to make a vibratory bowl feeder (out of 16 circle gear rack elements 24121), but that didn't work. However, rotating the bowl seemed to work so I made a prototype based on rotation and gravity. The bowl is placed at an angle of +/- 20 degrees and then it just rotates in a steady pace.
The result was good: it never happened that two candies were fed to the conveyor at the same time.
The next step is to make a more solid version and add the color detection unit to it. I'll keep you posted.