Sorting and Recycling Containers
Summary
For this project, I designed a system for sorting and recycling containers of varying materials. Just like the last project, this project consisted of a design sub-team and a computing sub-team, only I was part of the computing sub-team this time. As part of the computing sub-team I had to create a program that is able to sort out the different types of containers using the most suitable sensors which I determined through thorough researching, then depositing the containers to the correct recycling bin. The design team was required to build a device which will allow for the transfer and deposition of the recyclable containers.
Objectives
Objective 1: The computing sub-team needs to write a computer program that interfaces with the QuanserSim environment which is able to complete the following tasks:
-
Identify the presence of a container based on simulated data from a sensor.
-
Classify the container as either metal, paper, or plastic, based on simulated data from two sensors.
-
Verify the container as either being recyclable or non-recyclable based on the type of material and simulated data from a load cell (that measures container mass). Once the container has been verified, it is ready to be picked up and transferred to the Recycling Station.
Objective 2: The modelling sub-team was required to design, model, and simulate a device for depositing containers into a recycling bin. They built it based on a given base plate that mounts on top of the Q-bot as well as various other components (e.g., containers, an actuator, etc.).
Objective 3: The computing sub-team was required to write a program that interfaces with the Quanser Interactive Labs (Q-Labs) environment, controlling movement of both the Q-arm and Q-bot to transfer containers from the Sorting Station to the correct bin in the Recycling Station (i.e., Metal/Paper/Plastic/Garbage).
Objective 4: For the final stage of this project we needed to present our design during a scheduled project interview. During this interview, it was required that we explained our design and justify our design decisions by answering questions asked individually and as a team. For the Modelling Sub-Team, this includes verifying that the correctness of your assembly and simulation. For the Computation Sub-Team, this includes verifying all containers can be successfully transferred to the Q-bot and deposited in the correct bin in the Recycling Station.
Milestones
Milestone 0
As with all projects, this project started with us getting our positions for the project. For this project I was the subject matter expert whose responsibility is to build a database that documents all sources of information gathered and research conducted, which is later used for our Project Report. Furthermore, I was in the computing sub-team for this project, so I will be handled the programming aspect of it.
Milestone 1
The goals for this milestone was to create a problem statement using a how/why ladder. The second goal was to identify all our objectives and constraints. To determine our finalized problem statement we used a how/why ladder around the question "Design a system for sorting and recycling containers". This allowed us to truly understand the problem and gave us more insight on what we were required to do. Based on on ladder, were able to come up with our finalized problem statement:
To develop a system that is able to distinguish between materials and able to put corresponding material into appropriate bins through the effective recycling process. This will help to ensure that all recyclable materials will be recycled and not lost because we have finite resources, so we need to make the most of it.
Based on our how/why ladder and project module, we have determined the following objectives and constraints below:
Objectives
-
Container should be lightweight
-
The container should have large holding capacity
-
Secure, containers will not fall off when the q-bot is in motion.
-
Able to properly deposit containers, and containers will be placed in the corresponding bins.
Constraints
-
The hopper must hold minimum of 3 containers
-
The actuator mechanism has to be in the back end of the base plate, and it has to be within 130.175mm by 101.300mm
-
The device must connect to a rung mounted on the pivot leg
Milestone 2
This milestone involved conceptualizing how the containers will be deposited and transferred. As part of the computing sub-team, I had to research several sensors that could be used to differentiate between the recycling bins. The design sub-team had to create concept sketches for the mechanism the would deposit the container.
Computing
We were given several sensors as shown below, which we had to describe on how they worked and determine useful attributes that we could measure to characterize each bin.
Based on our research, we summed it all up in the next table to determine which sensor would be the best to use in our program. We decided that the ultrasonic sensor will work best to determine the different bins.
Milestone 3
This milestone involved in writing out pseudocode for our program. Our pseudocode needed to contain five functions which were the dispense function, load function, transfer function, deposit function and the return home function. We will need to write a set of functions to accomplish the following tasks:
1) dispense a container at the Sorting Station ,
2) load containers onto a hopper mounted on top of the Q-bot,
3) transfer the container(s) to the correct bin in the Recycling Station,
4) rotate the hopper to deposit the containers into the correct bin, and
5) return the Q-bot to its Home position, repeating the above tasks until the program is terminated by the user. However for this milestone and the upcoming milestone where we will be demonstrating our program to our interviewer, it only needs to complete one cycle. For the final deliverable we will need to make it so that the program can repeats the tasks until it is terminated.
Define Function:
Set Q-bot and Q-arm at home position
Input my_table.dispense_container(x)
My_table.container_properties(x) to identify the container
Input rotate_table_angle()
Dispense Container Function:
Load Container Function:
Define function:
Q-arm opens claw using arm.control_gripper(x deg)
Q-arm moves to XYZ position, positioning the gripper end-effector adjacent to the container using arm.move_arm()
Use: arm.control_gripper(x deg) to grip container
Use arm.move_arm to XYZ position above the Qbot
Q-arm opens claw using arm.control_gripper(x deg)
Q-arm goes back to XYZ position, positioning the gripper end-effector adjacent to the container using arm.move_arm()
Define if statement where if less than or equal 3 containers and next container identical to previous container then, add another container. Else, Qbot will depart
Define if statement where if mass of serve exceeds 90 grams, Qbot will depart.
Transfer Container Function:
Define Function:
Define speed of the Qbot: Bot.forward_speed(x)
Stopping at first bin: bot.stop(XYZ)
If Qbot reaches position
Stop, rotate, scan
If colour matches
Forward, rotate, dump
Elif Qbot reaches position
Stop, rotate, scan
If colour matches
Forward, rotate, dump
Elif Qbot reaches position
Stop, rotate, scan
If colour matches
Forward, rotate, dump
Else:
Forward, rotate, dump
Deposit Container Function:
Define function:
When at correct location, execute bot.dump()
Reset actuator with bot.activate_actuator()
Return Home Function:
Use bot.follow_line(0.1) once Qbot at the yellow line by the bin.
Stop at home position using bot.stop()
Terminate program
Milestone 4
For the fourth milestone we had to create a program that completes one cycle of our functions from the previous milestones. With our program we presented it to our interviewer who gave us feedback on what to work on for our final interview where the program runs continuously until its terminated. Below is the video of the simulation that was presented, and below that is the feed back.
Feedback
-
Arm moves while dropping bottle causing it to fall over in the bin
-
Try to avoid while loop = true with 4 if statements (or add else statement at the end of Transfer_Container)
-
Look into coordinates
-
For the while loop in transfer container, add an else statement to make sure it wont run infinitely
-
Find new coordinates for when the Q-arm drops of the containers, so the containers wont spill over.
Final Deliverable
Research Summary
The objective for this project was to create a system for sorting and recycling containers of different material. The team was split into two subgroups: a design team and a coding team. The design team was to design a mechanism/device to deposit containers into a recycling bin. The coding team was to design a computer program to transfer containers from the sorting station to the correct garbage bin in the recycling station.
Modelling Design
Before jumping straight into designing a mechanism for dumping trash into a recycling bin, the modelling team had to come up with concept sketches of a potential mechanism that could achieve the given task. After completing these sketches, the modelling team got together to discuss each mechanism and decide upon which one was going to be best for the given scenario. This was done utilizing a decision matrix which considered different objectives such as lightweight, compact, rotation, stability, etc. Through this, the modeling team concluded that mechanism 3 which utilized the linear actuator, and a linkage assembly would be the best candidate as it limited the number of moving parts while ensuring the other major objectives of sufficient rotation and lightweight were met. From there, the modelling team began designing each component for the assembly which raised a major issue regarding rotation. The overall design did not rotate as much as expected, so the modelling team had to design a track that guided the linkage assembly (Figure 1) to address this issue. This track enabled the hopper to rotate roughly an extra 20 degrees making it suitable and capable of depositing trash. Lastly, that model was fully constrained, and a simulation was created.
Track for linkage assembly
Computing Design
The design of the computer program was created with the goal in mind that the program can sort and deposit containers into their correct bins without any user input. The Q-Arm is able to identify, classify, and verify containers for recyclability. From there it loads it on to the Q-bot while following our constrains. The constrains being the mass on the Q-bot not exceeding 90 grams, not more than 3 containers on the Q-bot at a time and only loading the same container of more than 1 containers should go on the Q-bot. Moreover, the program is able to transfer containers from the sorting station to the correct bin in the recycling station using the ultrasonic sensor.
The program consisted of 4 functions, dispense, load, transfer, and return home. The dispense function would dispense a bottle onto the sorting station and print out its properties whilst storing its values. The load function would control the Q-arm and transfer the container onto the Q-bot. Transfer function will activate the Q-bot and start transporting it on a certain path to the according bin in the recycling station and dump whatever is on top of it, using the actuator. Lastly the return home function speaks for itself, it returns the Q-bot back to its original position following a certain path.