Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

POLITEKNIK UNGKU OMAR

BALL LAUNCHING MACHINE

NAME ID NO

MOHAMED SALMAN 01DKM17F2033

BIN ZAKKARIA

MECHANICAL ENGINEERING DEPARTMENT

DECEMBER 2019
POLITEKNIK UNGKU OMAR

BALL LAUNCHING MACHINE

NAME ID NO

MOHAMED SALMAN 01DKM17F2033

BIN ZAKKARIA

This report is submitted to the department of mechanical engineering


Ungku Omar Polytechnic in partial fulfillment of the requirement for
graduation in Diploma in Mechanical Engineering

MECHANICAL ENGINEERING DEPARTMENT

DECEMBER 2019
ACKNOWLEDGMENT

This thesis is the culmination of three years studying diploma in mechanical


engineering at Ungku Omar Polytechnic. Firstly, we would like to express the utmost
appreciation and gratitude to our project’s supervisor, Pn. Norsheila binti Buyamin,
who has given us a great support and encouragement throughout the project. Without
her, it would have been nearly impossible for us to complete this project successfully.

We would also like to take this opportunity to express our most sincere
gratitude and thankfulness to our beloved and gracious family members for all their
support, especially during our final year project. Their commitment and understanding
has maintained our motivation to keep on giving without giving up. Their undying
love and support made me move forward with no fear of failing and had us giving our
total concentration in our study throughout our time in Ungku Omar Polytechnic.

Special thanks we could also like to express to all our lecturers that has taught
us during our time studying in Ungku Omar Polytechnic. No words could explain the
kindness that they have shown us. All the knowledge and extra guidance that we
required during their lectures.

Last but not least, thousands thanks to our friends who we met as stranger 3
years back but grown close over the year for their helps and guidance during
completing this project. Finally, thanks to everyone who shares their ideas directly or
indirectly throughout completing this project.

II
ABSTRACT

Hockey is a dynamic sport game that is growing exponentially in Malaysia. However,


due to its large popularity and large number of participant, human trainer are not
enough to trainer our players efficiently. With the introduction of Industry revolution
4.0, we built an automated ball launching machine for hockey sport. There are four
main objective in producing the machine. The first objective is to increase the
efficiency of field hockey player and goal keeper training. The second objective is to
build an automated hockey ball shooting machine. Next, objective is the implement
Arduino programs to control direction and angle. Finally, to create controllable ball
shooting machine from a distance. The fabrication of the machine is in using material
which are available in markets. The material selection is based on both quality and
low price point. We hope that the machine will be able to be the solution to those
whom finds it difficult to train alone and a way to reduce waste of energy to move
around to take different angle or direction shot of the hockey ball to the goalkeeper.

III
ABSTRAK

Hoki adalah permainan sukan dinamik yang semakin pesat di Malaysia. Walau
bagaimanapun, kerana populariti yang besar dan jumlah peserta yang besar, jurulatih
manusia tidak mencukupi untuk melatih pemain kami dengan cekap. Dengan
pengenalan revolusi Industri 4.0, kami membina mesin pelancaran bola automatik
untuk sukan hoki. Terdapat empat objektif utama dalam menghasilkan mesin. Objektif
pertama adalah untuk meningkatkan kecekapan pemain hoki padang dan latihan
penjaga gol. Objektif kedua ialah membina mesin menembak bola hoki automatik.
Seterusnya, objektif adalah melaksanakan program Arduino untuk mengawal arah dan
sudut. Akhir sekali, untuk membuat mesin menembak bola yang dikawal dari jauh.
Pembuatan mesin ini menggunakan bahan yang tersedia di pasar. Pemilihan bahan
berdasarkan kedua-dua kualiti dan harga rendah. Kami berharap mesin itu dapat
menjadi penyelesaian kepada mereka yang merasa sukar untuk melatih diri sendiri dan

IV
cara untuk mengurangkan pembaziran tenaga untuk bergerak ke arah sudut yang
berbeza atau arah pukulan bola hoki ke penjaga gol.

TABLES OF CONTENTS

CHAPTER TITLE PAGE

ACKNOWLEDGEMENT ii
ABSTTACT iii
ABSTRAK iv
CONTENT v

V
LIST OF TABLES vii
LIST OF FIGURES viii
LIST OF SYMBOLS ix
ABBREVIATIONS x

1 INTRODUCTION
1.1 Introduction 11
1.2 Project Background 2
2
1.3 Problem Statement 2
1.4 Objective 32
1.5 Scope 33
1.6 Chapter Summary 3
3

2 LITERATURE REVIEW 3
2.1 Chapter Introduction 4
2.2 Ball shooting machine. 4
2.3 A low cost machine 5
2.4 Machine with impact mechanism 4
2.5 The design 7
4

CHAPTER TITLE PAGE

3 METHODOLOGY
3.1 Chapter Introduction 8
3.2 Research design
8
3.2.1 Hockey Machine Available in Market
9
3.3 Finalized Design
3.4 Bill of Material 9
3.5 Fabrication
10
VI
11

14
3.6 Flow Chart
3.7 Chapter Summary

4 RESULTS
4.1 Chapter Introduction
4.2 Results
4.2.1 Arduino circuit test
4.2.1 Compatibility of App with Arduino
4.3 Chapter Summary

5 DISCUSSION, CONCLUSION AND


RECOMMENDATION
5.1 Chapter Introduction
5.2 Discussion
5.3 Conclusion
5.4 Recommendation
5.5 Chapter Summary

REFERENCE
APPENDICES

LIST OF TABLES

TABLE TITLE PAGE

3.1 Cost of Material 10


4.1 Table of time taken for different vertical angle
16
of ball shot
4.2 Table of horizontal angle of ball shot accurately
17
VII
17
4.3 Hockey player versus ball launching machine

LIST OF FIGURES

FIGURE. TITLE PAGE

3.1 BOLA hockey ball machine 9


3.2 Final design in Autodesk Inventor 2018 9
3.3 Final design Autodesk Inventor 2018
10
3.4 Cutting using high speed cutting machine
11
VIII
11

12
3.5 The frame of project
3.6 Mechanical parts attached to frame
3.7 Arduino circuit
3.8 Complete project
3.9 Flow chart on building ball launching machine
4.1 Shows functional arduino circuit
4.2 Shows app is compatible

LIST OF SYMBOLS

IX
Symbol Name

. Period

, Comma

/ Slash

- Dash

[] Square Bracket

() Bracket

ͦ Degree

s Seconds

Kg Kilogram

V Voltage

X
XI
ABBREVIATIONS

SOP Standard operation procedure

apps Application

i.e. Id est or 'that is'

RM Riggit Malaysia

SV Supervisor

IR4.0 Industrial revolution 4.0

X
CHAPTER 1

INTRODUCTION

1.1 INTRODUCTION

Field hockey, also called hockey, is an outdoor game played by two

opposing teams of 11 players each who use sticks curves at the striking end to hit a
small hard ball into their opponent’s goal. Is called field hockey to distinguish it from
the similar game played on ice. Hockey sport is growing exponentially in this period
in our country. With the emergence of championships such as Olympics, World Cup,
Commonwealth Games, Southeast Asian Games Hockey Asia Cup and Sultan Azlan
Shah Cup, Malaysia would also want to produce world class hockey teams
comparable to those championships. With the increasing of participation of hockey
player in our country, a ball shooting machine could help to replace the ball service
trainer. There are only a few factories that manufacture hockey ball launcher in the
China and American market, hence it may cost a very high price for a piece of good
quality hockey ball launcher in Malaysia.

1
1.2 PROJECT BACKGROUND

A local hockey ball coach request Politeknik Ungku Omar, Ipoh to help in
building an aiding machine for hockey ball training. Based on our study, the supply of
advanced training machine for example ball serving machine is very limited in local
market. The hockey keeper cannot be constantly trained as the request of accompany
of a ball shooter is always limited. The present invention relates to a ball shooting
machine for hockey ball practice. More particularly, the invention is concerned with a
ball shooting machine which can shoot a ball continuously toward a trainee. In the
case of a baseball game, the position of the pitcher and the direction of the ball thrown
by him are substantially unchanged, so that a simple pitching machine satisfying these
requisites can well simulate the condition of a ball thrown by the pitcher.

However, in hockey ball game, the ball shooting machine need to be improved by
able to shoot the ball at various aims, directions, angles, heights and ball velocity.

1.3 PROBLEM STATEMENT

After a group discussion with our group mates and supervisor, we having a rough
idea how to construct a hockey ball launching machine. We identified and listed out
the possible problems that could occur are as below:

To determine the economic way to reduce the manpower required during


hockey training.

2
How does the machine improve the quality of the hockey training.
To determine how does the speed of the flying wheels affect the launching and
projection of the hockey ball.
How to improve the performance and function of the machine by introducing
Arduino programming.

1.4 OBJECTIVE

There are four main objective in producing this ball launching machine. The first,
objective is to increase the efficiency field hockey player and goal keeper training.
The second, is to build an automated hockey ball shooting machine. While for the next,
is to implement arduino program to control speed, direction and angle. Last but not
least, is to create controllable ball shooting machine from distance.

1.5 SCOPE

The scope of this project is to implement the idea of automation to replace human
during hockey ball training like launching the balls. The scope are set as following

This machine is suitable for hockey sport only. Next, need to build and fabricate a
new version of machine to fulfill all the requirement. In addition, User have to move
the machine to its operation point before it start to launch the hockey ball. Last but
least, arduino programming to control the machine to achieve IR4.0 theme.

3
1.6 CHAPTER SUMMARY

As for the summary, this chapter explains about research background, problem
statement, objective and scope of this project. The research background states the
direction we took on moving forward with the project needed in sport this days. As for
the objective and scope it was set by us for us in order to make a machine that is both
functional and achievable.

4
CHAPTER 2

LITERATURE REVIEW

2.1 CHAPTER INTRODUCTION

This chapter addresses the objective mention on how to use technology to control a
ball launching machine to improve the training section of field hockey player and
goalkeeper. This chapter also contains the research information and other related
history about the project. It shows the previous research and tech used to address
problems at stand and how the problems were overcame.

2.2 Ball shooting machine.

Advanced tennis ball throwing machines have to accurately launch balls to all
locations of the court with all stroke types, strengths and repetition rates in order to
realize the game situations. All these should be carried out with high stroke accuracy
to perfectly simulate a virtual professional partner for the player. Ball shooting
machine (pitching machine) is used for practicing ball sports, and it is widely
prevalent. However, there are few pitching machines that can throw a ball with a gyro
spin, such as a football or rifle bullet, in which the axis of the ball spins in the same
direction as the ball travels. In this study, a new ball shooting machine, which can
throw in the ball in a wide range of speeds and all pitch types (no, top, down, side and
gyro spin balls) was invented by introducing a launch mechanism using four rollers

5
(two launch and two gyro rollers). The shooting machine is able to arbitrarily change
the rotational speed of the four rollers and the crossing angle of both gyro rollers.[1]

6
2.3 A low cost machine

For this project, there are three different concept designs generated. Each design has
its
own characteristics. One of them needs to be chosen to pursue this project. So Pugh
Concept Selection Method is used to select the best concept design for this
project.Then
concept design which used rotating wheels is selected as the best concept design.
The fabrication of this tennis ball machine is using materials which are easily
available
in markets. The materials selection is based on the lower price because one of the
project’s objectives is to reduce the production cost. Furthermore, local and recycles
products are used as the machine’s components. This project not only focuses on the
thrower mechanism, but generally the whole tennis ball machine is constructed. So
when
the construction finished, this machine can benefit many people especially Malaysian
tennis players.[2]

2.4 Machine with impact mechanism.

In the current work, a newly machine was designed and fabricated for badminton
training purpose. In the designing process, CATIA software was used to design and
simulate the machine components. The design was based on direct impact method to
launch the shuttle using spring as the source of the impact. Hook’s law was used
theoretically to determine the initial and the maximum lengths of the springs. The
main feature of the machine is that can move in two axes (up and down, left and right).
For the control system, infra-red sensor and touch switch were adapted in
microcontroller. The final product was locally fabricated and proved that the machine
can operate properly. Nowadays, badminton can consider as one of the famous sport
in the world. Among sports, footwork is very important in the badminton games and
among badminton skills and techniques, forehand smash are consider most powerful
badminton technique. Speeds sometimes are the key to win a sport competition
especially racket sports. An issue related to that pushing the exercise speed to optimal

7
to improve the functional performance. Sometimes, the training velocities are quite
different to the actual movement velocity of sport specific task. Racket is the best
partner of a badminton player. The quality of the racket is directly affecting the
performance of the player during the match. Racket stiffness and mass properties are
possible to affect the impact phenomenon and restitution coefficient, besides, the
vibration post-impact influence the player’s perception of the racket and the response
time of the player in fast rallies [3]

8
2.5 The design

Pneumatics launcher basically uses compressed air to throw the tennis ball. The air is
compressed using compressor and stored in a chamber. The pressure of this
compressed air is very important to ensure good trajectory of tennis ball. This is
because the initial velocity of the ball depending on the compressed air pressure.
While the tennis ball is stored in a tube and this tube’s elevation angles can be
adjusted to get certain types of trajectory mechanisms. The elevation angles can be set
manually or automatically using electronic system. Mechanical ball launcher basically
uses two counters rotating rollers or wheels to throw the tennis ball. These wheels are
usually powered by electrical motors to rotate. The initial velocity of the ball depends
on the rotating velocity of the wheels. The wheels have small opening between them
where they affect the incoming ball. The tennis ball coming from ball feeder is then
squeezed under tremendous speed and pressure exerted by the wheels.[2] In
pneumatic launchers the ball is thrown using the air jet. The air is compressed with the
attached compressor and stored inside the chamber. The initial velocity of the ball
depends on the output pressure of the compressor. Mechanical launchers shoot the ball
by pulling it between two counter rotating rollers.[4]

9
CHAPTER 3

METHODOLOGY

3.1 CHAPTER INTRODUCTION

This chapter addresses a system of methods or standard operation procedure


(SOP) use particularly throughout this project. This section of the report explains
about what we did and how we did it, to show and evaluate the reliability and validity
of our research. This chapter includes types of research we did. Next, How we
collected and selected our data. Then, how we analyzed our data and our rationale for
choosing the materials.

3.2 RESEARCH DESIGN

Generally, few kinds of hockey ball machine are available in markets. But, their
prices are high and the availability of the machine is low that they could be only
imported from other countries. Next, hockey ball machine are mostly used for major
league hockey players and not available for beginners or local school competition
players. So this new innovation of hockey ball machine can overcome this problem.
To make this machine a reality, several criteria and procedures need to be taken.

10
3.2.1 Hockey ball machine available in market

The world renowned BOLA machine has been specially adapted to fulfil a wide range
of Hockey training needs. Stuart & Williams designed and built the BOLA Hockey
Ball Machine after extensive consultation with a number of hockey coaches. Steve
Bachelor and Bram van Asselt were among those who were keen to have filled what
they saw as a void in hockey training equipment.

Figure3.1: BOLA hockey ball machine

3.3 FINALIZED DESIGN

After finalizing the concept design and mechanism for final design, the design is the
designed using the app AutoDesk Inventor 2018.

11
FIGURE 3.2 Final design in Autodesk Inventor 2018

FIGURE 3.3: Final design Autodesk Inventor 2018

3.4 BILL OF MATERIAL

12
Material that had been bought to construct the hockey ball launching machine
listed. All the quantity and cost of material are listed in table 3.1

NO MATERIALS PRICE(RM) QUANTITY NET PRICE(RM)

1. Arduino Uno 25 1 25

2. Aluminium profile 40 1 40

3. Aluminium bracket(20 20 1 20
pieces)

4. Linear motor 12V 132 2 264

5. Dc motor 12V 25 4 100

6. Motor driver 15 1 15

7. Hc 05- blueooth 21 1 21

8. Dc battery 12V 58 1 58

9. 3D printer filament(1kg) 50 1 50

10. Electronic project box 10 1 10

TOTAL 603

TABLE 3.1: Cost of materials

3.5 FABRICATION PROCEDURE

1) Every dimension we needed were measured and marked using steel meter ruler and
then cut using high speed cutting machine.

13
FIGURE 3.4: Cutting using high speed cutting machine

2) The aluminium profile that have been cut are joined together using bolts aluminium
bracket, bolt and nut in order to create the frame of project.

FIGURE 3.5: The frame of project

3) All the mechanical parts of the project are attached to the frame using aluminium
bracket, bolts and nuts. At the same time the arduino circuit had been done and
attached to the frame as well.

14
FIGURE 3.6: Mechanical parts attached to frame

FIGURE 3.7: Arduino circuit

15
4) Every wiring and circuit had been done. All major component of motor, wheel and
switch have been attached. Cable tie have been used to keep all wire in place for
safety.

FIGURE 3.8: Complete project

16
3.6 FLOW CHART

START

DESIGN CHOOSING
PROTOTYPE MATERIAL

ARDUINO
FABRICATION
CIRCUIT

NO ARDUINO
PROGRAMMING

TEST
NO
RUN

YES ARDUINO
YES 17
TEST
FIGURE 3.9: Flow chart on building ball launching machine

3.7 CHAPTER SUMMARY

This chapter summarizes the details of this project such as research design,finalized
design, cost of material, fabrication procedure and flowchart. The research design
shows possible machine that are similar to our project concept. The application used
to design finalized design in 3d before it was actually made and the application used
was Autodesk Inventor 2018. Next, the list and cost of material is included in this
chapter. Last but not least, the whole fabrication procedure were shown with image
are shown in the chapter.

18
19
CHAPTER 4

RESULTS

4.1 CHAPTER INTRODUCTION

This chapter explains the performance of the project ball launching machine and
the data and results we gathered through various experiments. generally, the thrower
mechanism of this ball launcher machine works exceptionally well. But in order, to
ensure the thrower mechanism runs smoothly three main factors are taken into account.
The rotating speed of flying wheel, the power of motor and the throwing distance of
ball. As for the arduino programming certain basic simulation were run in arduino
application

For proper testing of machines part and app to control it.

4.2 RESULTS

DEGREE LEVEL OF TIME TAKEN TIME DIFFERENCE IN


ANGEL OF ACCURACY FOR EACH BOTH SHOTS(s)
MACHINE SHOT AT THE
ANGLE(s)
(ͦ ͦ)ͦ
20 HIGH 3.3 0.3
20 HIGH 3
40 GOOD 6.2 0.2
40 GOOD 6.4
60 GOOD 9.8 0.1

20
60 GOOD 9.7
AVERAGE TIME DIFFERENCE 0.2
TABLE 4.1: Table of time taken for different vertical angle of ball shot

DEGREE ANGEL LEVEL OF TIME TAKEN FOR


OF MACHINE ACCURACY EACH SHOT AT THE
ANGLE(s)
(ͦ ͦ)

45 GOOD 5.2
60 GOOD 7.4
75 GOOD 8.5
90 GOOD 10
-75 GOOD 8.6
-60 GOOD 7.3
-45 GOOD 5.3
AVERAGE TIME DIFFERENCE 7.4
TABLE 4.2: Table of horizontal angle of ball shot accurately

RESULTS HUMAN MACHINE


ACCURACY NO YES NO NO YES YES YES YES YES YES
OF SHOT
TIME 5 8 7 8 9 3 3 3 3 3
TAKEN TO
SHOOT 3
BALLS(s)
STAMINA LIMITED UNLIMITED
TABLE 4.3: Hockey player versus ball launching machine

21
4.2.1 Arduino circuit test run

FIGURE 4.1 Shows functional arduino circuit

4.2.2 Compatibility of app with arduino

22
FIGURE 4.2 Show app is compatible

4.3 CHAPTER SUMMARY

Generally, the thrower mechanism of the hockey ball launching machine


performs well. It can throw the hockey according to the technical specification stated
before. In order to ensure that the machine is constantly in a working conditions
several factors should be taken into account. Such as the battery life, a proper weather
condition and stored properly. Last but not least, the results above shows that the
machine is able to out perform an actual hockey player given the needs provided.

23
24
CHAPTER 5

DISCUSSION AND CONCLUSION

5.1 CHAPTER INTRODUCTION

This chapters explains about discussion,conclusion and recommendation for the


project. For discussion part explains all the questions and possible problem that could
happen or happened during the project. The conclusion summaries our thought on the
project and whether the stated objective were achieved or not. Finally, in
recommendation ,suggestion were made for future plans and how the project could
have been improved.

5.2 DISCUSSION

As for the way of results and data were taken are through experimental test
between hockey player and the ball launching machine. Firstly six attempts were
taken using both the hockey player and the hockey ball machine to take shot at a target
placed in the certain place within the hockey goal post. The time taken for the hockey
player to take the three shot on the hockey balls continuously increased as the number
of attempts increases. But in comparison, the hockey ball machine took around 3
seconds constantly for every attempts on shooting the hockey balls. Next, the machine
was able to shoot all three balls almost accurately to hit the target set in every attempts
but the hockey player varies due to tiredness. Hence, it is proven that the hockey ball
machine can train a hockey goalkeeper more efficiently with least energy consumed.

25
5.3 CONCLUSION

The project was finally completed after 3 to 4 months of hard work and determination
from the team. All objective were met and the expected tasks were successfully
accomplished.

The first objective was to to increase the efficiency of field hockey player and goal
keeper training. The results in chapter 4 results and data shows that this objective is
achieved by building and new hockey ball launching machine can help to develop a
consistent strike or blocking skill by delivering the ball exactly the same way each
time to help train the hockey players.

The second objective was achieved which was to build an automated hockey ball
shooting machine as it is shown in the chapter 3 of this report that the machine have
been able to be control the speed, direction and the angle of the machine and the
projectile of ball launching.

The third objective were met as it was also shown in chapter 3 which was to
implement arduino programming to achieve the main objective of this project and that
is themed IR4.0. the aurduino is used control direction and angel of the machine when
launching the ball.

The last objective is to create a controllable ball launching machine from a distance.

The objective mention were also achieved as in result chapter 4 where the arduino is
connected to a bluetooth device that enable us to connect it to a cell phone via an pre
created apps from a distance.

26
Developing a real time hockey ball launching machine is never an easy task. There
were many time where we were up against various problems during the duration the
project but with sheer determination and guidance from our SV PN. Norsheila binti
Buyamin the problem were solved.

In conclusion, we have gained priceless experience and knowledge in technical,


programming and management. This skill will surely provided us a strong platform in
future career.

5.4 RECOMMENDATION

There are a lot of rooms for improvement in this project, but as for the purpose
of this semester, we were limited the scope of our project to only aiming and
launching hockey ball. Our current prototype was the product of limited funds and
knowledge that were built in order to fulfill the purpose of our final year project and to
meet the theme that has been set for us, which is it should be an IR4.0 implemented
and sport themed based. This prototype is the proof of concept for the machine that
will eventually bu built into the walls of a proper facility

5.5 CHAPTER SUMMARY

This chapter allows the reader to know all about our thought on the machine
that were built through limited funds and knowledge by the current us, but this gave us
the experience we needed for future such as knowledge on arduino programming and
IR4.0. Plenty were discussed about the problem we faced during our time in building
the project. Last but least, our thought on the process of making this machine a

27
possible were given along with the our future recommendation if the project were to
be continued.

28
REFERENCES

[1] Shinobu Sakai, DEVELOPMENT OF LAUNCH MECHANISM IN BALL


SHOOTING MACHINE WITH FOUR ROLLERS, A trial study of four rollers type
table tennis machine, November 2017.
[2] KHAIRUL AMZAR BIN MOHD KASSIM, DESIGN AND
FABRICATION OF THROWER MECHANISM FOR TENNIS BALL MACHINE,
Bachelor of Mechanical Engineering (Automotive) Faculty of Mechanical
Engineering Universiti Teknikal Malaysia Melaka, June 2013.
[3] B.F. YOUSIF, KOK SOON YEH, BADMINTON TRAINING MACHINE
WITH IMPACT MECHANISM, FACULTY OF ENGINEERING AND
SURVEYING, UNIVERSITY OF SOUTHERN QUEENSLAND, TOOWOOMBA,
AUSTRALIA, 2011.
[4] Krzysztof WÓJCICKI, Kazimierz PUCIŁOWSKI, Zbigniew KULESZA,
Bialystok University of Technology, Faculty of Mechanical Engineering, Bialystok,
Poland, 2011.
[5] Cyril Brechbuhl, and Grégoire Millet, Accuracy and Reliability of a New
Tennis Ball Machine, J Sports Sci Med. 2016 June.[6] AIMÉE BRADSHAW, The
best tennis balll machines: practice without partner, AUGUST 28, 2018.

[7] Schmitt L, Accuracy and Reliability of a New Tennis Ball Machine, Journal of
Sports Science & Medicine, 23 May 2016.

[8] Jitendra Kumar, Sanchit Sharma, Paramjeet Singh, Vaibhav Tewatia, Design
and Experimental Analysis of Automatic Bowling Machine, MIT International
Journal of Mechanical Engineering, August 2015.
[9] MOHD HAFISZUDIN BIN AHMAD, DESIGN AND FABRICATION OF
BALL FEEDER MECHANISM AND BODY FOR TENNIS BALL MACHINE,
Bachelor of Mechanical Engineering , UNIVERSITI TEKNIKAL MALAYSIA
MELAKA, JUNE 2013
[10] Ferenc Kovács, Gábor Hosszú, Highly Accurate Tennis Ball Throwing
Machine with Intelligent Control, World Academy of Science, Engineering and
Technology International Journal of Mechanical and Mechatronics Engineering, 2015.

29
APPENDICES

Appendices A Arduino C language

#include <Servo.h>

#define in1 5

#define in2 4

#define shoot 6

char command;

int servoPin = 3;

Servo Servo1;

int x = 90;

int flagshoot = 0;

void setup() {

Serial.begin(9600);

pinMode(in1, OUTPUT);

pinMode(in2, OUTPUT);

pinMode(shoot,OUTPUT);

Servo1.attach(servoPin);

30
Servo1.write(90);

delay(1000);

digitalWrite(shoot,HIGH);

void loop() {

if (Serial.available() > 0) {

command = Serial.read();

Serial.println(command);

Stop();

switch (command) {

case 'F':

forward();

break;

case 'B':

back();

break;

case 'L':

left();

break;

case 'R':

right();

break;

case 'W':

31
shootin();

break;

case 'w':

shootout();

break;

void forward() {

digitalWrite(in1, 0);

digitalWrite(in2, 255);

void back() {

digitalWrite(in1, 255);

digitalWrite(in2, 0);

void left() {

if (x <= 180){

x++;

Serial.println(x);

delay(100);

32
Servo1.write(x);

void right() {

if (x >= 0){

x--;

Serial.println(x);

delay(100);

Servo1.write(x);

void shootin() {

if(flagshoot == 0){

digitalWrite(shoot,LOW);

delay(200);

digitalWrite(shoot,HIGH);

flagshoot = 1;

void shootout() {

if(flagshoot == 1){

flagshoot = 0;

33
}

void
NO TASK Stop() {
DEC JAN FEB MARCH
2019 2020 2020 2020
digital
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 Write(i
1 Design prototype n1, 0);

digital
Write(i
n2, 0);

Appendices B Gantt Chart

34
2 Choosing materials WEEKS

3 Fabrication

4 Arduino circuit

5 Arduino
programming

6 Arduino testing

7 Part assembling

8 Test & analysis

9 Project presentation

35

You might also like