Design and prototyping of an automated squash ball identification system

The purpose of this project was to develop a system that can reliably identify an assortment of small balls, including squash balls, ping pong balls, and practice golf balls. The system is required to operate reliably and handle accidental variations as rejects. Stakeholders required that the system should be able to sort 12 balls in 4 minutes. Identification should require no operator assistance in determining the parameters of the balls, and testing procedure must be non-destructive. Due to project time constraints, the scope was focused to reliable identification without an automated feeding and sorting/clearing system.
Home
Questions?
hero-image

Miguel Ferrer

Project Timeline

Aug 2025 - Oct-2025

HighlightS

  • Managed identification of most balls using confidence logic derived from sensor inputs.
  • Provided rapid prototyping via CAD design and 3D-printed components.
  • Designed and implemented a servo-driven rack and pinion compression system.
  • Evaluated system performance, making improvements and design modifications.

SKILLS

SolidWorks / Fusion 360 CAD modeling and assembly design
Tolerance and mechanical design analysis
3D printing and rapid prototyping
Basic sensor integration and Arduino testing

Design description

For this project the identification system was designed and adapted  a system to sort the balls using a mixture of sensors and electromechanical components. The system uses a load cell, color sensor, and mechanical compression system to determine ball type through  weight, color, and if applicable compression tests. The system outputs the ball information on a computer display and awaits a new ball to be inserted. 

Systems overview

These process charts describe the system construction, and sub system operation.

Pasted image

Pasted image

Pasted image

Pasted image






Compression demonstration




WEIGHT TEST

 The primary test conducted by the system is to weigh and differentiate the balls into sub groups. A 500g load cell proved to be the best method for this task as it has incredible accuracy and can be used in the compression test due to the higher force limit over lower capacity cells (e.g 100g). A small ‘cup’ style catchment as shown in figure 1 was used to hold the ball in place to stop any rolling or slip during weighing and compression test. The load cell is connected to a 24 bit ADC (HX711)  that provides a 20Hz reading, to calculate weight we took a mean average of 20 samples giving a figure every second. This output is arbitrary so we measured values at known weights, then standardised it by dividing the measured signal by 3150 to receive an averaged gram output. To make sure the weight is only measured when a ball is placed, a bias of 1-2g should be present on the load cell in order for it to begin logging weight.

COLOR TEST

The secondary test performed by the system is to check the present ball’s color using a TCS3200. The sensor includes an integrated illumination module, allowing the system to operate in dark conditions. After the ball has been weighed, the color sensor reads the individual RGB components three times each to average the color components. This color sampling is then repeated five times to obtain an averaged intensity, calculated as the squared sum of the RGB components.The summed intensity is divided by the average red component, stored in an array, and added to a running mean. Each intensity/red value is compared to its neighbors and the mean. If a value exceeds the set threshold of 1000, it is ignored in the new calculated sum; this accounts for the usual presence of a single outlier per sample set. Finally, the resulting value is compared to known intensity/red ratios to determine the ball color. After determining the ball’s color and weight, the system can identify its type, excluding squash yellow and squash blue for these require compression to differentiate. Division by red is used because ball colors deviate the most in this component. See figure 2 for a visual representation of the process. 

Pasted image



COMPRESSION TEST


The final test performed by the system is to discern the ball’s relative elasticity using a position driven rack and pinion to compress the ball. Because these squash ball’s weights overlap between sample sets, the compression test is used to distinguish them. A 3001HB positional servo is used to drive the pinion gear as this servo does not need a rotary encoder or limit switches. The servo drives a 46mm 24 tooth pinion gear. This pinion gear extends/retracts a 13 tooth rack above the load cell as seen in figure 3. 


Compression demonstration:

Final design system measurements.

First complete prototype, needed additional support to reduce system flex during compressionPasted image

 
Successes and Challenges
The final outcome of the project was generally successful, with the system able to identify the majority of the balls tested. All of the table tennis, practice golf, and discoloured variations were identified with ease. The System also effectively distinguished two of the squash balls based on their relative elasticity.  However, the system was unable to effectively discern the pair closest in elasticity for the final trial. In future iteration, increasing the range of elastic deformation applied during compression would likely improve discernible elasticity data. This could be achieved through a higher gear ratio to improve output torque over a more specific region or a a higher torque servo. During testing, the system was able to classify the balls with a confidence exceeding 80% under constant conditions. However small ball temperature fluctuations would influence measurable elasticity enough to reduce confidence to as low as 20%.