Prototype of Parcel Sorting Machine Based on Destination Address Using ESP32-CAM

Manual parcel sorting is prone to routing errors and processing delays. This project develops an automated sorting machine that uses an ESP32-CAM to read destination QR codes and a PLC-controlled pneumatic system to direct parcels to the correct sorting lane.

ESP32-CAM QR Reader PLC Siemens S7-300 Pneumatic Sorting Conveyor Automation
ESP32-CAM
QR Code Identification
PLC S7-300
Central Controller
3 Sorting Lanes
Destination Groups
Pneumatic Actuation
Automated Routing
01

Introduction

Logistics facilities rely on fast and accurate parcel sorting to maintain delivery efficiency. Manual sorting processes are susceptible to routing errors, inconsistent throughput, and increased labor requirements.

This project presents a prototype automated sorting machine that identifies parcel destinations through QR codes and routes packages using a PLC-controlled conveyor and pneumatic actuation system.

Problem Statement

  • How can parcel destinations be identified automatically using QR codes?
  • How can PLC-based control coordinate conveyors and pneumatic actuators for reliable sorting?
  • How can sorting operations be automated while minimizing manual intervention?
02

System Architecture

The system integrates an ESP32-CAM QR reader, capacitive and photoelectric sensors, and a Siemens S7-300 PLC to automate parcel identification, routing decisions, and pneumatic sorting operations.

01 · Detection

QR Code Identification

ESP32-CAM captures and decodes destination QR codes attached to parcels

02 · Signal Processing

PLC Decision Logic

Decoded destination data are transmitted to the PLC for sorting decisions

03 · Actuation

Pneumatic Control

Relay outputs activate pneumatic cylinders assigned to each destination group

04 · Sorting

Automated Routing

Parcels are automatically directed to the corresponding sorting lane

Desain depan prototipe mesin sortir parcel
Front-view prototype showing the conveyor, QR scanner, and sorting mechanism
Desain belakang prototipe mesin sortir parcel
Rear-view layout of the automated sorting system

Hardware Components

  • ESP32-CAM – QR code reader used to identify parcel destinations
  • PLC Siemens S7-300 – PCentral controller coordinating the sorting process
  • Capacitive Proximity Sensor – Detects parcel presence on the conveyor
  • Photoelectric Beam Sensor – Confirms parcel arrival at the sorting position
  • SPDT Relay Module – Transfers destination signals from the ESP32-CAM to the PLC
  • Pneumatic Cylinder (×2) with Push Ejector – Diverts parcels to the assigned sorting lane
03

Results & Discussion

The prototype was tested using 12 parcel samples divided into three destination groups (A, B, and C). Each parcel was processed four times to evaluate sorting travel-time consistency and QR-code scanning performance.

QR Reader Module

A custom ESP32-CAM module was developed to capture and decode parcel destination QR codes. The module communicates with the Siemens S7-300 PLC through relay outputs, enabling automated sorting decisions and pneumatic actuation.

Board ESP32-CAM QR Reader terpasang dalam box
Custom ESP32-CAM QR reader module integrated with relay outputs for PLC communication

Sorting Performance Data

Performance testing involved 12 parcel samples across three destination groups. Each parcel was processed four times to evaluate sorting cycle time and QR-code recognition performance.

The prototype successfully sorted parcels into three destination groups (A, B, and C) using QR-code identification and PLC-based pneumatic actuation. Testing was conducted on 12 parcel samples with four repetitions each to evaluate travel time and QR-scanning performance.

MetricValue
Parcel Samples12
Test Repetitions4× per parcel
Destination Groups3 (A, B, C)

Key Findings

Sorting time increased with destination distance, ranging from approximately 9–11 s for Group A, 12–13 s for Group B, and 16–18 s for Group C. QR-code scanning duration showed greater variability due to lighting conditions and parcel positioning, highlighting opportunities for future optimization of the vision subsystem.

Root Cause Analysis

Experimental testing revealed several factors affecting sorting accuracy and repeatability. Root cause analysis identified three primary contributors to sorting inconsistencies.

QR Code Detection ReliabilityRoot cause
Parcel Placement VariabilityRoot cause
Control–Mechanical SynchronizationRoot cause

QR-code detection performance was affected by lighting conditions, resulting in variable scan durations. Parcel placement on the conveyor introduced travel-time variations, while imperfect synchronization between PLC logic and actuator positioning reduced sorting accuracy.

Integrated System Testing

Final system validation was performed by integrating the QR reader, PLC controller, relay interface, conveyor simulator, and pneumatic actuators into a single automated sorting workflow. The test verified successful communication between subsystems and confirmed the PLC's ability to execute sorting actions based on QR-code identification results.

Uji coba terintegrasi mesin sortir pada conveyor simulator
Integrated system validation on the conveyor simulator
04

Conclusion

The project successfully demonstrated the integration of an ESP32-CAM QR reader, Siemens S7-300 PLC, conveyor system, and pneumatic actuators into a functional automated sorting prototype.

Experimental testing validated the overall control architecture and parcel-routing concept. While full autonomous operation was limited by QR-code detection consistency and mechanical synchronization issues, the project provided valuable experience in industrial automation, PLC programming, machine integration, and system troubleshooting.