← Back to Projects

Automated Sorting System

Autonomous Mechanical Marble Sorter

Python VEX V5 3D Printing Optical Sensors

I designed and assembled an autonomous sorting system capable of identifying and categorizing marbles based on optical properties. The core engineering challenge involved integrating standard VEX components with a custom 3D-printed part to manage sensor data and motor control logic reliably.

Technical Breakdown

Mechanical Design

Constructed the chassis using VEX V5 structural components and integrated a custom 3D-printed component to optimize the mechanism. I utilized a gravity-fed hopper (repurposed bottle) and a rotating distribution arm powered by a high-torque V5 Smart Motor to route marbles into one of four designated collection bins.

Sensor Integration

Utilized a VEX Optical Sensor to detect hue, saturation, and brightness. I developed a calibration script in Python to account for ambient light variations, ensuring the sensor could distinguish between similar shades and translucent vs. opaque materials.

Software & Control

  • Singulation Logic: Programmed a timing-based gate system to ensure only one marble was processed at a time, preventing jams and sensor "noise."
  • State Machine Architecture: Implemented a state machine in Python to manage the system's workflow: Detection → Classification → Mechanical Alignment → Deposit.
  • Motor Control: Calibrated motor speed and timing to ensure accurate positioning of the sorting tray without the complexity of a full PID loop.

Key Results

  • 99% Accuracy: Achieved near-perfect sorting consistency across hundreds of test cycles.
  • High-Speed Throughput: Optimized the mechanical travel path and sensor polling rate to maximize the number of marbles processed per minute.
  • Iterative Prototyping: Transitioned from a basic gravity-fed model to a motorized precision sorter, solving critical mechanical bottlenecks related to marble friction and "double-feeding."
← Back to Projects