This article will discuss an automatic Waste Sorting system using the XG5000 PLC program. This PLC system can separate Metal, Plastic, and Paper waste using sensors and a simple separation mechanism. The system will collect waste based on its type and provide an indicator alarm when the accumulated waste reaches the maximum weight.
Program Objective

System Steps:
1. Waste Placement on Conveyor:
Waste is placed on the moving conveyor.
2. Waste Identification:
Metal Detector: This sensor is only activated when detecting an object containing metal.
Color Sensor: This sensor is used to differentiate between plastic and paper based on color. Waste will be identified as paper if it is brown or white, so the sensor will only be activated when detecting an object with brown or white color.
3. Waste Sorting:
- If Metal is detected, a Magnet will pull the waste into the metal container.
- If Paper is detected, an Actuator pushes it into the paper container.
- If the waste is neither metal nor paper, it is automatically directed into the plastic container.
4. Waste Collection in the Appropriate Container:
- The collected waste is weighed, and when the accumulated metal waste reaches 10 kg, the alarm will activate.
- When the accumulated paper waste reaches 15 kg, the alarm will activate.
- When the accumulated plastic waste reaches 20 kg, the alarm will activate.
Automated Waste Sorting System

IO Mapping
| S.No. | Comment | Input (I) | Output (Q) | Memory Words | Memory Bit | Timers |
|---|---|---|---|---|---|---|
| 1 | PB_START | P0000 | ||||
| 2 | PB_STOP | P0001 | ||||
| 3 | SENS_METAL | P0002 | ||||
| 4 | SENS_COLOR | P0003 | ||||
| 5 | MAGNET | P0040 | ||||
| 6 | ACTUATOR | P0041 | ||||
| 7 | CONVEYOR | P0042 | ||||
| 8 | ALARM_METAL | P0043 | ||||
| 9 | ALARM_PAPER | P0044 | ||||
| 10 | ALARM_PLASTIC | P0045 | ||||
| 11 | METAL_WEIGHT | M100 | ||||
| 12 | PAPER_WEIGHT | M101 | ||||
| 13 | PLASTIC_WEIGHT | M102 | ||||
| 14 | SYSTEM_ON | M0000 | ||||
| 15 | TIMER_ACT | T001 | ||||
| 16 | TIMER_MAGNET | T000 |
XG5000 PLC Program

RUNG 1 (START SYSTEM)
In this Rung, when the PB_START(P0000) button is Pressed, the memory bit SYSTEM_ON (M0000) will be in the HIGH state. Because it uses Latching, the memory bit SYSTEM_ON (M0000) will remain in the HIGH state even though the PB_START (P0000) button has been Released.
The memory bit SYSTEM_ON (M0000) will return to the LOW state when the PB_STOP (P0001) button is Pressed.
RUNG 6 (CONVEYOR)
In this Rung, if the NO contact of the memory bit SYSTEM_ON (M0000) is in the HIGH state, then the CONVEYOR (P0042) output will be ON.
The CONVEYOR (P0042) output will be OFF if one of the NC contacts of ALARM_METAL (P0043), ALARM_PAPER (P0044), or ALARM_PLASTIC (P0045) is in the HIGH state.

RUNG 12 (MAGNET ON)
In this Rung, if the NO contact of the memory bit SYSTEM_ON (M0000) and the SENS_METAL (P0002) sensor is in the HIGH state, then the MAGNET (P0040) output will be ON. The TIMER_MAGNET (T000) timer will start counting up to 3 seconds when the NO contact of MAGNET (P0040) is in the HIGH state.
When the TIMER_MAGNET (T000) timer has finished counting, the MAGNET (P0040) output will be OFF because the RESET Coil instruction from the MAGNET (P0040) output is triggered from the TIMER_MAGNET (T000) timer NO contact.

RUNG 25 (ACTUATOR ON)
In this Rung, if the NO contact of the memory bit SYSTEM_ON (M0000) and the SENS_COLOR (P0003) sensor are in the HIGH state, then the ACTUATOR (P0041) output will be ON. The TIMER_ACT (T001) timer will start counting up to 2 seconds when the NO contact of the ACTUATOR (P0041) is in the HIGH state.
When the TIMER_ACT (T001) timer has finished counting, the ACTUATOR (P0041) output will be OFF because the RESET Coil instruction from the ACTUATOR (P0041) output is triggered from the TIMER_ACT (T001) timer NO contact.

RUNG 38 (METAL WEIGHT)
When the NO contact of the memory bit SYSTEM_ON (M0000) is in the HIGH state and the value in the memory word METAL_WEIGHT (M100) is Equal to “10”, then the output ALARM_METAL (P0043) will be ON.
RUNG 43 (PAPER WEIGHT)
When the NO contact of the memory bit SYSTEM_ON (M0000) is in the HIGH state and the value in the memory word PAPER_WEIGHT (M101) is Equal to “15”, then the output ALARM_PAPER (P0044) will be ON.
RUNG 48 (PLASTIC WEIGHT)
When the NO contact of the memory bit SYSTEM_ON (M0000) is in the HIGH state and the value in the memory word PLASTIC_WEIGHT (M101) is Equal to “20”, then the output ALARM_PLASTIC (P0045) will be ON.
Read Next:
- Smart Street Lighting Using XG5000 PLC Programming
- Escalator Control Based on Passenger Load in PLC
- Read Mitsubishi PLC Analog Input and Display in HMI
- CX-Programmer Products Counting in Omron PLC
- Conveyor Sorting PLC Program with Calculation Function