cdn.instructables.com€¦  · web viewon the gaming day, there will be four paths around the...

25
Manual for Tower Defense Game Vg100 Introduction to Engineering Fall 2016 Instructor Dr. Shane Johnson Irene Wei Group17 Hou Jize Mark M Zhu Yilun Allan A Zhang Zhengyuan G Liu Taiqi I Chen Zhiqi C 516370910011 516370910208 516370910022 516370910062 516370910245

Upload: others

Post on 14-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

Manual for Tower Defense Game

Vg100 Introduction to Engineering

Fall 2016

Instructor

Dr. Shane Johnson

Irene Wei

Group17

Hou Jize Mark M

Zhu Yilun Allan A

Zhang Zhengyuan G

Liu Taiqi I

Chen Zhiqi C

516370910011

516370910208

516370910022

516370910062

516370910245

Page 2: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

Figure 1: JI Building. (from JI official website)

Page 3: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

1. Introduction

1.1. Background Information

We are first year students from University of Michigan-Shanghai Jiao Tong University Joint Institute (UM-SJTU), which is a world-class teaching and research institute located in Minhang District, Shanghai, China for nurturing innovative engineers and leaders with global visions.

1.2. Course & Project Information

The course we are taking is VG100, Introduction to Engineering, which requires students to carry out designs of two projects in one semester. The course aims to cultivate students’ theoretical and practical skills, critical minds, and teamwork spirit. The first project in the 2016 fall semester is Warzone Tower Defense, which includes a paper guard Tower and a Bug (robotic car). Before the Game Day, there is a Bug Test to ensure the car meet the standard and is well-prepared for the game. On the Game Day, tower should detect the Bugs and kill them.

1.3. Game Rule

On the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different paths randomly (the bug should go straight and stop at the horizontal white line in the middle of the path for 2~4 seconds), and the Tower has to kill them by a laser on the top. The more Bugs killed, the faster, the better.

The race will be conducted three rounds and the best performance of the three rounds will be taken as the final score.

Touching the Bug (robotic car) \ Tower or helping it in anyway by any person while the Bug is running on the path is strictly prohibited.

1.4. Competition Regulations

Bug: Should have a vertical board, 15cm Width*10cm Height, in the front of the car.

Tower: 1) Use paper only and no more than three layer stacking of paper.

Page 4: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

2) Place all electronic components on the top except certain sensors.

3) Have height of at least 60cm tall.

Motors, wheels, laser and photosensors applied must be the ones provided by TA and must not be replaced.

2. Design and Performance

Tower: 1) Triangular prism main column with smaller prism inside to ensure stableness.

2) Hexagon platform with honeycomb structure which ensures weight capability.

3) Servo on the top to control the direction of the laser.

4) Distance sensors at the bottom to detect the Bugs.

Bug: 1) Two-layers to reduce the flat size.

2) Two grayscale sensors outer to detect white line across.

3) Two grayscale sensors inner to track along the white line in order to go straight.

4) One photosensor to receive the laser light.

Our Bug performed perfectly in the Bug Test and our Tower killed one Bug on the Game Day.

2.1. Exploded diagram

Page 5: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

2.2. Concept diagram

Concept 1 Tower

Concept 2 Bug

Exploded 1 Tower Exploded 2 Bug

Page 6: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

3. Materials List

No ItemQuantity (piece)

Price (yuan)

Hyperlink

1 Motor Driving Board (L298N) 1 7.69 https://detail.tmall.com/item.htm?

spm=a230r.1.14.13.O3Pr15&id=41248562401&c

m_id=140105335569ed55e27b&abbucket=17

2 Arduino Uno 2 32.00*2 https://item.taobao.com/item.htm?

spm=a230r.1.14.27.N3BZfz&id=524154573829&

ns=1&abbucket=17#detail

3 Motor (12VDC 200rpm) 2 14.90*2 https://detail.tmall.com/item.htm?

id=524061190057

4 Motor Bracket 2 0.40*2 https://item.taobao.com/item.htm?

spm=a1z09.2.0.0.TNYvuy&id=525688077733

5 Tracker Sensors (TCRT5000) 2 6.90*2 https://item.taobao.com/item.htm?

spm=a230r.1.14.86.hL5OLU&id=528132899161

&ns=1&abbucket=8#detail

6 Tire (58mm radius, rubber) 4 5.50*4 https://item.taobao.com/item.htm?

spm=a1z09.2.0.0.TNYvuy&id=523235412382

7 Coupler (φ4mm with hexagonal profile)

4 2.20*4 https://item.taobao.com/item.htm?

spm=a1z09.2.0.0.TNYvuy&id=523235412382

8 Connection Wires 40 10.00 https://item.taobao.com/item.htm?

spm=a230r.1.14.27.VqY1FU&id=536029452971

&ns=1&abbucket=15#detail

9 Synthetic Glass (200mm*300mm)

2 20.00*2 https://detail.tmall.com/item.htm?

spm=a230r.1.14.13.vJYWwM&id=20099696260&

cm_id=140105335569ed55e27b&abbucket=15

10 Arduino Uno Expansion 1 20.00 https://item.taobao.com/item.htm?

spm=a230r.1.14.22.2Zl4d2&id=537330049013&

ns=1&abbucket=15#detail

11 Laser (Emit) 1 15.00 https://item.taobao.com/item.htm?

spm=a1z09.2.0.0.TNYvuy&id=44461132065

12 Glue (White latex) 1 2.00 https://item.taobao.com/item.htm?

spm=a230r.1.14.6.nqFw2p&id=540356385962&

ns=1&abbucket=15#detail

13 Distance Sensor (C6) 4 5.00*4 https://item.taobao.com/item.htm?

spm=a230r.1.14.46.Jzmcez&id=12258931994&n

s=1&abbucket=15#detail

14 Servo (Two axis) 2 9.90*2 https://item.taobao.com/item.htm?

Page 7: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

spm=a230r.1.14.27.rJpxmR&id=535977732983&

ns=1&abbucket=15#detail

15 Grayscale Sensor (TCS230) 2 10.00*2 https://detail.tmall.com/item.htm?

spm=a230r.1.14.6.oDuxro&id=525891447559&c

m_id=140105335569ed55e27b&abbucket=8&sk

uId=3130547891326

16 Light Sensor 1 5.19 https://item.taobao.com/item.htm?

spm=a1z09.2.0.0.TNYvuy&id=40744123503

17 Batteries (Ni-H 5# 2400mAh, 4 batteries each)

2 55*2 https://item.taobao.com/item.htm?

spm=a230r.1.14.183.tuwtSp&id=520412455496

&ns=1&abbucket=15#detail

Total 408.88 Yuan3.1. Part Drawing

• 1 Motor Driving Board (L298N) • 2 Arduino Uno

• 4 Motor Bracket• 3 Motor (12VDC 200rpm)

Page 8: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

• 6 Tire (58mm radius, rubber)

Page 9: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

• 9 Synthetic Glass (200mm*300mm)

• 8 Connection Wires

• 11 Laser (Emit)• 12 Glue (White latex)

• 7 Coupler (φ4mm hexagonal profile)

• 10 Arduino Uno Expansion

Page 10: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

• 14 Servo (Two axis)

• 17 Batteries (Ni-H 5# 2400mAh)

• 13 Distance Sensor (C6)

• 15 Grayscale Sensor (TCS230)• 16 Light Sensor

Page 11: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

4. Procedures

4.1. Making the Tower

4.1.1. Circuit Diagram for the Tower

Circuit Diagram 1: Tower

Page 12: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

4.1.2. Procedures of Building the Paper Tower

1)Assembling the main part

1.Prepare a piece of paper (A4 80g). 2.Fold it by half and then half again.

3.Unfold the paper, fold the upper edge to the outer crease.

4.Fold the paper along with the creases to form a triangular prism and spread glue to fix the structure.

5.Take half of paper. Fold it as in step 2 and step 3.

6.Fold it to form a small triangular prism. Stick it.

Page 13: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

7.Insert the small triangular prism to the bigger one. Stick it with glue.

8.Follow the step and make another main column.

9.Make a lid for columns. Draw a regular triangle and add a rectangle to each side.

10.Cut it down and fold it along the edge of triangle.

11.Stick it to the bottom of the prism. 12.Take another paper, repeat the steps to make a wider column.

2) Making the base

2

Page 14: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

13.Cut out a square scrap, and cut all the angles.

14.Draw the diagonal line and cut off one rectangular scrap along the line.

15.Fold it according to the diagonal line. 16.Make a smaller sample in step 13. Stick it to the sample made by step 15.

17.Fold it three times until like the picture shows.

18.Repeat the steps. Stick the bases to each side.

3)Making the top & bottom platform

19.Cut out a rectangular scrap of 1cm*7cm to form a hexagonal prism.

20.Make more, and stick them to each other.

Page 15: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

21.Form the shape of regular hexagon. 22.Cut out a paper regular hexagon which matches the size of 6.4cm*6.4cm.

23. Stick them with another regular hexagon.

24.Follow the steps and make a larger one to place at the bottom.

4.1.3. Final State view

Assemble all parts together, place the electronic devices and we will see…

Page 16: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

Tower 1

Tower 2

4.2. Making the Bug

Page 17: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

4.2.1. Circuit Diagram for bug

Circuit Diagram 2

4.2.2. Component Fabrication

CAD 1

4.2.3. Procedures of assembling the bug

Page 18: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

1.Take out motors, motor brackets, wheels, couplers, screws and nuts.

2.Use screw driver to assemble them. Then, one drive wheel is finished. Do the same and make another.

3.Assemble the driven wheel.

4. Assemble the supporting structure as the concept diagram shows. Then insert the axis into the driven wheel.

Page 19: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

5.Fix the drive wheel to the hole, fasten.

6.Fix the grayscale sensor to the front holes.

7.Fix tracking sensors in inner holes.

8.Fix the driven wheel with screws.

9.Use M3*40cm long screws and copper cylinder to add a layer.

10.Fix all the electronic components and connect the wires.

Page 20: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

4.2.3. Final State View

Bug 1

5. Troubleshooting

5.1. Bug

1) It’s hard to have two motors rotating at the same speed, so it’s necessary to use tracking sensors to ensure the Bug goes straight.

2) Do not use a caster instead of two back wheels since the Bug would go more smoothly with four wheels.

3) A Ni-H battery is highly recommended when the Bug runs too slowly.

5.2. Tower

1) Don’t use servo that can spin 360, use that of 270 or 180 instead, since it’s hard to control the direction of servo of 360 which is instructed by voltage, not by the degree.

Page 21: cdn.instructables.com€¦  · Web viewOn the Gaming Day, there will be four paths around the Tower in the four directions. Three Bugs will move towards the Tower from three different

2) The distance sensors may have conflict with the servos. It can be avoided by adding delay time in the programming code.