Introduction: Automatic Waste Sorting Machine

Figure 1. Automatic Waste Sorting Machine

Step 1: Working Principle of the Automatic Waste Sorting Machine

Figure 2. Automatic Waste Sorting Machine

Goal of the project

• Goal of this project is to sort minimum three different types of wastes: Plastic, Metal and Glass.

• The waste is directed by the pipe into their respective waste bins.

Object Detection/Restrictions
• Sorting wastes of different sizes and shapes is possible, but the performance is better with objects of cylindrical shape or cubic shape with limitations of the size (in terms of height) of a Coca-Cola Cans (waste should be limited to a maximum of 1kg).

• The restrictions are due to the design constraints of our waste sorting machine, modifying the size of the sorting machine (e.g. Gate, Pipe diameter) will make it more adaptable to different shapes, sizes and weight of the wastes.

• The capacitive sensor is very sensitive in detecting plastic waste, anything inside/around the plastic object affects the accuracy of the sensor.

Future implementations.
Our waste sorting machine is only a prototype. With modifications and improvements a similar concept of our waste sorting machine can be implemented in house hold, offices and industrial applications.

Step 2: Photos of the Automatic Waste Sorting Machine

Figure 3. Waste sorting machine pictures.

Step 3: Mechanical Aspects of the Project

Figure 4. Mechanical Parts fabricated/printed

3D printed parts (Ultimaker and Prusa)

  • Shaft cover
  • Pipe support
  • V gate Shaft-Bearing support
  • Capacitive and Inductive sensor cover support
  • V gate support

Laser-cut parts

  1. Frame
  2. V gate
  3. Ultrasonic sensor support
  4. Capacitive and Inductive sensor support
  5. V gate motor support

Step 4: Bill of Materials (Mechanical)

1) 4mm Plywood

2) 125mm Upvc Elbow - 1pcs

3) 125mm Upvc Pipe - 1pcs (1m Length)

4) 8mm Ss shaft for Motor - 1pcs (2m Length)

5) Servo Motor coupler - 2pcs

6) Screws and Nuts

7) Radial Bearing 8mm - 2pcs

Step 5: CAD DESIGN

Figure 5. CAD Design

Step 6: 3D Design (Render)

Figure 6. 3D Design (Render)

Step 7: Bill of Materials (Electronics)

In this project we have used:

• One Arduino Uno

• One Prototyping Board

• Soldering material + equipments

• Wires, jump wires

• One Inductive Sensor

• One Capacitive Sensor

• One Ultrasonic Sensor

• Two Servo motors

• One Step Down Converter

• One 6V Power Supply

Step 8: Description of Each Component

Each component as listed below is described, detailing its specification, connections and method of operation.

- Arduino Uno

- Inductive Sensors

- Capacitive Sensors

- Ultrasonic Sensors

- Motors

- Step Down Converter

Arduino Uno

As a microcontroller board we have used the Arduino UNO which is based on the ATmega328P. The Arduino Uno has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button [3].

Inductive Sensor

Inductive proximity sensors have been used to detect metal objects. We have used a larger sensor, based on our requirement of having a larger sensing range.

Type of sensor[Link]:

• Inductive Proximity Sensor Switch Model: LJ30A3-15-Z/AX

• Wire Type: DC 3 Wire Type

•Output Type: NPN-NC (Normally Closed)

• Detecting Distance: 15mm/ 0.59'

•The threads: M30

• Supply Voltage: DC 6-36V

•Current Output: 300mA

Capacitive Sensor

Capacitive sensors can sense any object within their sensing range. When the target approaches the face of the sensor, the capacitance increases, resulting in an increase in amplitude of the oscillator. Then the solid state output switch detects the increase in amplitude and based on that it is turned on or off.

There are different types of Capacitive Sensors. In our project we have used Capacitive Sensors with a compensation adjustment. The capacitive sensor sensitivity depends on the material dielectric constant. Plastic, in fact, has a lower dielectric constant than glass. We have adjusted our sensor in such a way that it can "see through" the objects of plastic nature (to not detect plastic),and glass is detected by the capacitive sensor alone.

Larger sensors have a larger range of detection.

Capacitive sensor specifications[Link]:

• Product Name: Capacitive Proximity Switch LJC30A3-H-Z/BX

• Wire Type: DC 3 Wire Type (Black, Brown, Blue)

• Output Type: NPN NC (Normal Closed)

• Diameter of Column Sensor: 30mm; Detecting distance: 15mm

• Supply Voltage: DC 6-36V; Current Output: 300mA

Motors

We have used servo motors for both gate and pipe, specifically,
we have used TowerPro MG996R servo motors.

Specifications of the TowerPro MG996R servo motor[Link]:

• Weight: 55g

• Dimension: 40.7×19.7×42.9mm

• Stall torque: 9.4kg/cm (4.8v); 11kg/cm (6.0v)

•Operating Speed : 0.13sec / 60 degrees (6.0V no load)

• Operating voltage: 4.8~ 6.6v

• Gear Type: Metal Gear

• servo wire length: 32cm

• Current draw at idle 10MA

• No load operating current draw 170mA

• Stall current draw 1400mA

•Weight: 0.080 kg

Step Down Converter

The DC/DC step-down voltage regulator is capable to convert voltage between 3.2V and 40V into a smaller voltage between 1.25V and 35V. It is capable of driving a 3A load.
We have adjusted this step-down converter for our requirements, respectively the 6V from the power supply has been converted to 5V which feeds the Arduino Uno; this has been done via the potentiometer for voltage adjustment.

Specifications[Link]:

• Input voltage: 3.2V - 40VDC
• Output voltage: 1.25V - 35VDC

• Max. output Current: 3A

• Dimensions: 43mm x 21mm x 14mm(l) x (w) x (h)

• Weight: 12 g

Step 9: Torque

On the choice of the motor it is very important one to have an idea of the torque required for the specific implementation.

In the figure a) are given the calculations for the gate torque. The torque needed for the motor to rotate the gate is calculated to be 1.72875 kg-cm. The diameter of the shaft is chosen 4 mm.

In the figure c) are given the calculations for the pipe torque. The torque needed for the pipe motor to rotate the pipe is calculated to be 1.0495 kg-cm.

Experimentally: the current needed is 0.11 A, which corresponds to the torque of 0.8635 kg-cm. The experimental results are close to the calculated analytical values.

In the figure b) is given the servo motor with the weight (load) of 11 kg suspended in 1 cm which represents the stall torque of 11 kg-cm as given in the data sheet. The necessary torque for the gate and the pipe has been calculated analytically and we concluded that each of the servo motors; are more than sufficient to provide the required torque. Further to note the the maximum current draw from the system was measured to be 0.28 A (when the Pipe Servo is rotating) which is less than the stall current of the motor 1.4 A.

A simple/fast approximation of the torque needed for the pipe servo can be done as follows:

T=F*d
In terms of kg-cm we have:

T=kg*cm

T=0.8 kg *(12.5/2)

T=0.8*6.25=5 kg-cm

This result gives as an indication that the servo motor used can fulfill the requirements in terms of torque.

Simply the motor can pull a weight of 0.8 kg suspended in a distance of 12.5/2 cm and we get 5 kg-cm. Since the Torque is directly proportionally to the current. And speed of rotation is directly proportional to voltage applied to the servo motor.

Therefore, we can analytically now calculate the torque that corresponds to the case of 0.28 A.

T=Kt*I
Tstall=11kg-cm
Istall=1.4 A
Kt=7.85
For our case I=0.28 A
T=2.198 kg-cm

Step 10: ​Mounting Proximity Sensors

While placing the Proximity sensors one has to be careful that the sensors do not interfere with each other. One has to consider the cases when mounting the sensors face-to-face or side-by-side; they should be at least two sensor diameters far from each other. These distances have been respected in our design and sensors do not have interference, however, we used also some trial and error to optimize furthermore and place the sensors; which allow us to be more effective and efficient in terms of machine usage[1, 2].

Step 11: Physical Connections of the Electronic Components

Figure 7. Physical connections of electronic components

As seen in the figure above, the electronic components have been soldered in a prototyping board. The general schema is the following: We utilized one 6V power supply which drives all the components. With this 6 volts provision, we powered the two servos, inductive sensor and the capacitive sensor. Next we used a step down converter to convert the 6V to 5V with which we can drive the Arduino via the 5V pin and power the ultrasonic sensor. When soldering one has to be careful and connect all the components to the same ground.

Step 12: Pins Connections to Arduino

Step 13: Programming

Figure 8. Flowchart

To do the sorting of three different types of materials we have used three sensors. Based on these sensors values we can distinguish the type of material. We have 3 cases: Metal detected, Plastic Detected, Glass detected. As we can notice in the flowchart those three cases correspond to those specific state combinations of the sensors.

The programming is divided into these sections:

1. Initialization of the system

2. Object and Material Detection

3. Servos Movements

1. Initialization

Comment: In startup Gate and Pipe servo will go to a prescribed position, this procedure will be repeated in each start-up or reset. This part of the code will be executed only once in startup.

- Read the values for the actual position of the two Servo motors.

If Pipe position != to the zero position

-move pipe to the zero position

-move gate and then bring it back to the initial position (This is done intentionally each system start up/reset; no matter if it is in the zero position or not)

If Pipe position == the zero position

-move gate and then bring it back to the initial position (This is done intentionally each system start up/reset; no matter if it is in the zero position or not)

-Initialize sensors

2. Object and Material Detection

if (Inductive Sensor<=250 && Capacitive Sensor == 1 && Ultrasonic Sensor Distance<=14 cm)

-Plastic Detected: To Plastic Bin (step 3)

if(Inductive Sensor<=250 && Capacitive Sensor != 1 && Ultrasonic Sensor Distance<=14 cm)

-Glass Detected: To Glass Bin (step 3)

if(Inductive Sensor>=250){

-Metal Detected: To Metal Bin (step 3)

3. Servos Movements

If Plastic Detected:

-Move Pipe Servo to Plastic Bin

-Delay

-Move Gate Servo from position 0 to 1
-Delay

-Move Gate Servo from position 1 to 0

If Glass Detected:
-Move Pipe Servo to Glass Bin

-Delay

-Move Gate Servo from position 0 to 1

-Delay

-Move Gate Servo from position 1 to 0

If Metal Detected:

-Move Pipe Servo to Metal Bin

-Delay

-Move Gate Servo from position 0 to 1

-Delay

-Move Gate Servo from position 1 to 0

In the following section the code will be provided.

Step 14: CODE

[code]<br>
//********************************************
// GROUP 8: AUTOMATIC WASTE SORTING MACHINE  *
// MECHATRONICS 2019                         *
// @GROUP 8                                  *
//*******************************************
#include <Servo.h>
Servo Pipe_Servo;
Servo Gate_Servo;
// define the variables
int sensorInd = A0; //Pin A0 (analog)
int sensorpin = 2; //Digital Pin nr. 2
int indValue;
const int trigPin = 7;
const int echoPin = 8;
int i=0;
float Pipe_Pos=0.0;
float Gate_Pos=0.0;
int n=0;
long duration;
int distance;
float metalDetected;
void setup() {
pinMode(trigPin, OUTPUT); // trigPin=output
pinMode(echoPin, INPUT); // echoPin = input
Serial.begin(9600); // Starts the serial communication
// Codes that run only once[
//--System Initialization--
    Pipe_Pos=Pipe_Servo.read();//Read the last value given to Pipe servo
    Gate_Pos=Gate_Servo.read();//Read the last value given to Pipe servo
    Serial.println("Motor_PIPE Position");
    Serial.println(Pipe_Pos);
    Serial.println("Motor_GATE Position");
    Serial.println(Gate_Pos);
    delay(5000);
    
    Pipe_Servo.attach(11);
    if (Pipe_Pos<90){
      
      for(i=Pipe_Pos; i<=90; i=i+1){
      Pipe_Servo.write(i);
      delay(15);
      }
    }
      
      else {
        for(i=Pipe_Pos; i>=90; i=i-1){
        Pipe_Servo.write(i);
        delay(15); 
      
        }
      }
delay(1000); //Delay (wait) for servo pipe to go to the bin.
    //Next rotate the gate servo.
    //And control the speed of Gate Servo.
    Gate_Servo.attach(10);
     for(n=0; n<=45; n=n+1){  //Choose the right angle for Gate servo
      Gate_Servo.write(n);
      delay(20); //Controll the speeed of Gate servo 
    }   
    delay(1000); //Delay (wait) and then bring back the Gate_Servo to its
     //initial position.
     //Bring Back Gate_Servo to initial position
     //So from actual position 2-> n=45; we go backwards up to n=0.
     for(n=45; n>=0; n=n-1){ 
      Gate_Servo.write(n);
      delay(25); //Control the speed of Gate servo 
     }
delay(5000);
//--System Initialization--//
// Codes that run only once]
}
void loop() {
//delay(100);
delay(3000);
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(10);//
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(30);//it was 1
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance= duration*0.034/2;
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);
indValue=analogRead(sensorInd);//Save value that is read from the analog pin A0 to the variable indValue
delay(10);
int sensorstate = digitalRead(sensorpin); // Digital value for Capacitive S.
delay(500);
metalDetected = (float)indValue*100/1024.0; //from analog value
delay(50);
Pipe_Pos=Pipe_Servo.read();//Read the actual position of Pipe servo
Gate_Pos=Gate_Servo.read();//Read the actual position of Gate servo
//**METAL DETECTED**/
/ if(indValue>=250 && sensorstate == 1 && distance<=14)
  if(indValue>=250){
   Serial.println("Metal Detected");
    Pipe_Pos=Pipe_Servo.read();//Read the last value given to Pipe servo
    Gate_Pos=Gate_Servo.read();//Read the last value given to Pipe servo
    Serial.println("Motor_PIPE Position");
    Serial.println(Pipe_Pos);
    Serial.println("Motor_GATE Position");
    Serial.println(Gate_Pos);
    Serial.println("Motor to metal bin");
    delay(100);
    //Wait for some time after the measurements and move servo to 
    //the corresponding bin
    //For initial position of servo_gate/PIPE in this case the read function will give us the last position of servo
    //in degree
    //Go to the second position of the PIPE servo @90 degree
    //To control the speed of the servo we do this for loop.
    //We have 2 cases 1; when pipe is somewhere in position greater then 90, in this particular case we want to go to 90 so we have to loop back.
    //The other case is to loop forward i=i+1, (meaning to increase the angle in incremental manner).
    
    if (Pipe_Pos<90){
      for(i=Pipe_Pos; i<=90; i=i+1){
      Pipe_Servo.write(i);
      delay(15);
      }
    }
      
      else {
        for(i=Pipe_Pos; i>=90; i=i-1){
        Pipe_Servo.write(i);
        delay(15); 
      
        }
      }
delay(1000); //Delay (wait) for servo pipe to go to the bin.
    //Next rotate the gate servo.
    //And control the speed of Gate Servo.
     for(n=0; n<=45; n=n+1){  
      Gate_Servo.write(n);
      delay(20); 
    }   
    delay(1000); //Delay (wait) and then bring back the Gate_Servo to its initial position.
     //Bring Back Gate_Servo to initial position
     //So from actual position 2--> n=45; we go backwards up to n=0.
     for(n=45; n>=0; n=n-1){  
      Gate_Servo.write(n);
      delay(25);  
     }
    
   //**METAL DETECTED**// 
   //**PLASTIC DETECTED**// 
   
   }
   else if(indValue<=250 && sensorstate == 1 && distance<=15){ //NO NO state
   delay(100);
   Serial.println("Plastic Detected");
    Pipe_Pos=Pipe_Servo.read();//Read the last value given to Pipe servo
    Gate_Pos=Gate_Servo.read();//Read the last value given to Pipe servo
    Serial.println("Motor_PIPE Position");
    Serial.println(Pipe_Pos);
    Serial.println("Motor_GATE Position");
    Serial.println(Gate_Pos);
    Serial.println("Motor to Plastic Bin");
    delay(100); 
    //Wait for some time after the measurements and move servo to 
    //the corresponding bin
    
    //For initial position of servo_gate/PIPE in this case the read function will give us the last position of servo
    //in degree
    //Go to the second position of the gate Pipe_Servo in degree (145) for Plastic
    //To control the speed of the servo we do this for loop.
    //We have 2 cases 1; when pipe is somewhere in position greater then 145, in this particular case we want to go to 145 so we have to loop back.
    //The other case is to loop forward i=i+1, (meaning to increase the angle in incremental manner)until we reach the desired angle.
    
    if (Pipe_Pos<145){
      for(i=Pipe_Pos; i<=145; i=i+1){
      Pipe_Servo.write(i);
      delay(15);
      }
    }
      
      else {
        for(i=Pipe_Pos; i>=145; i=i-1){
        Pipe_Servo.write(i);
        delay(15); 
      
        }
      }
delay(1000); //Delay (wait) for servo pipe to go to the bin.
    //Next rotate the gate servo.//This remains the same for all other cases
    //And control the speed of Gate Servo.
     for(n=0; n<=45; n=n+1){  
      Gate_Servo.write(n);
      delay(20); 
    }   
    delay(1000); //Delay (wait) and then bring back the Gate_Servo to its
     //initial position.
     //Bring Back Gate_Servo to initial position
     //So from actual position 2--> n=45; we go backwards up to n=0.
     for(n=45; n>=0; n=n-1){  //Choose the right angle for Gate servo
      Gate_Servo.write(n);
      delay(25); //Controll the speeed of Gate servo (it can be a litle faster now) 
     }
//delay(100);
 
   }
//**PLASTIC DETECTED**// 
//**GLASS DETECTED**// 
else if(indValue<=250 && sensorstate != 1 && distance<=14){ 
   Serial.println("Glass Detected");
    Pipe_Pos=Pipe_Servo.read();//Read the last value given to Pipe servo
    Gate_Pos=Gate_Servo.read();//Read the last value given to Pipe servo
    Serial.println("Motor_PIPE Position");
    Serial.println(Pipe_Pos);
    Serial.println("Motor_GATE Position");
    Serial.println(Gate_Pos);
    Serial.println("Motor to Glass Bin");
    delay(1000);
    //Wait for some time after the measurements and move servo to 
    //the corresponding bin
    //For initial position of servo_gate/PIPE in this case the read function will give us the last position of servo in degree
    //Go to the second position of the Pipe_Servo @25 degree for Glass
    //To control the speed of the servo we do this for loop.
    //We have 2 cases; when pipe is somewhere in position greater then 90, in this particular case we want to go to 25 so we have to loop back.
    //The other case is to loop forward i=i+1, (meaning to increase the angle in incremental manner).
    //Actually in this case we can have only one case when angle is greater then 25, but however! :P
    if (Pipe_Pos<25){
      for(i=Pipe_Pos; i<=25; i=i+1){
      Pipe_Servo.write(i);
      delay(15);
      }
    }
      
      else {
        for(i=Pipe_Pos; i>=25; i=i-1){
        Pipe_Servo.write(i);
        delay(15); 
      
        }
      }
delay(1000); //Delay (wait) for servo pipe to go to the bin.
    //Next rotate the gate servo.//This remains the same for all other cases
    //And control the speed of Gate Servo.
     for(n=0; n<=45; n=n+1){  
      Gate_Servo.write(n);
      delay(20); 
    }   
    delay(1000); //Delay (wait) and then bring back the Gate_Servo to its
     //initial position.
     //Bring Back Gate_Servo to initial position
     //So from actual position n=45; we go backwards up to n=0.
     for(n=45; n>=0; n=n-1){  
      Gate_Servo.write(n);
      delay(25); 
     }
    Serial.println("Motor_PIPE Position");
    Serial.println(Pipe_Pos);
    Serial.println("Motor_GATE Position");
    Serial.println(Gate_Pos);
}
}

[/code]

*We suggest to use the code attached here.

Step 15: VIDEO 1

The video describes the operation and performance of the Automatic Waste Sorting Machine which has been tested for sorting three different type of materials (metal, glass and plastic). As it can be noticed we have used regular trash bins that can be found in markets.

Step 16: VIDEO 2

In this video, a reset test has been conducted. As seen the initialization of the system has been done and the machine sets to its zero position. This video is done before finalizing our project (in terms of some mechanical aspects). However, in terms of the codes the same codes have been used as in video 1.

Step 17: Scope for Future Implications and Improvements

•This project can be modified further for detecting an organic waste (wet waste), by adding a moisture sensor.

• With the increase of the number of sensors one could segregate more variety of wastes.

•By modifying the design we can make it more adaptable to detect wastes of different shapes, sizes and weights.

•This project could be made more aesthetically pleasing and ergonomically flexible for betterment of Human Machine interaction.

Step 18: Challenges Faced

Every project on its own has its difficulties and challenges, for our project challenges are listed below:

Rotating the Pipe: Designing a mechanism, while bettering of the project done last year was a challenge. We wanted to have something that can be implemented in real life (like having a centralized garbage system in a Building). Countering the problem of the last year project we focused on not moving the Garbage can and so we went for a design which included a Pipe which rotates in 3 direction of fixed garbage can.

Designing a Gate: Designing a gate where the sensor detects the type of waste and directs it to the pipe, while the pipe rotates in the meantime to the respective garbage can was very tricky. We had several ideas from having an Objection plate while the garbage is held on the plate for detection and having a tilting bucket etc. Finally, we went for an idea of V-gate in order to avoid the movement of sensors and have less mechanical moving parts.

Using bearings: The original Idea involved using bearing both for V-gate shaft and Pipe support. As seen we used an 8 mm Radial bearing for Gate shaft on the either side. Also the rotating pipe shaft was to be supported by a thrust bearing, eventually we opted out of this idea as the wooden frame constructed for the Pipe was more than sufficient to support it. This saved a lot of time and prevented further any future mechanical complications in the project.

Using only one power supply: It was a challenge to restrict our selves in using only one power supply and having least electronic components as possible. Therefore, in our design phase, we have considered all the possible ways to use only one power supply efficiently; and we opted for the scheme that is represented in the electronics chapter.

Accuracy of sensors: Sensors are not always accurate, having limitation in their distance of measurement. This affects it's accuracy in detection (particularly when the object is small). We intended to modify the gate design by adding a printed part but it effected the performance of the sensor and so for future implications of the system for better detection, shielded sensors can be used.

Position of Sensors: There are many factors that came in to the picture while deciding the position and location of our sensors. We considered making a fixed structure for the sensors because we did not want the sensors to be attached to the gate. Also, the distance between the two sensors had to be considered so that the sensors do not influence each other. This has been done by considering the recommended distance in the datasheet and also by some trial and error we found the optimal locations to place our sensors.

Initialization of the system: In the start-up of the system, we wanted everything to go to the prescribed zero position. However, servos were moving without a command given to them (fast and not as commanded). We "fixed" this by considering the actual position of the motors on the system start-up. Furthermore, one can consider here other ways of solving this issue, for instance, using different servos, other software solutions like using EEPROM; or hardware solutions.

Tuning and adjusting different parameters of the system: Tuning and adjusting different parameters of the system, and making everything work together was rather challenging. We opted for values that are optimal, however, the system response can be increased by changing these parameters (ex. speed of servos, the delays added into the code, etc.). Also, we observed that it will detect more efficiently metals if we only consider the data from the inductive sensor, this can be seen in the codes given in the programming section.

Step 19: Conclusion

This project has been done during the academic year 2019-2020 as part of the Mechatronics course, in the Brussels Faculty of Engineering; a joint Master's program of the Vrije Universiteit Brussel (VUB) and Université Libre de Bruxelles (ULB). The project was challenging. The requirement was to do an automatic machine to be able to sort minimum two different types of waste. As a team we managed to meet these requirements and developed a machine that sorts three types of waste.

Authors of this project are (A-Z):

Afaque Sayyed

Anibal Santiago

Kawtar Benmansour

Varun Shelvankar

Silvana Valle

Zemerart Asani

Instructors:

Prof. Dr. Ir. Bram Vanderborght

Ir. Albert De Beir

Ir. Marco Rossini

Step 20: Download Files

Step 21: References

STEM Contest

Participated in the
STEM Contest