The Autonomous Tennis Ball Picker Using Atmega644

Introduction and Motivation

In the tennis and sports equipment market, there are very few advanced electronic devices assisting in the feeding and picking of tennis balls or any other kind of balls. Tennis players do not prefer picking up over five hundred balls after a long days worth of drilling, or a baseball player would not enjoy picking up over five hundred baseballs on the ground from batting practice. As a result, our solution is an autonomous ball-picker device that is easy-to-use and cost-effective. Our design can be used for a variety of sports besides tennis, involving balls of similar size and weight.
The Autonomous Tennis Ball Picker Using Atmega644

High-level Design

Rationale and Overview
There are many ball-picking devices in the market today designed by Playmate, Gamma, among others that are human-powered and human-controlled. However, there are almost no existing sports products that are autonomous and do not require the labor of a person. In a generation where the number of athletes is growing, where most of them do not play professional but still compete at a high level, there is a bigger demand for machines that make athletes lives simpler and less time-consuming. As a varsity tennis athlete, I feel that a device to pick up a large amount of tennis balls after practice would save about thirty minutes a day for five days a week.
Our project aims to devise an easy-to-use, low-cost autonomous ball-picking device that helps pick up tennis balls, or perhaps any other balls of similar weight and shape, over an enclosed tennis court area. The general idea is that this device will sweep through a tennis court in a smart fashion within a reasonable amount of time. A complex ball-search algorithm will be implemented to eventually pick up all tennis balls within an enclosed area with fairly high walls. The picker implements a rotary blade technology that pushes a tennis ball up half-cylinder structure and over to the basket where it is stored. This technology is similar to the Playmates Mower. The machine also contains touch sensors for intelligent maneuvering when approached by walls or backdrops as well for mowing the balls from the ground. This machine is roughly one foot long, three feet wide and one and a half feet tall.  Our final construction is by no means a final product, since it is still a prototype model that can be used for similar devices with this exact purpose.
ADC Conversion Basics
The touch sensor read feedback system utilizes an ADC conversion to transfer analog voltage data from sensors being used to a digital signal to be processed in our C program. The ADC converter takes in a range of voltage values converts the value into a scaled fraction of an 8-bit data register, with a size of 28 = 256 values. The following equation shows the result of ADC conversion:
Converting the output voltage to a whole number value between 0 and 255 can become very helpful in determining whether a ball has passed or whether a wall is detected.
Logical Structure and Diagram 
Our ball-picker device consists of two main systems that all communicate with the MCU directly. The front touch sensors at the top of Figure 1, the front and back LED ball-pass sensors all output data to the MCU. All of the sensors are tied to a common ground and VCC to save socket space. The other system is the motor driver circuitry. There are four servo motors in the diagram, two on each side. They are each tied to separate VCC and ground sources to create maximum power and torque.
Hardware Tradeoffs
The initial design of the motor driving system involved the use of stepper motors. Due to its large amount of port connections and the absence of wheels that are compatible, we switched the design to using servo motors because it was the most cost-effective method for us, they required a reasonable number of port connections (three for each motor), and they included wheels that came with them. The downside is that the servo motors are difficult to calibrate and can often times be unreliable for extensive continuous motion.
For the touch sensors, we contemplated using accelerometers, or proximity sensors. However, given the amount of resources we have already, we decided to use the LED emitters and NPN phototransistors to detect objects. We tested the range of the objects such that the NPN phototransistors vary in output voltage, and we found that the object was far enough so that the device would have enough time to back up before it collides with the object.
The amount of power supply and torque behind the servo motors were analyzed. We found that the there was not enough torque to drive the front blades if the VCC source was tied commonly with the driving motors. Also, the driving motors would not be able to have enough power to move the device if they were commonly tied to VCC and ground. The only way to solve this issue was to use separate voltage supplies for each system: Two VCC sources on each side of the device, and one VCC source going into the rotary blades. This causes more battery packs than we would have liked, but the battery life should be long enough so that they do not have to be replaced as frequently.
Software Tradeoffs
When outputting square wave pulse signals out of ports, one typically uses PWM mode and inputs the voltage line in which the signal is high or low. However, we decided to hard code the pulse signal output and avoided changing the registers by setting the signal to high at a certain range of time and to low as well. When studied through an oscilloscope, we observed that the output signal exactly matches a square wave pulse. Therefore, I am convinced that our hard-coded pulse signal functions correctly.
Relevant Patents and Other Designs
There were a few patents designed for tennis balls to be picked without any human labor or work. One patent involved a long descending gutter placed against the back wall of Reis Tennis Center. When the balls roll in to this gutter, the ball is then brought up through a conveyer belt circuit, and dumped into a basket.
Hardware Design
Mechanical Design
Due to limited budget constraints, we used the most basic yet strong materials to build the backbone of the autonomous ball-picker. The ball storage basket comprises of cardboard withheld by duct tape. A wooden board is attached below the basket to act as ground support to withstand heavy weight, and also serves as a chassis for attaching servo motors on each side of the basket. A rectangular hole is cut at the front of the basket for balls to fly in when they are swept up.
The front side ball grabber comprises of three wooden blades positioned equidistantly around a wooden cylinder. This wooden cylinder is turned by attaching a servo motor and a wheel connector on each side. The wheel connector fixes the servo motor with the cylinder so that all the torque of the motors is used for turning the cylinder. This wooden blade system is supported by two circular foam boards on each side. A tin sheet is used as a ramp just under the rotating blades, and they are positioned a little above the ground, but low enough for balls to be pushed in by the blades.
The weight of the device is supported by plastic wheels, two on each side. These wheels are strongly attached to the wooden board to prevent any detachments and driving failures.
Hardware Setup
Servo Motor Circuitry
Our wheels and front side rotating blades are all driven by Parallax Continuous Rotation servo motors. Each motor has three inputs: VCC, ground, and a periodic square wave signal. The pulse width of the square wave determines the speed and direction of the servo motors. In our case, we only want to change the direction to allow the device to move forward, backward, and turn left and right. If the pulse width is under a certain time frame, the motor will drive in a clockwise direction. If the pulse width exceeds that time frame, the motor will drive in a counterclockwise direction. The middle time frame can be adjusted through a built-in potentiometer inside the motor. The voltage of the potentiometer can be manually changed with the use of a screwdriver. In our project, we determined the middle dividing point to be 1.5 milliseconds. A Parallax servo motor datasheet can be accessed here for further reference.
The servo motors are opto-isolated to provide protection for the board from inductive spikes released by the motors when they are turned off.
On the other end, the input square wave signal is fed across a 1KOhm resistor and an NPN BJT transistor. The gate voltage driving into the BJT transistor allows current to flow across the source and drain, and thus causes the signal to be driven across the opto-isolator and into the servo motors.
The Autonomous Tennis Ball Picker Using Atmega644 Schemetic
Two general types of servo motor circuits were used. One circuit involved a common ground and source between the motor end and the input signal end. This was only used for the front rotation blades in efforts to synchronize the two servo motors on each end for smooth turning. The other circuit involved separate ground and VCC sources for the motor end and the signal end. This is strongly preferred because it inhibits any chance of shortages or voltage conflicts.

Parts List:

Type

Parts

Quantity

Unit Cost

Total Cost

Source

Mechanical

Cardboard basket

1

Scrap

Mechanical

Wooden board/blades

1

$4.00

$4.00

Bought at Lowe’s

Mechanical

Foam board

1

In Lab

Mechanical

Duct tape

1

In Lab

Mechanical

Tin ramp

1

$5.00

$5.00

Bought at Lowe’s

Electrical

2.5V AA Batteries

3

$2.00

$6.00

Bought at Rite Aid

Electrical

9 V Battery

1

$2.00

$2.00

Bought at Rite Aid

Electrical

Battery clips

3

In Lab

Electrical

Servo motors

6

In Lab

Electrical

Wheels

6

In Lab

Electrical

LED emitters

8

In Lab

Electrical

NPN Phototransistors

8

$0.125

$1.00

Bought at Digikey

Electrical

Prototype board

1

$4.00

$4.00

In Lab

Electrical

ATMega644

1

$8.00

$8.00

In Lab

Electrical

White boards

4

$6.00

$24.00

In Lab

Electrical

Small Solder boards

2

$1.00

$2.00

In Lab

Electrical

DIP Socket

2

$0.50

$1.00

In Lab

Electrical

SIP/Header Socket

36

$0.05

$1.80

In Lab

Total

$58.80

For more detail: The Autonomous Tennis Ball Picker Using Atmega644


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top