Skittle Sorter

Have you ever wished to separate the colors of your Skittles before you eat them? We created the perfect invention, the Skittle Sorter, to help sort your candy into individualized tubes. You can now enjoy your Skittles by eating one color of the rainbow at a time!
Supplies


From SparkFun Inventors’ Kit – v4.1.2
- Sparkfun Inventors' Kit https://www.sparkfun.com/sparkfun-inventor-s-kit-v4-1-2.html
- 1 Arduino Uno
- 1 Small Bread Board
- Wires
- Servo with white four petal plastic attachment
Outside of the Kit
- Color Sensor https://www.amazon.com/Teyleten-Robot-TCS230-TCS3200-Recognition/dp/B08HH8QYF8/ref=sr_1_1_sspa?crid=Q9A5Y6N5UASJ&dib=eyJ2IjoiMSJ9.Rh-iSB4O8efW_XG-LqWoS7JqRyvm-lCQEnx0Tty4u3U-qWxccmUZs0nEX-puICsMMNmSJmNh-WEULsbXvYGBgH3Y2s87z4QfpABav1DTjikGUt4Wpp1DOEmf99sD5udLHp5soFLTNHo_8aroSlEP8cVN-GP8O1T9IF3sygKC-eBHO3m7yYZgI7-_SOa0BybOD8KHf_c7IjviINr_WHelwPb_SnrV9B4pW-ocmgqHPto.UJO7i4N7TQ44RUrs_IpL0jFPRUXNtGCm5azatJZzpLM&dib_tag=se&keywords=color+sensor+arduino&qid=1745278338&sprefix=color+sensor+arduino+%2Caps%2C152&sr=8-1-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1
- 3D printer
- Black filament (vital for the Base Plate and Rotating Disk 3D printed components)
- Skittles
- Cardboard
- Boxcutter/Scissors
- Tape
- Hot glue gun w/ glue
3D Print Provided Components






Filament and Printing Time based on a Bambu Lab P1S 3D Printer:
- 1 Base Plate
- Main plate that holds the sorted skittle tubes
- Filament: 27.36g
- Printing Time: 47 min
- 1 Rotating Disk
- Pushes the skittles from the color sensor to their respective tubes
- Filament: 21.74g
- Printing Time: 36 min
- 1 Frame
- Holds the cardboard platform of the Skittle Sorter
- Filament: 6.28g
- Printing Time: 54 min
- 5 Vials
- Holds the Skittles, duh!
- Filament: 55.64g (all 5 Vials)
- Printing Time: 2 hr 43 min (all 5 Vials)
- 1 Tube
- Holds a column of Skittles that are yet to be distributed
- Filament: 12.69g
- Printing Time: 1 hr 19 min
- 1 Cover
- Covers the color sensor from other interfering lights
- Filament: 156.03g
- Printing Time: 5 hr 36 min
Total Filament: 279.74g
Total Printing Time: ~12 hr
Wiring
- Start by connecting the breadboard to the Arduino Uno by wiring both a power wire and a ground wire to their reciprocating inputs
- Wire the S0 pin from the color sensor to Pin 2 on the motherboard
- Wire the S1 pin from the color sensor to Pin 3 on the motherboard
- Wire the S2 pin form the color sensor to Pin 4 on the motherboard
- Wire the S3 pin form the color sensor to Pin 5 on the motherboard
- Wire the output pin from the color sensor to Pin 6 on the motherboard
- Wire the GND from the color sensor to any ground row hole on the breadboard
- Wire the VCC from the color sensor to any power rail hole on the breadboard
- Wire the black ground wire from the servo to any ground row hole on the breadboard
- Wire the red power wire from the servo to any power rail hole on the breadboard
- Wire the white signal wire from the servo to Pin 7 on the motherboard
Double check your wiring and verify that all of it is correct! It is vital to make sure that the wiring matches the instructions above to avoid the possibility of short-circuiting your board!
Coding
- Download the given code and input it into your Arduino Lab software
- Transfer the code into your Arduino Uno
Downloads
Construct Non-Printed Components


All measurement dimensions are Length(or Height) x Width (in inches)
- Cut a 6 1/2" x 4 1/2" rectangle (platform); we will call this component "A"
- From Step 1's cardboard cutout, cut out a small hole (big enough to fit the spinning component of a Servo, but small enough to not have the entire Servo fit through) that is 1' in from its shorter front side and 1 3/4" from its longer right side
- Cut a 1 7/8" x 7/8" rectangle (vertical component of color sensor structure); we will call this component "B"
- Cut a 2' x 7/8" rectangle (horizontal component of the color sensor structure); we will call this component "C"
- Cut a 5' x 3' rectangle (Tube's wall); we will call this component "D"
- From Step 5's cardboard cutout, cut out a 2' x 1 1/2" rectangle from the bottom right
- Cut a 2 1/2" x 2' rectangle (support structure for Tube's wall); we will call this component "E"
It is okay if the cardboard component measurements are not exact, as they are merely structures to hold the rest of the project; on the other hand, position the cutout for the Servo accurately.
Assembly









- Hot glue the top edges of the Servo to the cutout created on A; it should not peek all the way through, but enough that the 4 winged plastic component for the Servo's rotor to peek through the Rotating Disk in the later steps of assembly
- Place the Frame on a flat surface with the four prongs facing upwards
- Center A onto the four prongs of the Frame and hot glue them together
- Slide the Arduino Uno under A and on top of the rectangular surface of the Frame
- Attach the 4 winged plastic component from the SparkFun Kit to the rotor of the Servo
- Hot glue the Base Plate onto A, allowing the holes for the Vials to be extended off the platform whilst allowing the Servo to fit within the circular area of the Base Plate's design
- Center the Rotating Disk onto the Servo's rotor attachment, then hot glue together; make sure that the Rotating Disk and the Base Plate are aligned with one another, meaning they overlap one another almost exactly
- Run the code to mark the "set zero" angle of the servo (look at image for reference - ours says "160"); this mark is crucial for the alignment/positioning of the color sensor and Tube stand
- Hot glue one short end of C to one short end of B
- Hot glue the free short end of B to the cardboard platform, approximately 1' from the edge of the Rotating Disk / Base Plate and approximately 1/2" from the "set zero" mark from step 8; the tip of C should approximately extend to the far edge of the first divot of the Base Plate
- Tape the color sensor to the bottom of C; it should be positioned far out enough that the circular color sensing part of the sensor hovers entirely over the Rotating Disk / Base Plate
- Hot glue the bottom part of D approximately 1" from the Rotating Disk / Base Plate and approximately 1/2 from the "set zero" mark from step 8
- Hot glue the short side of E orthogonal to the center of the hot glued bottom edge of D
- Hot glue the Tube to D; one edge of the Tube should align with the edge of the Rotating Disk / Base Plate and the bottom of the Tube should barely hover above the Rotating Disk / Base Plate (look at image for reference)
- Create a hot glue wall in the shape of an L (look at images for reference); their purpose is to create a mini wall for the Cover to prop against when the Skittle Sorter is in action
Procedures
These instructions are procedures to follow before running the code:
- When inserting Skittles into the Tube, make sure the Rotating Disk is under the Tube; Skittles will jam and/or spill out of the Tube if this is not checked
- When positioning the Cover onto the Skittle Sorter, make sure that the edge that hovers over the Rotating Disk
- After all inserted Skittles are sorted, unplug the cord that powers the device to stop the functions, then insert more Skittles into the Tube
Video

Here is the Skittle Sorter in action!