We are Tiempo which means time in Spanish and our time- glass-like logo contains the letters Z and X, which come from the initials of our five team members’ last names. We are from the University of Michigan – Shanghai Jiao Tong University Joint Institute. It’s a leading engineering institute which enjoys the advantages of both SJTU and the Umich. With strong faculty, a world-class environment and a far-sighted education style, it aims at cultivating students to be distinguished engineers who are great problem solvers.
In the course VG100, the introduction of engineering, the institute tries to enhance our skills of group work, creative thinking and time management. In the first project out of two, which is called Warzone Tower Defense, we are required to build our own bug and paper defense tower to have a defense game.
The 20 groups participating in the game each provide a bug (robotic car) and a tower (A4 paper, 80g). The bug used on the game day should have passed all previous bug tests. On the game day, once the tower detects the bugs approaching in a straight line, it will rotate the laser on the top to kill the bug by shooting directly at the light sensor in the front of the bug. The bug will stop immediately when it is irradiated.
- Track: 2.5m (0.5m protection area + 2.0m race area)
- Tower: at least 60cm in height and at most 3 sheets of paper in one place
Here is the brief introduction of the game rules:
- The bug should move forward in a 2.5m-long track at a speed between 0.2m/s and 0.3m/s.
- When the car detects the first white line lying across the path, it should stop and restart within a few seconds; however, it will never start again when it stops at the second line.
- The bug can’t be killed within the protection area (0.5m) or with a speed over 0.4m/s
- 3 randomly chosen bugs will approach the tower from 3 out of 4 prescriptive directions in 3 rounds.
- 5 minutes will be given for adjustment between the rounds. No more adjustment is allowed once the game starts.
Step 1: Designing Concept of the Bug
Picture shown above is the exploded view of our bug design, in which you can clearly see how our products are installed.
At first glance, you will notice our smaller Acrylic board with a light sensor in the middle. It can respond to the laser from the tower and transfer signals to the controlling module. It is attached to our bigger Acrylic board which serves as the chassis.
But you may not notice our 3 infrared sensors in the bottom of the bug. Unspectacular as they are, they are responsible for tracking and detecting the white line.
Our bug is powered by a 11.1V battery. In the middle of our bug lies our core Arduino Uno R3, on each side of which lies a bread board to hold the wires we need to use.
Motor driving board and the two motors are fixed in the rear of the bug. They can control the speed as well as the direction of the bug according to the order of the Arduino Uno. For example, if the bug runs a bit left, the driving board can speed up the left drive wheel and lower the velocity of the right drive wheel to guarantee that the bug runs straight.
Two back wheels that are separately connected to the two motors serve as drive wheels while the front wheels connected by the axis are the driven wheels.
Connected by wires and welded together, the different modules cooperate to form a perfect bug in the game.
Step 2: Designing Concept of the Tower
Picture above shows the other part of our project. Although it may not seem to be as technical as our bug, it is not easy to make as we can only use 80g A4 paper and white wood glue.
The rectangle pillars are simple to make but holding heavy things is far beyond their ability. So we add conjunctions to strengthen the tower. We put a platform on the top of the tower to provide a bigger area for our servos and laser.
Above the tower are our electronic components. Same as the bug, it has a core Arduino Uno that serves as controller and battery that provides electricity for the whole system.
At the bottom of the tower, there are 4 distance sensors in four different directions. When a car begins driving toward the tower, the sensor can form a signal which will be sent to the Arduino Uno.
The most important part of the tower is the system that consists of 2 servos and a laser. After receiving the signal sent by the distance sensor, the system will determine where the bug exactly is and shoot its light sensor immediately to kill it.
Step 3: Material List
Item Description Quantity Price(RMB) URL
Motor Driving Board L298N 1 20.38 https://detail.tmall.com/item.htm?id=41248562401&...
Arduino Uno 2 64.00 https://detail.tmall.com/item.htm?id=41248562401&...
Motor 12VDC 200rpm 2 68.50 https://detail.tmall.com/item.htm?id=41248562401&...
Motor Bracket Customized 2 0.74 Given by TA
IR Sensors rpr220 IR sensor 3 45.00 https://detail.tmall.com/item.htm?id=41248562401&...
Servo 360° rotation 2 60.00 https://detail.tmall.com/item.htm?id=41248562401&...
Light Sensors Unofficial 1 6.14 https://detail.tmall.com/item.htm?id=41248562401&...
Tires 65mm radius, rubber 4 48.00 https://detail.tmall.com/item.htm?id=41248562401&...
Couplers φ4mm hole with hexagonal profile 2 7.80 https://detail.tmall.com/item.htm?id=41248562401&...
Axis Length=12cm φ4mm 1 3.95 https://detail.tmall.com/item.htm?id=41248562401&...
Connection Wires For power, signal and sensor 1 1.00 Bought at store
Synthetic Glass 150mm*250mm, 150mm*200mm 2 60.00 https://detail.tmall.com/item.htm?id=41248562401&...
Screws & Nuts φ4mm and φ3mm Many 7.00 https://detail.tmall.com/item.htm?id=41248562401&...
Batteries 11.1V 1 10.00 https://detail.tmall.com/item.htm?id=41248562401&...
White Glue Strongly adhesive 1 5.80 https://detail.tmall.com/item.htm?id=41248562401&...
A4 Paper 80g Much 18.00 Bought at store
Bread Board Yellow, white 2 31.00 https://detail.tmall.com/item.htm?id=41248562401&...
Laser To emit Laser 1 15.00 https://detail.tmall.com/item.htm?id=41248562401&...
Ultrasonic distance measuring module Telesky 4 14.40 https://detail.tmall.com/item.htm?id=41248562401&...
Step 4: Step by Step 1(Bug): Circuit Diagram
This is a brief circuit diagram of our bug. By using different colors, we can easily distinguish where each wire is connected to. Those black lines show wires connected to the ground, red ones are wires linked to the 11.1V battery which supplies electricity to both the Arduino Uno and the Motor Driving Board, orange lines mean PWM controlling wires, brown lines are linked to 3.3V power which functions as the electric source for infrared sensors, purple ones are analog data input lines, blue ones are serial wires that help make a complete circuit system, and the yellow and green lines connect the motor with the driving board.
The driving board functions as the source of the driving force of the car. Receiving PWM data from two PWM input ports and digital data from digital input ports, it can control the directions and speeds of the two motors connected to it. The car will go straight if two motors rotate in the same direction and at the same speed, and will turn left or right if two motors have different speeds, in value and in direction.
The three infrared sensors are used to detect the situation on the road just below the car. They get power from Arduino Uno, send infrared signals to the ground and analyze the signals reflected. There are huge differences between the signals reflected by white and black road surfaces. As there is a white line lying in the middle of the track, two of the sensors can calculate the relative position of the line to the car, which helps the car to adjust its direction. The third sensor can detect the horizontal white line across the track, at which the car must stop.
The light sensor is the "lifeblood" of the car. When the brightness of the environment changes, it will receive different data. When the brightness reaches a threshold value for a threshold time, the sensor will send a signal to let Arduino Uno stop all devices in the car, which corresponds to the rules of the game. Neither low light intensity nor short illuminating time will trigger this.
The breadboards work as "transfer stations" for all wires. Due to the limited Arduino Uno ports available, there should be a wire connector organizing the wires and operation of the whole circuits. With a number of ports that are parallel to each other or connect in series, the breadboards give us the opportunity to create a more complex circuit.
Step 5: Step by Step 2(Bug): Component Fabrication
- Use AutoCAD to draw a blueprint of the baseboard and the head board.
- Contact an acrylic board customizing workshop to cut the board.
- Drill the screw holes as CAD picture shows using an electric drill.
- Cut a long rectangular hole to place the photoelectric sensor on the front acrylic board using an electric drill.
Step 6: Step by Step 3(Bug): Soldering
1. Solder all motor ports and power ports on the L298N driving board with DuPont wires. The ports are not tight enough, so they need to be soldered.
2.Solder the four wires connected with the motor ports together with two motors respectively.
Attention: Soldering might be dangerous! Be careful.
Step 7: Step by Step 4(Bug): Assembling
1.Think carefully about where every accessory should be put before assembling. Our arrangement is shown above.
2. Put the motor driving board in place. Since it is soldering with two motors, fix them on the board as well using motor brackets. Screw as tight as possible.
3. Put the arduino Uno in the middle of the board using screws.
4. Place the long car axle across the two angle iron pieces on the front profile of the baseboard.
5. In order not to let the axle move leftwards or rightwards, use adhesive tapes to expand the radius of both ends.
6. Place the coupler onto the axles on the motors at two ends of the car axle, and place the wheels onto the couplers. To prevent the wheels from getting loose, fix them with screws.
7. Fix two breadboards onto the board with adhesive tapes.
8. Fix the head board together with the three front angle iron pieces on the baseboard using screws. Put the photo sensor in place and make an U-like shield using white paper so that it can be more sensitive about light.
9. Connect the wires and devices according to the circuit diagram.
10.Use adhesive taps to fix sensors and batteries to the baseboard.
Step 8: Step by Step 5(Bug): Finishing
Now the bug is well assembled. Above is the vertical view and side view of our bug!
Step 9: Step by Step 1(Tower): Circuit Diagram
Picture above shown above is the circuit diagram of our tower. Black lines represent wires connected to the ground, blue ones are linked to the distance sensors to transmit data, red ones are connected to the 7.4V battery, yellow ones are data lines of those two servos, and purple lines that connect Arduino Uno with servos supply electricity for servos.
The four distance sensors on the bottom are used for detecting how far from the tower the cars in four different directions are. They help Arduino Uno to choose correct strategies for killing the bugs. They send supersonic waves and calculate the time the waves reflect back. Arduino Uno can work out the accurate distance according to the time and the velocity of acoustic waves.
The laser generator is the weapon the tower uses to kill bugs. As it emits the laser onto the light sensor, the bug will stop immediately, which corresponds to the rules of the game.
The two servos help the laser generator adjust its emitting direction, which is one unique part of our design. A servo can rotate to a certain angle according to the commands. However, the range of rotation of one servo is limited in one flat plane. So, in order to make the laser generator able to point at any direction in the space, we should use two servos that are in two vertical flat planes.
Step 10: Step by Step 2(Tower): Component Fabrication
1.Buy some 80g A4 paper and some white glue.
2.Fold a piece of A4 paper in half along its longer side and tear along the crease. Do it for 4 times repeatedly and we get 8 “half paper”. A piece of “half paper” is shown in the first picture.
3.Divide the “half paper” into fifths along the longer side of it, and fold along the creases to form a rectangle, as shown in the second picture. Use white glue to stick it. Do it for 8 times repeatedly and we get 8 rectangle pillars.
4. Cut eight 0.5*12.2cm rectangles from the A4 paper. Cut two small 2.1*2.1cm squares from two corners which share the same side of the rectangle. Fold the rectangles along the creases and glue it as the third picture shows to form conjunctions whose function is to strengthen the structure of the tower. Eventually we will have 8 paper conjunctions. As is shown in the forth picture.
5. Cut four 10.5*5cm rectangles from the A4 paper. Fold along the creases shown in the last picture. Then we get the connections between different pillars.
Step 11: Step by Step 3(Tower): Assembling
1. Use the rectangles made in step by step by step 2.5 to join two pillars made in step by step 2.3 with glue, so we get a “higher” pillar, approximately 60 cm in height. This is illustrated in the first picture. Do it repeatedly for four times to get four pillars for the tower.
2. Join the nearby two pillars using the conjunctions from step by step 2.4 on the surfaces of
each long pillar and glue, as is shown in the second picture and the third picture.
3.Join the nearby two pillars using the conjunctions from step by step 2.4 on the top of the pillars with glue.
4. Now the tower is finishing.
Step 12: Step by Step 4(Tower):Attach Electronic Components to the Tower
1. Connect wires together to make the whole wires long enough and end with a male and a female.
2. Stick 4 wires together to form a group. Make 4 total groups.
3. Choose 1 wire which has a remaining male in each group. Weld it with the male of another group.(shown in the first picture). Repeat the process. Plug the 2 males into the slot of the Arduino Uno.
4. Put each group of wires on the top and make them pass through each hollow pillar.
5. Plug the 4 distance sensors to our 4 groups of wires separately and attach the sensors to the 4 pillars at the bottom of our tower.
6. Take out another 3 wires. Weld each of the male together to make a “Y” shape.
7. Attach the two servos to the Arduino Uno, using the weld wire in one of the three sockets.
8. Fix the servos on the tower and make sure that it can rotate freely.
9. Stick the laser to the servo, and connect it to the Arduino Board.
10. Attach batteries to the Arduino Uno, and upload the codes to it. Then the tower is finished.
Step 13: Videos
Step 14: Troubleshooting
1.When connecting the wires, notice that the five holes in the same line on the bread board function the same, so just choose the one you feel most convenient in that line to use.
2.The white glue may sometimes weaken the stability of the tower since the glue is in liquid state, so use a dryer every step to assure every part of the tower can hold the heavy things on it.
3.Every step in tower building procedure should be precisely followed.
4.Thank you for watching the document, and hope you enjoy it. More details are always available through our E-mail: email@example.com.