1WANT TO MAKE YOUR OWN???
Once you have downloaded and printed the parts you should end up with something like this :
Note that the front shell comes in 2 versions . No real difference they just look different .
The rest of the parts needed .
The wiring is pretty straight forward . Just make sure your buck converter output 5V before plugging anything to it !!!!!
5INITIAL SETUP .
The first thing the machine does when you turn the power on is to move both servos to their initial position . When you start the machine for the first time you need to make sure the gear/shaft collecting the skittles is at its top position and that the tube holder is align with the feeding mechanism .
If you decide to make this sorting machine yourself you might run into a few common issues . here is how you can resolve them .
LED blinking red - no starting sequence :
After moving to it's initial position the machine should go through its starting sequence . If it doesn't and instead the LED blinks red, it means you have some issues with your RBG sensor not being found . There is either a problem with your wiring or the sensor being faulty .
Tubes don't align properly :
During the starting sequence the tubes holder will move 5 times, once for each color . You might notice that the tubes don't align too well with the feeding mechanism . This could be due to the servos no being super precise or to some variations in the print dimensions .
This can be corrected through software by modifying the colour_angle variable array . Each values in this array represent the servo position for each color, by changing those values you can fine tune the where the tube is going to stop for each colors .
Due to printing tolerances you might also get some backlash in the tubes holder gears . Depending which way the tubes are spinning their inertia can make them overshoot their stopping position . This can also be corrected through software by modifying the forward and backwash anti backlash variable .Those value will be added to or removed from the color angle values depending which way the holder is spinning to compensate for this backlash .
Color mixing :
If you experience some color mixing, you will have to modify colour_limit_values arrays . Each values in those array represent the minimum and maximum values for Red, Green and Blue . To have a better idea of what the values should be, load the machine with only one color, plug the machine to your computer and open the serial monitor . Every time a Skittle is being checked you should get its read RGB values and what color the program think it is . This should give you a better idea of what sort of values should associated with each color .
7EXTRA NOTES .
Note 1 : I printed my machine in black, this will have an impact on what color values the sensor will read especially when no Skittles is collected by the feeding mechanism .
Note 2 : After going through the sorting process several time the Skittles colors seem to become more difficult to read reliably . I assume this is due to them losing their shine after rubbing inside the reservoir to many times or them going a little stickier when handled by hand (sounds gross!) . When calibrating the color values try to use 'fresh' Skittles .
Note 3 : Please make sure you take all precaution necessary when handling food . This include you make sure to use food safe printing filament .