For this project we had to create a skittle sorter that can singularize, identify color, and sort color correctly. There was many steps to this process with serval challenges we faced along the way. I personally worked on this project with Titus Smith, together we created a working skittle sorter.
The funnel is the first part of the process of singularization, which allows a bag of Skittles to be stored and dropped down 1 by 1 to the grabber.
Our grabber is a circle with a hole cut out that is the diameter of a skittle, this is used to transport skittles from the funnel
The servo is connected underneath the grabber and spins the grabber to 3 different angles. This servo is one of the most important parts, and every other component works off it.
The code above is for the servo to make go back and forth, taking one skittle at a time. This code also accounts for stopping at the color sensor and resuming at the drop-off area. When the code says:
"my_servo.angle = 180"
It rotates the servo to an angle of 180, which is a set position where the funnel drops a skittle into. This goes hand and hand with the line of code that says
"time.sleep(.5)"
This line of code makes the servo wait for .5 seconds after moving to the designated position and then run the next line of code.
The color sensor is attached above the grabber to scan the skittles when it stops. Coding and correctly placing this part of the skittle sorter was the hardest task to do. This was mainly due to the constant change in placement, and due to the lighting change, the code had to change.
The sensor works off a set of parameters and if statements. The color sensor reads the RGB, and each color has its own set of parameters with certain values of RGB. For example, Orange has the parameters of:
"red >= 15 and green >=10 and <= 18 and blue <=3:"
This line of code above tells the sensor the parameters of the color of orange, and when a skittle is scanned and fits the parameters, it prints "This is orange" and the servo below takes that print and moves to the angel set for that color.
This ramp is used to guide the skittles into the bin of their color after they are dropped. A problem we found along the way of creating the funnel was trying to keep the original momentum. Because of this, Skittles would lose their momentum and get stuck on the slide itself. To fix this issue, we created a semi-circle-shaped ramp in an attempt to keep the momentum.
The highlighted code above is the reaction code that the servo performs after the color is identified when being scanned by the sensor. For example, this piece of code is reacting to the color orange being sensed. Therefore, the servo will then rotate to the designated position.
This is the servo that connected to the bottom of the ramp. This servo reacts to all the if statements from the color sensor and moves the ramp to designated angle.
These bins are 3D printed and have labels for each color. These bins took 3 attempts to print due to many print failures as well as a lack of filament. Ultimately, they turned out nicely and were a good addition to the sorter.
This project was different than any other project I've done before. Mainly due to the amount of time spent on it alone, as well as the long trail and error process in order to get it to work perfect.
One challenge I overcame during this project was lining up finger joints and bending of the cardboard as we were painting it. I think it was due to the cardboard becoming saturated and warping. I fixed this with pure willpower and lots of time to match the finger joints perfectly.
I am most proud of our color sensor having 100% accuracy at identifying the colors.
For this project I learned and created a facial recognition model. This project was quite the under taking and was a major learning experience. It mainly opened my eyes on coding and amount of possibilities there are, even with basic functions and lines of code.
The main point of this project was to create a robot to be used during the school lantern festival. The brief shown, lists the requirements and the necessary functions of the robot.
The engineering process of creating this robot and its prototypes is recorded Here. This documentation includes what we learned beforehand and how I put that to use for creating my final robot.
On-Shape is a digital fabrication program that i used to create several parts of my robot. I mainly used in addition to the laser cutter. Using the laser cutter, I was able to make finger joints which were used to create strong 90-degree angles. On-Shape can also be used for 3d printing purposes. I 3d printed 2 designs using On-Shape, which was my servo mounts and my ball-bearing mount. Both of these designs were the backbone of my robot and were rarely changed. Unlike the base, which went through about 3 different variations before I landed on a finale design.
Coding was possibly one of the most important parts of this project mainly because, if your code didn't work neither did your robot. The coding language we used for this was Circuit Python. This coding language is very code for beginner coders because its simpleness compared to other coding languages. Yet, Circuit Python still allows for complexity, such as "If" statements and functions. A couple of examples of this is the functions used for the for forward, backwards, left, and right. These functions are helpful because every time I want to make the servos go in certain direction I can say Forward () and not have to write all the code for it. The way "If" statements were used in my code, was for the Bluetooth module. An example of this is "If triangle was pressed:" change lights to red.
In the end the robot turned out well. Overall, the construction is quite solid besides maybe the front. Sadly, during the races at the Lantern festival some parts broke, such as the fins and the propeller on the top and back of the robot. The name of the submarine is the B.G.S, which stands for "Blue Green Submarine". Which is also incorporated into the paint scheme.
In total the functionality of my robot is quite good. The turning is quick and my robot stands still while turning, but sometimes it is a little fast and can be hard to control. The forward is most times good, besides having a small drift that comes and goes. One problem I did have towards some of final races was that the left motor was turning off and on again. I was not able able to fix this problem, but if I was able to attempt this again I would see to fix it.
Compared to other classes this I found this project quite enjoyable. Mainly because of the amount of freedom this project came with. I could have chosen any design I wanted, which intern, I think it made put more effort into it. Just based off, I liked what I was creating. The skill I reckon I could teach other people would be how to create finger joints. From my time using OnShape I have gottem pretty good at using he tools they have to offer. As well as, that this skill is not that hard to teach too.