This third project focused mainly on designing a system that can sort and dispose of different type of recyclable containers. How this was achieved was through a combination of both computing elements such as coding with a simulation and modeling elements with the hopper disposing mechanism. I was part of the computing sub-team during this project which meant that our team was responsible for coding functions to complete several objectives required for the sorting system to work.
We began by identifying our initial problem statement, objectives, and constraints.
Objectives:
Constraints:
Followed by writing pseudocode for each of the 5 main functions which were:
Since the Q-bot was able to use several different sensors, we had to decide which of the four would be the best to use. Based on our research, we determined that the color sensor would be the best choice, despite it’s many inaccuracies in a real life setting. Fortunately, we did not need to worry about this within a simulation. It was also much easier to program the Q-bot to distinguish each bin as well.
We used the interface of Quanser Interactive Labs to run the simulation using our Raspberry Pi.
Quanser Interactive Labs of the sorting system simulation
The general workflow begins with dispensing containers and assigning the container properties which are material, mass, and destination bin-id into variables. Those variables are then used to determine whether or not another container should be transferred to the Q-bot based on any of the three conditions:
The Q-arm then picks up and loads the container(s) onto the Q-bot. It then uses the IR proximity sensors to follow the provided yellow line around a loop to the correct bin. Once it identifies and aligns parallel to the bin, it dumps the container(s) inside using the rotary actuator.
Q-bot dumping the container into the correct bin
It then continues to follow the line’s trajectory until it reaches its initial home position. This process repeats infinitely until the user terminates the program.