MICHIGAN STATE UNIVERSITY COLLEGE OF ENGINEERING Autonomous Target Tracking Robot ECE 480 – Team 7 Final Proposal Victor Abreu, Matthew Beutler, Brent Eisenmann, Hisham Hassan, ThomasSchriefer, Peng Xie Course Instructor: Timothy Grotjohn Design Team Faculty Facilitator: Jian Ren Sponsor: Timothy Grotjohn – Michigan State ECE Department Executive Summary This project focuses on the design and creation of an Autonomous Target Tracking Robot. This design will address many engineering issues and customer needs specified by the Michigan State Electrical and Computer Engineering Department. This design will involve communication between a central Arduino microcontroller and a command station. It will also involve programming in the OpenCV library, which utilizes the C++ language. The Arduino will allow for Bluetooth communication between the command station and the robot. A pre-existing tank kit was acquired to provide easy movement and robot rotation. This robot must also be capable of autonomously following a predefined object for a period of time, while avoiding collisions with the object and other obstacles. Data such as video, speed, and direction must be wirelessly sent to a command station that can save all information. There are many design requirements that must be met, along with a strict design budget. TABLE OF CONTENTS INTRODUCTION .................................................................................................. 3 1. TECHNICAL ............................................................................................... 3-10 BACKGROUND ..................................................................................................... 3 DESIGN SPECIFICATIONS/CUSTOMER REQUIREMENTS ............................................ 3 a. FAST Diagram............................................................................................ 4 a. Design Specifications Table ....................................................................... 5 CONCEPTUAL DESIGNS ........................................................................................ 6 a. Decision Matrix ........................................................................................... 7 DESIGN SOLUTION ............................................................................................... 8 RISK ANALYSIS .................................................................................................. 10 2. PROJECT MANAGEMENT ...................................................................... 11-12 PERSONNEL PLAN.............................................................................................. 11 SCHEDULE ........................................................................................................ 11 a. 4 Phases ................................................................................................. 11 b. Gantt Chart ............................................................................................... 12 MEASUREMENT OF SUCCESS .............................................................................. 11 3. COST ........................................................................................................ 13-14 BUDGET ............................................................................................................ 13 4. REFERENCES ............................................................................................... 15 Introduction 2 The design team, consisting of seniors majoring in electrical or computer engineering, has been assigned the task to design and create an Autonomous Target Tracking Robot. The sponsor for this project is the Michigan State Electrical and Computer Engineering Department. This technology could be utilized and implemented in a number of different areas, such as military applications and child monitoring. The design team will be creating a design solution to meet our requirements with a budget of $500. The purpose of this project is to develop an autonomous vehicle that will communicate wirelessly with a separate control station. This will include many aspects of both electrical and computer engineering, such as wireless network communication, microcontroller communication, motor control, as well as circuit and power design. 1. Technical Background The first instance of modern robotics appeared in 1948 when George Devol and Joe Engleberger created the first robotic arm. The two later created the first robotics company in 1956. In 1979, the Stanford Cart crossed a chair filled room without human assistance. It did this by using a camera to take pictures and then sending the pictures to a computer for analysis. (Bellis). The robot could travel at a rate of about one meter every 15-20 minutes, at which point it would take pictures and reassess the surroundings. It did this by utilizing an onboard computer to make the necessary calculations. This computer could be compared to today’s microcontrollers. (Moravec). The first real rugged autonomous vehicle was The Terregater, which was created in 1984. This was designed primarily for road mapping and mine exploration. This is the first instance where an autonomous robot had a specific function. (RobotWorx). The idea of an autonomous tracking robot is relatively new technology. Robots have been around for decades, but having one that can essentially think on its own has not been explored until recent developments in microcontroller technology. Recent developments in Wi-Fi and Bluetooth technologies have also allowed for exploration into wireless control, and wireless data transfer. Due to these factors, interest in this field is beginning to explode, especially because of a recent mandate set forth by the US military. "The U.S. Congress has mandated that by the year 2015, one-third of ground combat vehicles will be unmanned, and the DOD is now developing a multitude of unmanned systems that it intends to rapidly field." (Weiss). Additional importance is being placed on the space rovers used by NASA. These new rovers, especially the ones currently on Mars, must have an autonomous capability to help adapt to the terrain. Design Specifications/Customer Requirements The desire for this project is to create an autonomously controlled target tracking robot that is able to follow the movements of a marked target. We specified the object to be tracked as a bright yellow tennis ball. The ECE Department clearly listed many additional design requirements, as well as what components were necessary to use. No components were provided to the team from the sponsor, so research had to be done on every part. The robot must be designed to operate in a normal indoor environment, at room temperature. The robot is allowed to be manually guided to the target area, 3 although it must be wireless controlled. Once the robot is within four feet of the target, it must be capable of having 360 degrees of rotation to autonomously find the object using a wireless camera. This range of motion must be done by the robot having a zero turn radius. Once the target is acquired, the robot must move to a maximum distance of three feet from the object, and remain within that range for the duration of the time. Run time must elapse at least one hour, at a speed of five miles per hour. Additionally, sensors must be implemented to prevent collision of the robot and the target, and other surrounding objects. A microcontroller must be used to wirelessly communicate and relay information back to a base computer, as well as provide complete control over the speed and motion of the robot. This information must be saved automatically into a database. A manual shut off switch must be hard wired into the robot to cut off power to all components for safety. Additional features may be added as the design progresses that improve upon the requirements. The final delivery date for this design is April 26, 2013. The FAST Diagram is shown below. This demonstrates the path that was taken when determining what problems needed to be addressed, and how possible solutions would be implemented. Figure 1: Fast Diagram 4 5 Design Specification Primary Secondary Autonomously identify and follow marked target using camera Remotely controllable to and from the target area Autonomous mode to search 360 degrees for a predefined target Close to within three feet of target without collision Follow target movements Self-powered for one hour Five mph speed Zero degree turning radius An electrical package including significant computing power, power supply, & motor control Two-way communication Structurally sound chassis Manual shutdown Manual Controller Webcam with OpenCV UltraSonic Sensor Battery 9 Tamiya Gearbox Tank Design 3 9 1 1 9 9 1 3 3 9 1 9 3 3 1 1 Importance 3 9 4 5 3 3 3 3 4 1 9 3 3 3 3 Bluetooth 3 9 9 Arduino 9 3 3 1 Table 1: Design Specifications and Solutions 9 3 3 3 5 3 4 9 3 5 9 9 4 9 3 4 Conceptual Designs Appearance/Maneuverability Initial design ideas included using a four-wheel, independent axle RC car, a tank design with treads, and an alternative flying quad-copter. The four-wheel independent axle design would allow for each side of wheels to run off of one motor thus requiring two motors total. This would meet the zero degree turn radius requirement. It would also have capabilities of speed that the other options might not. The tank design is a simple implementation of the four-wheel RC car, but requires less effort to achieve the zero degree turn radius. The treads may reduce overall speed, although the team still believes that the goal speed can be met. It would also allow for rougher terrain travel. Finally, the quad-copter could give the best maneuverability at a higher cost. However, it has a shorter use time and is much more complicated not only for successful flight, but also for 3D navigation. Communication/Control Concepts for controlling the robot include using a standard Bluetooth joystick controller, a smart phone, or using controls on a laptop via Labview. The team decided to use a joystick controller in conjunction with Labview to provide the interface between the robot and user. PlayStation 3 controllers have built in Bluetooth technology, which is a good option for wireless communication for the project. A smart phone app for control is also an attractive idea that would build on recent wireless technology. The team believes that a possible future solution would be to use smart phone technology for complete robot control. Wi-Fi is another option for wireless communication, as has a much further range, and is especially efficient when transferring video data. Tracking The customer required use of a webcam for tracking purposes and the team has found many open source libraries that support video processing to make target tracking possible by using a camera. There were many range sensors considered to determine distance from the tracked object and surroundings to avoid collision. Some options included radar, sonar, and ultra-sonic range finders. Sonar is not a good option for use in air medium. Radar has several negative aspects associated with it, including delays and interference. The Doppler Effect would also require special considerations based on the speed and direction of our moving robot. Ultra-sonic range finders give good accuracy and resolution, but require multiple on each side to be useful for object avoidance because of their small detection angle. Building a Body In deciding the frame and look of the robot, some options included buying a premade vehicle, building one from the ground up, or doing a combination of both. Buying a premade body seems like a cheaper option, but limits the size and design type. Building one from the ground up would give more freedom in design, but appears to be more costly. It also requires a lot more planning and building just for the body, which exceeds the knowledge and expertise of the team. Doing a combination of both would limit some design aspects, but still give some freedom in the overall style of the body. Buying a frame with wheels and motors would ensure that parts run smoothly together, but would allow for custom design of the outer shell. 6 Look/Style Maneuverability Relative Out of 5 Weight Relative Out of 5 -0.15 Appearance/ Maneuverability Control Communication Tracking Weight Cost Relative Out of 5 -35 Weight Relative Out of 5 -20 Weight Total Score -30 4 Wheel RC Car 2 0.3 3 1.05 4 0.8 3 0.9 3.05 Tank 3 0.45 3 1.05 4 0.8 3 0.9 3.2 Quad-copter 5 0.75 5 1.75 1 0.2 1 0.3 3 Smart Phone 3 0.45 2 0.7 2 0.4 1 0.3 1.85 Videogame Controller 3 0.45 3 1.05 4 0.8 4 1.2 3.5 Bluetooth - - - - 4 0.8 4 1.2 2 Wi-Fi - - - - 2 0.4 2 0.6 1 Radar - - - - 1 0.2 4 1.2 1.4 Webcam Ultra-Sonic Range Finder Buying Pre-made - - - - 3 0.6 4 1.2 1.8 - - - - 3 0.6 5 1.5 2.1 2 0.3 - - 5 1 3 0.9 2.2 5 0.75 - - 1 0.2 2 0.6 1.55 4 0.6 - - 3 0.6 4 1.2 2.4 Building from the Body Ease of Use Ground up Mix of Buying and Building Table 2: Decision Matrix 7 The decision matrix shown below in Table 2 shows the thought process that helped determine the best conceptual design to meet all of the requirements. When comparing the four-wheel remote control car, the tank, and quad-copter designs, it was found that the tank had the best overall score, which indicates it may be the best solution to the design problem. The same technique was used for choosing the best control mechanism, form of communication, tracking technology, and body style. Design Solution Software Design The software will be designed to let the user view the real time stream video from the camera and control the tracking function of the robot. The user will be able to select the target to track and get update of the data such as robot speed from the robot. The software will be written in C++ with the Open Source Computer Vision (OpenCV) Library to process the streaming video. Upon successfully acquiring the target, the software will monitor the motion and position of the target object using the built-in algorithms in the OpenCV library. It will continually send corresponding commands to the microcontroller to complete the tracking motion of the robot. The team is planning develop the software on Mac and Windows platforms so that the final software fill support both operation systems. An overview of all of these processes is shown in Figure 2. Figure 2: Software Design Hardware Design The robot will be mounted on a Tamiya Tank Kit, which consists of the double gearbox, aTamiya track and wheel set, and a universal plate. The Tamiya Tank Kit provides a stable, maneuverable, and easily customizable base. The tank style chassis provides a zero turn radius and the ability to navigate through a crowded area. The robot needs to be able to track and follow the target in a normal indoor environment. This can include obstacles that the robot must avoid. In order to avoid these obstacles, the robot has four Devantech Ultrasonic Range Finders. The range finders can detect distances at a range of one centimeter to four meters. With the distance between the robot and the obstacles known, an algorithm will be written that will navigate the robot around the obstacles. 8 The Sharp Infrared Sensors will be attached to the wheels of the robot. The purpose for this device is to sense the number and duration of wheel rotations. This information will then be used in an algorithm to calculate speed of the vehicle. The webcam will be attached above the base of the tank for target tracking purposes. The webcam will stream to the laptop through Wi-Fi so a visual picture of the robot’s surroundings can be seen. Wi-Fi communication was chosen for the camera due to its higher bandwidth capabilities (up to 5GHz), and its 36m range capabilities. The camera will also follow the tracking algorithm to target the desired object and store in memory. The communication between human and robot movement will be implemented with a Bluetooth joystick controller. The joystick will communicate directly to the microcontroller using the Bluetooth technology. The controller has a bandwidth range of 2400-2480MGHz. The remote is a class 2, with a range of 10 meters, which is a range that is easily controllable by the user. Additionally the PC laptop can be used to command the robot. The Arduino Uno is a microprocessor with 14 digital input/outputs and 6 analog inputs. It has a 16MHz ceramic resonator included with a USB connection, power jack, ICSP header, and reset button. The size is 2.7” x 2.1” which is small enough for the vehicle to carry. The Arduino Uno is also WiFi/Bluetooth compatible which will be implemented in the webcam and Bluetooth remote. The microcontroller will take the distance indicated by the ultrasonic range finders and send the data back to the PC laptop. The tracking algorithm can take the next steps in order to follow the object within the specified range. The process will also help prevent collision with other objects in the robot’s surroundings. All of the information sent through the Arduino back to the PC will be stored in a database. Commands from the PC or Bluetooth controller will allow the Arduino Uno to deliver the users specified action to the robot. (“Arduino”). The final hardware design is shown below in Figure 3. Figure 3: Hardware Design 9 Risk Analysis The potential risks involved with the design can be put into three main categories: mobility difficulties, tracking issues, and battery complications. Mobility Difficulties Robot drives off ledge: This could be caused by the robot attempting to follow the target over a ledge such as a step. A fall of 50 centimeters or more could significantly damage the robot. Despite the potential damage, the degree of risk is low since the project calls for a normal indoor environment. Robot cannot turn: This could happen if the robot gets “sandwiched” between two obstacles and is unable to rotate. The robot has range finders to detect potential obstacles and programming to avoid and escape these situations. Because of this, the degree of risk is low. Robot travels out of range of communication: Under perfect conditions, the Bluetooth Module can communicate with a receiver up to 10 meters away. However, the robot will not always be operating in perfect conditions, and could lose communication with the computer at a much shorter distance. This makes the degree of risk medium. Tracking Issues Robot loses target: It is possible that the robot will lose track of the target. While occurrences of this can be reduced with improved programming, it likely cannot be entirely eliminated. Because of this, the degree of risk is high. Robot tracks wrong target: This could be caused by the introduction of an object that is visually similar to the target object. For example, if a tennis ball is selected for the robot to track, and a second tennis ball is introduced, this could cause the robot to track the wrong target. This can likely never be entirely eliminated by improved programming and is assigned a degree of risk of high. Battery Complications Combustion of battery: When overcharged, lithium ion batteries can overheat and even catch on fire. To make sure this doesn’t happen, we will use a charger that shuts off before the battery is overcharged. Although potentially catastrophic, the degree of risk is low. Battery runs out of power: It is possible that the battery does not contain enough energy to run the robot for a one hour period. If this is the case, we could easily add a second battery, making the degree of risk low. 10 2. Project Management Personnel Plan For this project, each team member had a technical role, as well as a non-technical position. These are listed below in Table 3. Below that table is a breakdown of the design process into four phases from start to finish, with descriptions of each section. Team Member Technical Contribution Non-Technical Contribution Victor Abreu Testing Engineer Manager Matthew Beutler Mechanical Design Engineer Presentation Prep Brent Eisenmann Sensor/Motor Technician Document Prep Hisham Hassan Networking Administrator Presentation prep Thomas Schriefer Data Analyzer Lab Coordinator Peng Xie Program Developer Webmaster Table 3: Member Functions Schedule Phase 1 Research existing technology and similar products. Find out information and specifications for possible parts to ensure they meet the design requirements. Develop conceptual design solutions. Phase 2 Choose final design solution. Finalize part list and order all items. Create management plan and timeline. Phase 3 Build initial design and begin programming microcontroller. Test design, and troubleshoot any coding errors. Phase 4 Review test results. Make any design modifications as necessary. Finalize prototype 11 A timeline was created to mark all important due dates, along with goal dates to have certain tasks accomplished. These dates and events are all shown in Table 4. In Figure 2, the project planning Gantt chart is shown. This is a detailed timeline to track the progress of the project, with each of the individual roles indicated. The critical path is highlighted as the red boxes and lines shown to emphasize the most crucial components of the design. Table 4: Tasks with Start and Completion Dates Figure 2: Gantt chart 12 Measurement of Success In the end, this project will be evaluated by how well we met the design requirements. The customer has a specific need that they have, and the design team will do everything we can to fill that need with our design. At the bare minimum we need to have completed all of the tasks that were discussed in the previous section when we determined our design, and parts list. The hope is to build on the requirements and also improve the design with improvements of our own. Additionally, certain concepts may be learned during the building of this robot that could hopefully be mentioned at the end as possible improvements. This will be a working prototype, but additional improvements could undoubtedly be made once the project is submitted. 3. Cost Budget The budget allotted for this design project is set at $500. The goal is to find reliable components to build a robot yet still maintaining a relatively low cost. Table 5 below displays the current cost analysis for the parts to be used for the final design. Additional parts may be ordered as needed, but the current cost leaves a lot of room for additional purchases, while still staying under the desired budget. Budget Part Cost Robot Body Tamiya Double Gearbox Tamiya Track and Wheel Set Tamiya Universal Plate $14.48 $7.84 $5.33 Data Acquisition Wireless Wi-Fi Enabled Webcam 4x Ultrasonic Range Finder $58.00 $118.00 Microprocessor and Electronics Arduino Uno Board Motorshield for Arduino Sharp Infrared Sensor DFRobot Serial Bluetooth Module Li-Ion 18650 Battery + Charger Total $20.95 $24.99 $14.95 $21.90 $69.90 $328.69 Table 5: Budget Analysis 13 The body of the robot is made up of three parts: the double gearbox, the track and wheel set, and the universal plate all produced by Tamiya. Together, these provide the base onto which everything is mounted. The Tamiya kit was chosen for the tank style treads that allow the robot to have a zero turn radius, it’s low cost, and because it is easy to modify. To acquire data for the microprocessor, the robot uses a webcam and four range finders. For the webcam, we chose the D-Link DCS-930L mydlink-Enabled Wireless-N Network Camera. We chose this webcam because of its low cost and its ability to transmit video wirelessly from the robot to the computer. For the range finders, we chose four Devantech SRF05 Ultrasonic Range Finders. These were chosen for their low price and their ability to detect ranges in the range of one centimeter to four meters. These range finders are needed both to calculate the distance from the robot to the target and to find objects near the robot which must be avoided. To process this data and control the robot, we chose the Arduino Uno R2 Board and the Motorshield for Arduino. We chose the Arduino Uno for its ease of use, low cost, and compatibility with the open source program OpenCV. The Motorshield is compatible with the Arduino Uno and is used to drive the two DC motors of the Tamiya double gearbox. The DFRobot Serial Bluetooth Module is used to communicate between the computer and the Arduino Uno. The Bluetooth Module was chosen for its compatibility with the both the computer and the Arduino Uno and for its transmission distance of up to thirty meters. To power the robot and the onboard electronics, we chose the Li-Ion 18650 Battery: 11.1V 2.4Ah Battery Module. We chose this battery because of its voltage, energy, and its ability to be recharged without affecting the memory. The components of the robot and the voltage that they require can be seen in the table below. The 11.1 voltage of the battery is within the required range to power the Arduino Uno and the Motorshield, and the Arduino Uno has a 5 Volt output pin to power the webcam and the range finders. Component Webcam Arduino Uno Motorshield Ultrasonic Range finders Required Voltage 5V 7 to 12 V 5 to 12 V 5V Table 6: Voltage Requirements 14 4. References "Arduino Uno." Arduino. Arduino, n.d. Web. 20 Feb 2013. <http://arduino.cc/en/Main/arduinoBoardUno>. "Robot Timeline - Robotic History." RobotWorx. RobotWorx, n.d. Web. 18 Feb 2013. <http://www.usedrobots.com/robot-education.php?page=robot timeline>. Bellis , Mary. "Timeline of Robots." About.com. About.com, n.d. Web. 18 Feb 2013.<http://inventors.about.com/od/roboticsrobots/a/RoboTimeline.htm>. Moravec, Hans. "The Stanford Cart and The CMU Rover." . Carnegie-Mellon University, n.d. Web. 18 Feb 2013. <http://www.frc.ri.cmu.edu/~hpm/project.archive/robot.papers/1983/ieee83.mss>. Weiss, Lora. "Autonomous Robots in the Fog of War." ieee Spectrum. (2011): n. page. Web. 13 Feb. 2013. <http://spectrum.ieee.org/robotics/military- robots/autonomous-robots-in-the-fog-of- war/1>. 15