Introduction: Best Warzone Tower Defense
We are group Akita(Figure1.4)from JI - University of Michigan - Shanghai Jiao Tong University Joint Institute(Figure1.3), located in Minhang District, Shanghai, China. Figure 1.5 is our team logo. The robotic car(Figure1.2) and paper tower(Figure1.1) were built for our project 1 - Warzone Tower Defense - for Vg100 course.Vg100 is a course named Introduction to Engineering, one of the courses that we took in 2016 fall. This course encourages us to work as a team and learn how to do projects.
There were 20 teams in all and each team was supposed to build a “bug”, a robotic car, and a paper tower to kill the “bug” by laser. On the Game Day, three “bugs”, each randomly choosing a path, will approach the tower. The faster we “kill” the “bug” and the lighter our tower (including all the components on it) weighs, the higher our score will be.
Here are the requirements for the bug and the tower.
• With a speed of 0.2-0.3m/s.
• With a 15cm*10cm vertical board at the front.
• With a photo sensor placed parallel to the ground and towards the tower, 5cm high from ground.
• With a program to stop for 2-4s at the first crossing white line, and forever at the second one.
• With a program to stop once the photo sensor is irradiated by the laser except when it is on the white line.
• With a program to keep going when the relative speed between the bug and the laser is more than 0.4m/s.
• Attend a height of 60cm.
• Use paper as load bearing structure.
• Stack no more than 3 sheets of paper.
• Use regular printed paper (A4, 80g) and white wood glue only.
• Place electronic components on the top of the tower and appropriate sensors at the bottom.
Here are videos of our bug and tower.
In the bug video, you can see that our car functions well. And the tower video is taken on game day, so there was not enough light. On that day, something went wrong with our program of tower, so we killed no bug in first round, and one bug in second round.
Step 1: CONCEPT DIAGRAM:BUG AND TOWER
As showed above in figure 1.6, the core of our robotic car and tower is Arduino UNO. At the beginning, the command produced by Arduino is sent to each part of the car and every part starts to work after receiving it. When receiving the signal sent by sensor parts of the car, it can react correspondingly and control the execution part to do their job in order to achieve our aims.
The front wheels work as the driver to makes it easier to control direction. We can see DC motors attached by wires to the motor driving board, which is applied on the car to control speed by analog signal.
A most important part of our robotic car is the photo sensor system, which can detect the light intensity, and send it to Arduino, so that the car can stop after detecting a certain high level of light intensity for a certain period of time.
Sometimes the laser emitted by the tower may be too separate and the light intensity is not high enough. In that case, our photo sensor cannot work well, so we make a paper shield to reflect laser and thus strengthen the illumination.
Three line tracking sensors at the bottom are used to detect the white lines. They can emit and receive infrared ray, and judge the color - white or black - they detect the central line. The left and right ones are for the central white line to promise the robotic car to go straight and not to diverge. The Arduino can change the speed of each wheel according to the signal sent by the sensors.
The other one is for the crossing white line. As soon as it detects the crossing white line, it will send a signal to the Arduino to stop the car for 2-4 seconds at the first time or to stop forever at the second time.
As shown above in figure 1.7, our main structure of the paper tower is ellipse-shape cylinder, which is more stable than the tower in other shapes, because when it is stressed, the force it bears is consistent and is hard to change the shape. What’s more, it is cuter than other shapes.
We put four cuboids at the bottom to make the tower more stable. There are small sticks in cuboids, which make them firmer. And the two structures with tiny cylinders are used as plates to support the components on them.
Near the bottom of paper tower are four ultrasonic sensors, each for a direction, which transmit ultrasound and receive it after being reflected by the object. The Arduino can calculate the distance from the object to the tower via the signal sent by the sensors.
There are two micro servos on the top of the tower which are supported by the cradle head. The 360 degrees rotated servo is used to adjust the direction of laser emitter, and the 180 degrees one is to adjust the angle.
The laser we use is always at work since the switch is turned on and have already been debugged to the correct width and light intensity which could be detected easily.
Step 2: MATERIALS LIST
*Some pictures are taken from taboo, relative hyperlinks are provided in table, you can find them in the Materials list-pdf.
Step 3: STEP BY STEP 1: CIRCUIT DIAGRAM
Figure 2.1 is the circuit diagram of the car. All the red wires mean 5V power supply, and all the black wires mean the ground line for convenient recognition.
In every sensor, you can find a VCC port and a GND port. Connect the VCC with 5V port and the GND with GND in Arduino. Then the sensors will get enough power to work.
The ENA and ENB stitches (the voltage-adjustable ones) on L298N driving board must be connected to PWM on Arduino. ENA for the left motor and ENB for the right one. Connect OUT 1 and 2 on L298N with the left motor, and OUT3 and 4 with the right one. These are used to output power to the motors.
Then we connect the IN1, 2, 3, and 4 stitches to the digital ports on Arduino. IN1 and IN2 are used to control the rotation direction of the left motor, and IN3 and IN4 are for the right one.
The DAS SCL ports on photo sensor are used to transmit analog signals about the illumination to Arduino, so they should be connected to the analog ports on Arduino.
The OUT port on the line tracking sensor should be connected to a digital port on Arduino, so that the sensor can transmit digital signals about the color they detect to Arduino.
Figure2.2 is the circuit diagram of the tower. All the red wires mean 5V power supply, and all the black wires mean the ground line.
We connect the red line on servo to 5V port on Arduino, and connect the black GND line to GND port on Arduino. Then connect the orange line to analog port on Arduino so that Arduino can send command to micro servo.
The TRIG port on ultrasonic sensor is used to control the emission of ultrasonic wave and should be connected to digital port on Arduino. The ECHO port is connected to PWM on Arduino so that the sensor can transmit analog signals to Arduino.
Step 4: STEP BY STEP2 : CONSTRUCTING THE BASE
1.1 Prepare two synthetic glasses (one is 10x15x0.5cm and the other 12x23x0.5cm).(figure3.1)
1.2 Use the welding torch to drill holes, which are used to place screws or wires. (Cautious: The temperature of welding torch can be really high!)(figure3.2)
1.3 Fix two wire on both motor with welding torch. (Cautious!) And connect motors with couplers.(figure3.3 and figure3.4)
1.4 Tuck four couplers to four wheels, and fix them by screws.(figure3.5 and figure3.6)
1.5 Use the screws and nuts to fix two right angle brackets under the bigger synthetic glass.(figure3.7 and figure3.8)
1.6 Place the axle through the two holes of the right angle brackets. Then tuck the axle’s two sides to two couplers.(figure3.9 and figure3.10)
1.7 Use the screws and nuts to fix two motor brackets under the bigger synthetic glass.(figure3.11)
1.8 Place two motors in motor brackets.(figure3.12 and figure3.13)
1.9 Use the right angle brackets and screws to fix synthetic glasses perpendicularly.(figure3.14 and figure3.15)
Step 5: STEP BY STEP 3 : ASSEMBLING THE COMPONENTS
1.10 Fix line tracking sensors on synthetic glasses with screws and right angle brackets.(figure 3.16 and figure 3.17)
1.11 Use the welding torch to drill a hole on the middle of the smaller synthetic glass (Cautious!) And fix the photo sensors through it.(figure3.18)
1.12 Make a small shield for the photo sensor with paper.(figure3.19)
1.13 Put the screws and nuts through the hole to fix the Arduino and motor driving board on the bigger synthetic glass. And put on batteries(figure3.20 and figure3.21)
Step 6: STEP BY STEP 4: FINISH THE BUG
1.14 Connect all the wires according to the circuit diagram. And connect the switch.(figure3.32 and figure3.23)
1.15 Congratulations! You built a bug.(figure3.24 and figure3.25)
Step 7: STEP BY STEP 5 : TOWER UPPER PART
2.1 Prepare some pieces of A4 papers.(figure4.1)
2.2 Roll one paper to a three-layer cylinder, and make two of it. (small cylinder) (figure4.2)
2.3 Roll one paper to a one-layer cylinder, and make three of it. (big cylinder) (figure4.3)
2.4 Cut to two pieces of 10cmx10cm small papers. Remember to dig a hole in the center, for wires.(figure4.4)
2.5 Surround the small cylinder by the big cylinder.(figure4.5)
2.6 Stick the edge of small and big cylinders to pieces of paper with white wood glue.(figure4.6 and figure4.7)
2.7 Stick the other small and big cylinders to the top of the previous one’s small paper side.(figure4.8)
Step 8: STEP BY STEP 6 :TOWER LOWER PART
2.8 Make four paper cuboid.(figure4.9)
2.9 Surround one cylinder with cuboids.(figure4.10)
2.10 Put a piece of paper on cuboids. And remember to dig holes.(figure4.11)
2.11 Put the two cylinders on the cuboids(figure4.12 and figure4.13)
Step 9: STEP BY STEP 7:TOWER TOP PART
2.12 Assemble the cradle head and two micro servos according to this video(figure4.14):
2.13 Fix the laser emitter on the top pf cradle head with tapes.(figure4.15)
2.14 Fix the cradle head and servos and the battery on Arduino board with tapes. Then put them on the top of tower and fix the board with tapes.(figure4.16)
Step 10: STEP BY STEP 8 : TOWER BASE PART
2.15 Make some tiny paper cylinders.(figure4.17)
2.16 Surround tiny cylinders with a slide of paper, and cover the top and bottom of them with pieces of paper, as a plate.(figure4.18 and figure4.19)
2.17 Stick the other part of tower on the plate base and stick ultrasonic sensors into paper cuboids to fix them.(figure20)
Step 11: STEP BY STEP 9 : FINISH THE TOWER
2.18 Connect the wires according to circuit diagram. And congratulations you built a tower.(figure4.21 and figure4.22 and figure4.23)
Step 12: TROUBLESHOOTING
Hope you enjoy watching our manual. If you have any question, you could contact us through email: firstname.lastname@example.org or email@example.com