group 19 autonomous chasing robot (acr)first thing, we need to build a robot (car) that can follow...

131
Group 19 Autonomous Chasing Robot (ACR) Senior Design 1 Project Documentation Autonomous following robot. Authors: Bryan Diaz Victor Hernandez Salomon Khanh Le Luis Sosa 5/1/2015

Upload: others

Post on 01-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

Group 19

Autonomous Chasing Robot (ACR) Senior Design 1 Project Documentation

Autonomous following robot.

Authors: Bryan Diaz

Victor Hernandez Salomon Khanh Le Luis Sosa

5/1/2015

Page 2: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

Contents

Group 19 ............................................................................................................................ 1

Autonomous Chasing Robot (ACR) Senior Design 1 Project Documentation ...... 1

1 Executive Summary ..................................................................................................... 1

2 Project Description ....................................................................................................... 2

2.1 Project Motivation ................................................................................................. 2

2.2 Objectives and Goals ............................................................................................. 2

2.3 Project Requirements and Specifications .............................................................. 3

2.3.1 Minimum Requirements ................................................................................. 3

2.3.2 Specifications .................................................................................................. 4

2.4 Block Diagram ....................................................................................................... 5

3 Research Related to Project Definition ........................................................................ 5

3.1 Existing Similar Projects and Products ................................................................. 5

3.1.1 Project 1 - The Autonomous Visual Rover (AVR) ......................................... 6

3.1.2 Project 3 - Reconnaissance and Demolition Super Attack Tank (RADSAT) 8

3.1.3 Project 3 - ANPR Camera Project ................................................................ 10

3.1.4 Project 4 - Raspberry Pi License Plate Recognition ..................................... 11

3.2 Following Mechanism ......................................................................................... 12

3.2.1 Active Following .......................................................................................... 13

3.2.2 Passive Following ......................................................................................... 13

3.2.3 Path Following .............................................................................................. 14

3.3 Camera Research ................................................................................................. 15

3.3.1 IP Camera...................................................................................................... 16

3.3.2 Wireless 2.4 GHz Camera............................................................................. 16

3.3.3 Bluetooth® Camera ...................................................................................... 17

3.3.4 Wi-Fi Camera ................................................................................................ 17

3.3.5 Custom CMOS Camera Board ..................................................................... 17

3.3.6 Conclusion .................................................................................................... 19

3.4 Power Research ................................................................................................... 19

3.4.1 Battery Types ................................................................................................ 21

3.4.2 Charging ........................................................................................................ 27

3.4.3 Safety: ........................................................................................................... 28

3.4.4 Voltage regulators ......................................................................................... 29

3.4.5 Zener Diode Regulator: ................................................................................. 32

3.4.6 Voltage regulator Conclusion: ...................................................................... 33

3.5 Inertial Measurement Unit (IMU) Research ........................................................ 33

3.6 Wireless Technology Research ........................................................................... 34

3.6.1 Wi-Fi: ............................................................................................................ 34

3.6.2 Bluetooth: ...................................................................................................... 35

3.6.3 ZigBee: .......................................................................................................... 38

3.6.4 Infrared (IR) .................................................................................................. 38

3.6.5 Wireless USB (WUSB) ................................................................................. 39

3.6.6 Wireless technology Conclusion................................................................... 40

Page 3: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

4 Project Hardware and Software Design Details ......................................................... 41

4.1 Video Processing ................................................................................................. 41

4.1.1 Computer Vision (CV) .................................................................................. 41

4.1.2 Image Processing .......................................................................................... 41

4.1.3 Optical Character Recognition (OCR) .......................................................... 42

4.1.4 License Plate Recognition (LPR) .................................................................. 43

4.2 Sensors ................................................................................................................. 47

4.2.1 Infrared Sensor: ............................................................................................. 47

4.2.2 Ultrasonic sensor ........................................................................................... 48

4.2.3 Comparison between IR and Ultrasonic sensor ............................................ 48

4.2.4 Ultrasonic ranging module HC - SR04 ......................................................... 49

4.2.5 Ultrasonic Range Finder - LV-MaxSonar-EZ1 ............................................ 50

4.2.6 Conclusion of sensor model .......................................................................... 51

4.3 RC Car Drive ....................................................................................................... 52

4.3.1 Steering Drive ............................................................................................... 52

4.3.2 Tank Drive .................................................................................................... 54

4.3.3 DC Brushed Motor ........................................................................................ 56

4.3.4 Brushless DC motor ...................................................................................... 58

4.3.5 Comparison ................................................................................................... 60

4.3.6 Final Conclusion ........................................................................................... 62

4.4 Microcontrollers .................................................................................................. 62

4.4.1 ARM Cortex-M4 ........................................................................................... 63

4.4.2 ARM Cortex-M4 Features Summary ............................................................ 63

4.4.3 ARM Cortex-M7 ........................................................................................... 64

4.4.4 ARM Cortex-M7 Features Summary ............................................................ 64

4.4.5 Atxmega384C3 ............................................................................................. 66

4.4.6 Atxmega384C3 Features Summary .............................................................. 71

4.4.7 Atxmega32A4U ............................................................................................ 72

4.4.8 Atxmega32A4U Features summary .............................................................. 73

4.4.9 Arduino Due.................................................................................................. 74

4.4.10 Arduino Due Features Summary ............................................................... 75

4.4.11 BeagleBone Black ..................................................................................... 76

4.4.12 BeagleBoard Black Features Summary ..................................................... 79

4.4.13 Raspberry Pi Model B+ ............................................................................. 79

4.4.14 Raspberry Pi B+ Features Summary ......................................................... 80

4.4.15 UDOO ........................................................................................................ 81

4.4.16 UDOO Features Summary......................................................................... 81

4.4.17 Conclusion ................................................................................................. 82

4.5 Programming ....................................................................................................... 82

4.5.1 Programming Language Conclusion ............................................................. 83

4.5.2 Microcontroller Programming ...................................................................... 84

4.5.3 Tablet Programming ..................................................................................... 85

4.6 Tablet User Interface ........................................................................................... 87

4.7 Power Hardware Design ...................................................................................... 91

4.7.1 Battery Selected ............................................................................................ 93

4.7.2 Charger Selection: ......................................................................................... 94

Page 4: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

4.7.3 Voltage Regulator: ........................................................................................ 95

4.8 Wireless Technology Design ............................................................................... 97

4.8.1 CC3100 SimpleLink Wi-Fi module: ............................................................. 98

4.8.2 XBee Wi-Fi Module with Wire Antenna: ..................................................... 98

4.8.3 Edimax EW-7811UN Wi-Fi USB: ............................................................... 99

4.8.4 Conclusion .................................................................................................... 99

4.9 Inertial Measurement Unit (IMU) Design ......................................................... 100

4.10 Car Mechanical Dimensions .......................................................................... 101

5 PCB Vendor and Assembly...................................................................................... 103

6 Project Prototype Testing ......................................................................................... 104

6.1 Hardware Test Environment .............................................................................. 104

6.2 Hardware Specific Testing ................................................................................ 104

6.2.1 Ultra Sonic Sensors ..................................................................................... 104

6.2.2 Power Testing ............................................................................................. 107

6.2.3 DC Voltage Regulator................................................................................. 110

6.2.4 Servo testing................................................................................................ 110

6.2.5 Motor testing ............................................................................................... 111

6.2.6 Steering Angle Testing ............................................................................... 112

6.3 Software Test Environment ............................................................................... 112

6.4 Software Specific Testing .................................................................................. 112

7 Administrative Content ............................................................................................ 113

7.1 Format of Meeting Notes ................................................................................... 113

7.2 Relevant/Important Meetings ............................................................................ 114

7.3 Milestone Discussion ......................................................................................... 117

7.4 Budget and Finance Discussion ......................................................................... 119

8 Appendices ............................................................................................................... 121

8.1 Appendix A - Copyright Permissions ................................................................ 121

8.2 Appendix B – Datasheets .................................................................................. 127

8.3 Appendix C- Sources ......................................................................................... 127

Page 5: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

1

1 Executive Summary

We are a group of four engineering student in senior year of University of Central Florida, assigned to build a project for senior design class. Project can be in any area of electrical and computer engineering but is subject to the instructor's approval. We are looking for the idea in Robotic design because this topic has really huge resource for references. A big number of Robotic project was already done by the senior students in all engineering school over the United States. However, there are four members in the group. This idea has to be fit in each member’s interest and can be broken down into multiple sections. We don’t want any idea too simple and it does not provide enough work for four people. Although this project is not required to be useful, we want to build something not only look interesting but also can be used in the real world. Technology is created for the human life, so the useful project will inspire us to do the best to fulfill project with innovation and passion. Money is also a one factor which is need to be considered seriously. As we discussed above, we want to build something interesting and useful with modern technology, so it will cost us a certain amount of money. Besides trying to minimize the expensive, we are looking for the external sponsor to extend our project budget. It is really necessary because we are able to focus on optimize our design by the innovation idea without worrying about limitation of cost. Currently, Boeing Company agreed to sponsor us $1000 to complete this project.

Page 6: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

2

2 Project Description

This section describes different aspects of the project, including but not limited to the motivation statement, goals and specifications of the Autonomous Chasing Robot (ACR)

2.1 Project Motivation

Nowadays, technology is developed faster and faster by humans. We are applying it into everywhere of the modern life. These innovations can do some amazing things, which we never think we can do before. Especially, while a criminal issue are escalading seriously and become more harmful, using technology to help maintaining our environment safety is more necessary. Thus, there is a lot of applications developed to help Police Officers identify and capture crime. One of the important thing is that Police officers have to be able monitor a wide area and quickly responds to any situation. They need some equipment to recognize “blacklist” target and then make a next action right away. Our group is thinking about a device which is useful assistant for this purpose. A robot (may be controlled manually or automatically) will go around in the specific area and look at the license plate of all vehicle on street. If it see some specific license plates in “Blacklist” of Police Department, it will send out message to Officer nearby about all the “Blacklist” items which it see. Officer will tell robot (through tablet) which item is need to be captured. After locking the target, robot will turn on the alarm, use the flashlight pointing to it and begin to follow. This device not only helps Police doing their job but also warns civilian around about criminal vehicle and then get away as soon as possible. With this device, each Officer put a whole part of residential area under his surveillance by controlling a number of robots. Moreover, when the target is detected, Officer does not worry about losing target and is able to make the next action. It is really a helpful assistant for Police officer to improve the security of our environment, which is endangered by crime

2.2 Objectives and Goals

First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is the main part of whole project. We want our robot able to follow any moving object. Robot will detect the motion of target and quickly get close to it. Another important point is that the robot will follow exactly same path of the target, instead of pointing directly to target. It makes our project different from the previous ones. With this function, Robot is able to not only keep track the target but also avoid hitting obstacle standing on the way. In order to do that, the combination of image processing and sensor is implemented for this purpose.

Page 7: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

3

Besides that, the system implemented can control the acceleration and deceleration of Robot basing on the distance between them. It means that when Robot detects target, there is no chance for target to escape. The second thing is that we will built android app for tablet to control the robot. Police officer will use tablet to interface with Robot when it see any “blacklist” item in their path. In our project, “blacklist” consists of a list of license plate number. Therefore, image-processing will be also used for recognizing the license plate. Now, we are talking about building a real model of this robot. For our level and our presentation, we will make it as small and lightweight as possible. Besides that, it has to be able to operate continuously at least an hour with fully charged battery. There are a lot of components consuming power in this design, so we need to find the way how to use the power effectively. Also, the cost is limited below $1000. They are all things we need to concern in our project.

2.3 Project Requirements and Specifications

The Following is a discussion of the Project’s Requirements and Specifications. Having a clear vision of all the requirements needed for the ACR car is very important because it will dictate the direction in which the research is going to be based on.

2.3.1 Minimum Requirements

As we discussed above, the robot has to possess some unique functions of the following. We have to make sure it can do some things such as recognize the target and follow it. They are a fundamental operation of any following project. The bottom line of project is set first to achieve and then we will add more optional feature for ACR later if possible. In conclusion, ACR need to satisfy the minimum requirement below:

Able to detect and follow any target at high speeds. Able to control acceleration and deceleration to quickly capture target. Able to recognize “blacklist” items. Able to connect with tablet through internet Able to operate continuously at least one hour with fully charged battery Robot has wireless video stream to tablet.

After finishing all these functions above, if we have time, more optional features will be added:

User able to choose the target in case more than one target detected

Able to turn on alarm and flash light

Able to control robot manually by tablet

Able to use voice control system

Page 8: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

4

Increase operation time

The requirements for the tablet, which contains the user interface, will be the ones listed below:

Tablet App Objectives: o Will contain a License Plate Database

Black/Whitelist, Add, Remove, Alert, display location o Will Alert (send SMS to "Police Dispatcher", could be text or e-

mail) o Receive Video Stream o Receive misc. data (license plate number, etc.) o Remote Control Follower o In screen target selecting o Display location of target on screen (using square to enclose)

Ingress:

o Video Stream o Misc. Data:

License Plate: Number(s) and Location(s) Robot Battery Level (optional) Once Trigger occurs: Location of locked Target

Egress: o Manual Instructions:

Select Target (Trigger Following). Remote Control. Siren, police lights and headlight.

2.3.2 Specifications

In this section in general, we will discuss about details of each hardware component in each section later. During them, we consider the specification of each one we pick to use in this project. Thus, in this section, we list some features of the ACR in general. In other words, we can say these feature give us a quick look about what ACR looks like, not specific details of hardware component.

Size of ACR: Height 6 inches, Length 18 inches, Width 12 inches

Weight: 3-4Kg

Voltage Operation: 7V

Maximum tracking target distance: 5m

Minimum tracing target distance: 10cm

Maximum speed: up to 20 km/h

Maximum following speed: up to 15 km/h

Page 9: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

5

2.4 Block Diagram

The following block diagram describes our system as well as the data flow in between the Tablet and our autonomous vehicle.

Figure 1 – High Level Block diagram for system

This block diagram was developed by starting with the block diagram presented in an initial document, however some changes were made, by making it more specific to the project which we are working on.

3 Research Related to Project Definition

The Following is a discussion of the research related to the project’s definition. Learning from the previous projects of groups that have done similar project as ours, will allow us to learn from their mistake and rise above.

3.1 Existing Similar Projects and Products

Page 10: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

6

Before stepping into building our own project, we need to know if there is any previous project implemented for the same idea. This is really important because we can use them as references and avoid to repeat exactly what was already done. In other words, we try to make our project more advance compared to the previous one. In senior design project system of University of Central Florida, there are two projects about the following robot, but they are not exactly same idea with us. Let take a look at them to see if we can learn anything from what they already achieved.

3.1.1 Project 1 - The Autonomous Visual Rover (AVR)

The AVR was senior design project developed in the University of Central Florida in 2009, which was a robot capable of following a target of a given color.

3.1.1.1 Project’s idea

The first project is called “The AVR”. The AVR is a light weight, quick and efficient rover equipped with obstacle avoidance, and image processing capabilities to track a given target. The base of the AVR came from the body of a dissected remote control car which we purchased off the internet. The CMUcam2+ vision sensor is mounted on two servos and connected to our custom designed printed circuit board, which also interfaces with the power supply and drive train system. In figure 1_A you can observe a capture made with the CMUcam2+

Figure 1_A - Capture made with the CMUcam2+

Page 11: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

7

The AVR is able to follow and track an object based upon the CMUcam2+ image processing abilities. It keeps a programmable distance of 10 inches from the object it is tailing and will also detects when the object turns or stops; it then adjusts accordingly to each action. Therefore, the AVR never actually comes in contact with the object it is tracking. The optimum operating environment for the AVR is a dry, well lit area indoors or outdoors. The design of the AVR is very flexible allowing for future upgrades such as solar power, GPS navigation, and Wi-Fi capabilities. This project is available on the department website.

[http://www.eecs.ucf.edu/seniordesign/su2009fa2009/g02/]

3.1.1.2 Relevant Technology Used

Passive following is the type of following mechanism using in this project. There is no communication between Robot and target. Students use image-processing for tracking the target so that Robot can locate where the target is. Technically, the AVR only recognize the color. For operation, user will choose the target color for following and Robot will follow the object with this specific colors. Besides that, Image-processing is used for recognizing target relative to center of screen. In other words, the Robot will make a turn until the target get back to the center box. This is one way to make the robot always pointing to the target. With this technology, Robot will point to the target at any time and change direction whatever the target disappears in front. The distance sensors were also used for maintaining the certain distance between Robot and targets. This advantage of this method is really easy for keeping track and quickly respond to any behavior of target. However, they did not build the avoiding obstacle function for the AVR. Because of always pointing to target, they will hit any particle around if they make a turn. They only look for target and did not care about what is in surround environment. Also, with this type of tracking system, if something suddenly get in between target and Robot, we will lose the target because it will not see the target color any more. Besides that, if another object has same color appear in front of Robot, everything will mess up.

3.1.1.3 What we learn from this project The following are several important points of information that has been learned from the project.

One method to implement the following

Using image-processing for tracking target

Components using for image-processing

Components using for controlling speed and direction of Robot

Page 12: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

8

3.1.1.4 What we can improve The following are some of the most important points learned from the project that the group can improve upon.

Provide the avoiding obstacle function

Provide instruction for Robot if anything block the way to look at target

Upgrade Robot for recognizing any object, not only the color.

Dealing with the case more than two same object appear at one time

3.1.2 Project 3 - Reconnaissance and Demolition Super Attack Tank (RADSAT)

The AVR was senior design project developed in the University of Central Florida, which was a robot capable of following a target of a given color and shape.

3.1.2.1 Project’s Idea

The second project related to our project idea is called “RADSAT”. It is designed to search for a specified target based on its color and shape. The autonomous movement of the tank and its turret is controlled by two separate microcontrollers. While not in autonomous mode, RADSAT can also be remotely controlled by a user via a laptop and GUI over a network. A live video stream from the tank can also be viewed on this GUI, which can be seen in Figure 1_B below

Figure 1_B GUI from RADSAT

Page 13: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

9

Once a target has been determined and locked on, the user has the option of firing off a tank "round" at the target. RADSAT is a system comprised of a multitude of different components and subsystems utilizing technologies ranging from the newest mobile devices to RC tanks fitted with sensors and embedded microcontrollers. This project was available on the department website. http://www.eecs.ucf.edu/seniordesign/sp2012su2012/g07/index.html

3.1.2.2 Relevant Technology

This project also use the passive following mechanism for their system. There is no communication between the RADSAT and the target. The system will look for target and autonomously respond to target’s behavior. In this case, turret will keep pointing to object locked on. One advantage of this project is the image-processing system can recognize not only the color but also the shape of target. This allows RADSAT be able to determine and lock on target. Therefore, if there is another object presenting with target at same time, system still keep tracking where the target is. It is really big advantage compared to the first project we mention above. However, the idea of tracking target is using image-processing to maintain the object inside the central box of screen. For example, if target move to the left of center, turret or camera will turn to the left so that the target still appear in central box. This is mechanism for this project following system. Of course, with recognizing the shape, it requires more complexity in image-processing system. Moreover, this RADSAT has some other interesting features. It provides the video streaming so that user can remote control the tank through tablet. There are two control mode options available. We can choose to control manually or let the system run autonomously, which requires the implementation of the wireless connection.

3.1.2.3 What we learn from this project

The following are several important points of information that has been learned from the project.

How to keep the system pointing to the target

Using image-processing to recognize the color and the shape

How to create the video streaming

How to make wireless connection and control robot manually through tablet by using Wi-Fi module

Page 14: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

10

3.1.2.4 What we can improve

The following are some of the most important points learned from the project that the group can improve upon.

Improving the performance of real time video streaming

System is able to distinguish the target and another identical object, which allows us to lock on the target.

High-speed running for Robot

3.1.3 Project 3 - ANPR Camera Project

The “ANPR camera” is a cost effective and versatile Automated License Plate Recognition camera built using the Raspberry Pi, it can be used during the daylight and at night using an infrared bypass filter. It has the functionality to interact with the cameras settings remotely and also view the stream and to see the settings real time. With the vehicles are traveling at approximately 35-50mph an off-bard the laptop works on the Optical Character Recognition (OCR). The laptop is connected to the wireless signal produced from the camera having streaming almost real-time with instant recognition using the Visec ANPR Engine.

The results are displayed in a tablet, as seen in Figure # below, which shows the example of a car going at approximately 35 mph, detecting the plate, taking a picture and displaying to the user a warning.

Figure 2 - GUI in tablet for Project 3

“pending permission from Jamie Johnson”

Page 15: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

11

3.1.3.1 Relevant Technologies Used

This camera uses the Raspberry Pi to deal with the video processing as well as using the custom made CMOS camera available for it, it also uses a Wi-Fi USB dongle for the wireless Wi-Fi connectivity and uses the Visec ANPR Engine for license plate recognition, software which might not be readily available.

3.1.3.2 What we learned from this project

The following are several important points of information that has been learned from the project.

A micro-computer such as Raspberry Pi can be easily interfaced with Wi-Fi

Additional hardware might be required if we want to add nighttime functionality

Off-Board computer performs the OCR.

3.1.3.3 What we can improve

The following is the most important points learned from the project that the group can improve upon.

We can use the on-board microcomputer to perform the OCR, providing an all-in-one solution

3.1.4 Project 4 - Raspberry Pi License Plate Recognition

The “Raspberry Pi License Plate Recognition” project uses a Rasberry Pi, and a web camera for standalone license plate recognition, this project is only been documented to have been tested in stationary conditions, that is to say, both the camera and the license plate were stationary at the time, this project uses OpenALPR, an open source Automatic License Plate Recognition library written in C++ which analyzes images and identifies license plates. Using a Python script it shows the output, which is the text representation of any license plate characters found in the image.

3.1.4.1 Relevant Technologies Used

As in the case of the of Project 3, this project uses a Rasberry Pi, in this case however, the micro-computer does the processing which does not seem to happen in real time but rather takes in between 10 and 13 seconds to do so, the author does not mention which version of this micro-computer has been used or whether it has been over clocked or not.

Page 16: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

12

Figure 2_A - License Plate Recognition using Raspberry Pi and USB Camera

3.1.4.2 What we learned from this project

From this project we learned the following things:

License Plate Recognition can be done only with the Raspberry Pi in an Embedded Linux environment

Processing with a single micro-computer takes over 10 seconds

A USB Camera is a fictile option as seen above in figure 2_A

3.1.4.3 What we can improve

Some of the things we believe we could improve on are listed as follows:

We can improve the processing time by overclocking the micro-computer.

Alternatively, we could improve processing by doing the processing off-board.

3.2 Following Mechanism In this section, we will discuss about the following mechanism. It means how the Robot can follow the target. Today, while technology is getting more advanced than few years ago, we have more devices to be useful in implementing the following mechanism. In general, there are two type of following. They are active following and passive following. In 2 sections below, we will go over each one but more focus on passive following which we want to implement in this project.

Page 17: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

13

3.2.1 Active Following In this type of following, the follower will be controlled by the leading target. In other words, we can say that the leading object will give the robot instruction to follow. There are several ways to implement that active following. First, we can use GPS module attached in the target, so the system implemented in following will tracking the coordination of target to follow it. However, this way seems impractical for our level. The implementation and operation of GPS system are so complicated and expensive for our student level. Second way looks more possible and easier to implement. We can build a system for communication between target and follower. It consists of Bluetooth module, microcontroller and some type of sensors such as distance sensor and motion sensor. Every time leading target change behavior, the robot will record the information and repeat exactly what target already done. For example, if the target is speeding up, the gap between them will be increased. At that time, follower realize this increasing by distance sensor, so it will speed up to maintain the certain distance between it and target. Similarly, if target turn left or right, motion sensor will tell the follower which way the target make a turn. Overall, active following is very popular because it is easy for implementation. The theory behind that is very simple. The applications of active following are also limited because it requires us to build the system on both target and follower. However, in the real word, it is not always possible for implementing device in the target. This is a factor which limits the application of active mechanism.

3.2.2 Passive Following In section above, we discuss about active following. For this following mechanism, there is a communication between target and follower, which will give direction for the robot to follow. This way is really easy for implement the following. Besides that, it requires we need to build both system on target and follower, which really limits the application in the real world. That is why we use passive following for our project. It will be more challenge and have a lot of application we can apply into the practical life. In passive following, the follower (ROBOT) will work by itself to figure out what it need to do. It need a system to look for and keep track the target. Robot has to be able to control the speed such as acceleration and deceleration to maintain a safe distance with target. In other word, we can say there is no way for target to escape. For this purpose, our system is getting more complicated and requires a lot of hardware to implement, but it is ok because this is reason we want to do it in our project. The most popular technology for the keep-track function is image-

Page 18: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

14

processing. With this technology, we can keep Robot pointing to the target by camera and then distance sensors will determine the distance between them. This system is combination of image-processing and sensors, which is able to find out location of target relative to Robot. In the sections below, we will talk more details about each components and how they work in the system. The table below is just summary of what we need to consider in passive and active following

Active Following Passive Following

Common DC motor

Servo motor

Battery

Voltage regulator

Same active following

Difference Communication between target and follower: transmitter and receiver.

Main control systems on both objects: leader gives instructions for follower.

Distance Sensor

Image-processing system

Main control system on follower only: respond to target behavior.

Table #1 – Active vs. Passive Following

3.2.3 Path Following The path following is one of type of the passive following. Robot will run on the same path of the target. If so, the target will be always locked and the obstacle-avoiding issue is also reduced. We choose to use the path following because it has more challenge and is different from all the previous projects. All of them just implemented the system to keep pointing directly to the target. Whenever the target turns, Robot will turn to keep image of the target staying at center of the camera. In other words, the direction for Robot motion is always straight line from it to target. This mechanism has some problem in avoiding the obstacles. If target keep turning until some obstacle presents between them, the follower will lost the target. Although the path following is difficult to implement, it has more applications and more benefits compare to another mechanism. In this section, we discuss the method to implement this path following. In order to be able to follow the same path, we need to use both image-processing and sensor to keep tracking the target’s motion. For image-processing system, a camera with high resolution is used for recognizing the target and keep it at the center area of screen. The relative position of target due to the center is used to determine the turning direction. In addition, the sensors (at least 2 on each side)

Page 19: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

15

will help to calculate the distance from follower to some points on the target. From these distance, we can determine which angle the target make a turn with and where the target make a turn. Because of the sensor effectual angle, we need to always keep a follower at certain range behind target. Therefore, the distance sensor is also used to control the speed of motor for this purpose. However, in case that target speed up rapidly and get out of the sensor sight, we will still know where the target make a turn by determining the distance from a follower to the point at which sensor lost the target. In this situation, Robot will increase speed to approach this location as soon as possible and then make a turn until camera of image-processing system see the target again. The difficult part of this idea is how to set up and synchronize the image-processing system and sensors. Absolutely, there is error coming up from this issue but we try to minimize it as small as possible. Considering about components with appropriate sample rate or programming to control signal is also one of possible solutions. In conclusions, the summary below will draw a general picture of our system which consists of significant components. It lists out all hardware part we expect to use for implementing the path following.

1) Image-processing system:

Video camera

Video processor: process the image captured by video camera and communicate with MCU. Also, streaming video to tablet through Wi-Fi module

2) Distance Sensors: there are at least 5 sensors to be implemented: 2 on each side and 1 in the middle for calculating distance and turning angle of target.

3) Motors: used for high speed chasing. It is expected to provide a torque be able to handle the heavy load of 4 Kg.

4) Servomotor: used for controlling the turning of ACR through steering mechanical system.

5) MCU: work as a heart of the system. We use MCU to control and interface with another hardware component. Taking data from sensor and image-processing and then give order to motors and servo.

6) Power system: supply power for operation. 7) Other: wireless module, tablet,

3.3 Camera Research

One of the requirements of the ACR is to be able to stream as well as process video, for this we have researched into different options to connect a camera the camera must have a video stream to a tablet using a wireless connection, it must be able to fit within the ACR along the configuration required for it, without taking

Page 20: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

16

too much space, it must be able to operate at an appropriate speed and it should have a low power consumption since it will be powered from the same on-board cattery as the rest of the system, for this we evaluated different configurations.

3.3.1 IP Camera IP cameras are usually utilized for video surveillance, and use a network interface such a router which could be used to communicate to our tablet, the IP camera could be installed easily and would simply be plug into the router, as it would do in a normal situation, and no addition firmware or hardware would have to be added to it. Once everything has been installed, the router would place the video stream on a server which would be read wirelessly by the tablet. For the video processing used in the license plate detection we could have an output coming from the router which would come into the on-board video processing unit, in this case something such a Raspberry Pi, which already has a network interface could work in this configuration. However, even though the seems to be a plausible configuration, the first issue is the router, placing a router in the ACR unit would not only add on to the weight, but also take a lot of the space, it would also consume a relatively high amount of power, typically more than 12.9W are required for the standard IP camera, potentially reducing the battery life. Because of its power consumption, and the space and weight additions that would take along with its configuration we decided this would not be an appropriate option for our design.

3.3.2 Wireless 2.4 GHz Camera A 2.4 GHz wireless camera, like the IP camera is often used in security and surveillance applications, on its most apparent advantages is the fact that it a relatively long range, being able to transmit to over 400 feet and at the same time of these come with a USB receiver, which could be easily interfaced with the video processing unit, configuration which would allow for a good frame rate and image quality. A challenge that would present with this camera is the video stream into the tablet, which would require additional hardware such another USB receiver connected to the tablet which could present difficulties at the moment of interfacing, there seems to be no documentation of such or a similar thing done. This might be a viable option, however it would add onto our project the extra task of interfacing the 2.4 GHz receiver in addition of the Wi-Fi connection used for the commands transmitted by the tablet to the ACR unit.

Page 21: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

17

3.3.3 Bluetooth® Camera

A Bluetooth® camera is usually used at a video conferencing webcam, most webcams use USB, but this type of webcam would only charge through a USB port, and is then portable and also easily accessible. However we have found the average Bluetooth camera to be more expensive than the other kinds we have researched.

Adding this kind of camera would also require us to use some kind of Bluetooth® interface in our video processor, adding on another thing to our design which would not be required with some of the other cameras. There is however some other downsides to using this camera, the frame-rate is likely to be lower than on a traditional wired camera or webcam, the resolution might be slightly lower as well. Additionally it would only work within approximately 9 meters, which is the typical range for a Bluetooth®.

Although it would be advantageous to have a camera with a built-in battery, because of its range limitation, lower frame-rate and the difficulty to interface with our video processing unit we have decided a Bluetooth® camera would not be the most appropriate option for our application.

3.3.4 Wi-Fi Camera

Like some of our options before a Wi-Fi camera is often used as security or surveillance cameras, the price range is broad and the lower end cameras seem to have a good enough frame-rate and video quality, the most apparent advantage that this camera has over the cameras we have investigated beforehand is that built-in Wi-Fi camera, which would allow for video streaming without the need of additional hardware, it also has a relatively long range of operation, typically ranging from 150 to 300 feet.

This kind of camera displays the image it is capturing onto a local server, have a configurable IP address, which makes receiving the stream in the tablet a simpler task when compared to some of the other available options. However interfacing with video processing unit might be complicated or limited, since some of these cameras do not have a wired interface to be connected to the video processor. This is also a viable option however it would potentially add on some challenges when interfacing with the video processor.

3.3.5 Custom CMOS Camera Board

Page 22: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

18

There are various custom made CMOS camera boards available, these are usually for specific applications such as the “Raspberry Pi Camera Module” for the Raspberry Pi or HD Camera Cape for the BeagleBone Black board, these are usually relatively inexpensive, and just barely bigger than a quarter, having an area of about 25mm2 as seen in figure 3, yet they provide high quality video and have an outstanding low light capability with low noise while also being lightweight. These cameras also come with the option of using a flex cable which can facilitate the placement of the camera wherever needed.

Figure 3 - Raspberry Pi Camera Module Mechanical Dimensions

“reprinted with permission from Matt Hawkins, owner of RaspberryPiSpy”

These however, do not have wireless connection on itself, so it would depend of another device for the wireless connectivity, but are ultra-low powered requiring less than 1W to operate. This is a viable option, given that the additional required hardware is being used with the wireless connectivity option enabled.

Page 23: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

19

3.3.6 Conclusion

Most of the cameras evaluated seem to be viable for the purpose of our project, however, we are looking for a camera that works for video stream to a tablet using a wireless connection, it must be able to fit within the ACR along the configuration required for it, without taking too much space and low power consumption since it will be powered from the same on-board cattery as the rest of the system

Camera Pros Cons

IP Networking Interface Additional/bulky hardware required

High power consumption

2.4 GHz Long wireless range of connectivity

Needs additional hardware for video streaming capabilities

Bluetooth® Comes with a battery for its own power consumption

Small range of wireless connectivity

Bad frame rate and image quality

Additional hardware required for connection to video processor

Wi-Fi Standalone capabilities.

No extra hardware required for connectivity.

Extra hardware might be required for connecting to video processor

CMOS Ultralow power consumption.

Good video and frame-rate quality.

Small size and weight

Additional hardware required for wireless connectivity

Table 2 - Pros and Cons of Types of Camera

Given these requirements and under the assumption that we will use an on-board microcomputer such as the BeagleBone Black for video processing we have decided to use a CMOS which provides all of the aforementioned requirements with the exception of the wireless connectivity which would be provided by the an add-on to the microcomputer such as Wi-Fi dongle.

3.4 Power Research

Page 24: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

20

To power the ACR, batteries are to be implemented as the main source of power. Based on the many specifications and requirements, there are two main options of implementing the power supply that arise. First option allows each subsystem to be power independently by a power source. Second option is for one power source to manage every subsystem of the car. This allows for a more compact and organized system. Both options are to be evaluated and many requirements like low cost, runtime, longevity and safety are to be consider. Some of the ideal components necessary for the ideal battery are: Memory effect: The concept of memory effect is applicable only to rechargeable batteries. When the process of recharging a rechargeable battery is perform, it loses a percentage of the maximum capacity of energy it can hold. Long term overcharging results in a common process called voltage depression. The peak voltage in the battery depletes faster than usual, therefore affecting the longevity of the battery. In the ACR car some subsystems require a specific voltage to operate effectively. A fast peak voltage depletion can cause the system to malfunction. C- Rate: C-Rate is use to scale the charge and discharge currents in a battery. The need for ACR car to react to the speed of the target, for sudden and fast movements requires a moderately high discharge rate. For example, a rate of 1C means the discharge current depletes the battery in 1 hour. When choosing the battery it is a matter of trading off between how long the battery last and how fast the battery releases current. Nominal Capacity: The Nominal capacity is the amount of total Amp-hours available when the battery is discharge at a certain discharge current. The capacity of the battery is calculated by multiplying the discharge power by the discharge time. Measuring the capacity it is important because it allows for the calculation of the battery’s life. Knowing when it is time to recharge the system it is crucial for the longevity and performance of the system and the battery. Nominal Voltage: The nominal voltage of a battery, it is the recommended voltage by the manufacturer for the battery to operate. Each subsystem in the ACR car requires a specific voltage range. The component specifies a maximum and a minimum operating range. This, allows the subsystem to function appropriately as intended. It also ensures the power source is able to maintain the required voltage throughout the use without reaching the cut-off voltage of the system. At cut-off the battery has reach its limit and the system will not perform as intended. At this point the battery is considered “dead” even though there is still some charge left in it, the minimum voltage required for the system to operate is not met. Specific Energy (Wh/kg): This refers to the nominal battery energy per unit mass. In the ACR car, along with the energy consumption of the vehicle, it determines

Page 25: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

21

the battery weight required to achieve a given electric range. A battery with high energy density can be small because the energy is more compacted in the battery.

3.4.1 Battery Types There are many different types of batteries available in the market today. Only the batteries with the most favorable characteristics related to the ACR car are to be consider. These are the most popular and beneficial batteries available in the market today. Alkaline battery: Alkaline batteries composition and energy depend upon a chemical reaction between zinc and manganese dioxide. If compared with other battery with the same voltage, alkaline batteries have a higher energy density, and a longer shelf life than the rest. The battery can be dispose after all the capacity and stored power is consumed. A positive attribute the alkaline battery has is the low cost. There are two types of batteries that are to be consider, rechargeable and non-rechargeable batteries. The non-rechargeable battery is cheaper in the short term, but in the long term, tend to be more expensive every time a replacement is needed. Rechargeable batteries on the other hand can be a solution to this problem. In the short term a rechargeable battery is more expensive than a non-rechargeable when is bought, but in the long term, being able to recharge the batteries instead of replacing it every time the battery depletes, it becomes more reasonable choice and cost effective. A major drawback of the alkaline rechargeable batteries is that every time the battery is recharge; the efficiency, capacity and voltage of the battery start to decline. Also, a special charger is needed to recharge the alkaline battery. The charger adds to the overall budget of the ACR car project and a special consideration must be taken into account. Most alkaline batteries have a voltage of 1.5 volts when the battery has not been used. In the need of higher voltages, a series configuration can be applied. This will be based on how much every subsystem in the ACR needs. The average life cycle of the battery using alkaline batteries is around 6 hours, but this measurement is relative to components like remote controllers, cameras and radios. The following is a list of the characteristics that makes the alkaline battery a desirable choice for the ACR car:

Functions well at low temperatures

It’s a nature friendly battery (can be disposed in a regular trashcan.

Long shelf life

Cost is much less than Ni-MH or Li-ion battery families.

The following is a list of the characteristics that makes the alkaline battery an undesirable choice for the ACR car:

They have a high internal resistance.

Page 26: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

22

The battery can leak after not being use for a long time

If not charge properly, the battery can explode. It can also happen due to aging

Nickel Cadmium (Ni-Cd): Only the rechargeable battery will be considered. The typical nominal voltage for a Nickel cadmium cell is about 1.2 volts. Some advantages of these batteries are that they are very difficult to damage, meaning the lifespan of the battery is long. Also they come in many different sizes and capacities. A periodic full discharge is necessary to reduce crystal formation in the plates of the battery preventing gradual loss in performance. The battery has a long shelf life. The cost is moderate and the discharge rate is high, which is a very important requirement for the ACR project. Disadvantages of these batteries are that they have a lower energy density. The battery must be regularly used to prevent memory effect to take place. Also Ni-Cd contains some toxic metals making it environmentally unfriendly. The following is a list of characteristics that makes the use of Ni-Cd batteries a desirable choice for the design of the ACR car:

When properly maintained, it provides over 1000 charge/discharges cycles.

Long shelf life is accurate to any state of charge.

It performs well at low temperature.

It is a very strong battery, it is more forgiving if abused.

Affordable price.

The following is a list of the characteristics that makes the use of Ni-Cd batteries an undesirable choice for the ACR car.

Have low energy density- when compared with the new systems.

Suffer from memory effect. Requires a periodic use of the battery to prevent memory.

Battery suffers from relatively high self-discharge.

Nickel-Metal Hydride (Ni-MH): Only the rechargeable battery is to be considered. These batteries have a higher capacity than the standard Ni-Cd and a high energy density. Good qualities about the battery is that it is less prone to memory effect than the Ni-Cd are. Also periodic exercise cycles are required less often. The battery is environmentally friendly with less toxins than the Ni-Cd has. Disadvantages of the battery are limited service life. The battery starts to deteriorate after 200 to 300 cycles. To prolong the life of the battery is recommended to do shallow, rather than deep discharge cycles. Load currents of one-fifth to one-half of the rated capacity are necessary to obtain better results in the system. Also, the battery when recharging creates more heat and require a longer charge time than the Ni-Cd does. The battery has a high self-discharge and requires regular discharge to prevent the formation of crystals. The battery is a little more expensive than a typical Ni-Cd is.

Page 27: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

23

The following is a list of the characteristics that makes the Ni-MH battery a desirable choice for the ACR car:

About 30-40 percent higher capacity than Ni-Cd battery

Less prone to having memory

Environmentally friendly

The following is a list of the characteristics that makes the Ni-MH battery an undesirable choice for the ACR car:

Service life is limited

Limited discharge current

Generates more heat during charge, also requires more time to charge

High self-discharge

At high temperatures, performance of the battery degrades.

High maintenance, requires full discharge.

Lithium-Ion: Lithium-Ion batteries are very popular and used in the electronic markets today. Only rechargeable battery types will be consider for this type of battery. The battery has a high energy density for its weight. The charge loss is minimal when not in use as well as the memory effect. Lithium-ion batteries are one of the most efficient than any of the other types of batteries in the amount of current they can produce. Due to the higher energy density, they are lighter than other available batteries in the market today. Having a lighter battery is a major requirement the ACR should have, this way the speed of the car will not be affected by the weight. Also this allows for more space in the car to accommodate other components. The battery is low maintenance meaning it does not need to be periodically discharged. The battery is subject to aging even if it is not in use. Also, memory is not a factor to consider in this battery. Due to the popularity of the batteries and high efficiency, this batteries tend to be more expensive than the other batteries. This is a major factor to be consider when making sure the budget does not go over the limit. Also another drawback is that they are fragile and need a protection circuit for a safer operation. The typical nominal voltage of a lithium-battery is 3.7 V, more than double the amount of a typical alkaline battery 1.5V or a NiMH 1.2. On the other hand a major advantage of this battery is the resiliency in its capacity to remain constant as temperature increases. Having a constant capacity in our project is critical for the effectiveness and performance for every subsystem to work properly and safely in the ACR car. Figure 4 shows a capacity versus temperature represented in a graph. Temperature resiliency is one of the major attributes Li-ion batteries have versus Ni-MH and Ni-Cd. Having a constant capacity as temperature is changing is a major attribute to take into account when deciding which battery to choose for the

Page 28: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

24

ACR car. When the car is operational, internal temperature in the system increases. Having the consistency in capacity as temperature increases, helps to reduce the amount of errors and malfunctions the system may produce.

Figure 4 Capacity vs temperature

(permission pending from batterydata.com)

The following is a list of the characteristics that makes the Lithium Ion battery a desirable choice for the ACR car:

Have very high energy density

Rate of self-discharge is very low.

The battery is very low maintenance. It does not requires any periodic discharge.

The battery is not affected by memory.

The following is a list of the characteristics that makes the Lithium Ion battery an undesirable choice for the ACR car:

Requires a protection circuit, limiting the voltage and the current available.

More expensive

Only has a moderate discharge current.

Lithium-Ion Polymer (Li-Po): Only the rechargeable battery is to be consider. The nominal voltage for the battery is as high as the Lithium ion battery 3.7 V. This battery evolved from the lithium ion and as a result, both have many characteristics in common. Because it uses a gel instead of a liquid, the battery is light and small, which is a characteristic desired for the ACR. The rate of discharge of the battery is lower than the lithium ion battery which means it has a higher capacity. Also the battery is more resistant to overcharge, which reduces the chance of electrolyte leakage. A disadvantage of a Lithium-ion polymer battery is that it has a lower energy density. Also, Lithium-ion Polymer are

Page 29: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

25

more expensive than a lithium ion battery is. The following is a list of the characteristics that makes the Lithium Ion Polymer battery a desirable choice for the ACR car:

Light weight

Improved safety- has a higher resistance to an overcharge

Low probability of electrolyte leakage

The following is a list of the characteristics that makes the Lithium Ion Polymer battery an undesirable choice for the ACR car:

Low energy density when compared to a Li-ion battery

Capacity is less when compared to a Li-Ion battery

Lithium-Ion Iron Phosphate (LiFePO4): Only rechargeable battery is to be consider. The battery is not yet widely used. The nominal voltage of this battery is 3.2V, which is relatively lower than the other Li-ion related batteries. They have a high discharge current and a longer life cycle than the other batteries. The battery is also consider the safest battery in the Li-Ion family. A drawback about the battery is it has a low energy density. The following is a list of the characteristics that makes the Lithium Iron Phosphate battery a desirable choice for the ACR car:

Safest lithium battery

Performs well at high temperatures

High rate capability

Weigh less than the other Li-Ion battery family

The following is a list of the characteristics that makes the Lithium Iron Phosphate battery an undesirable choice for the ACR car:

Lowest voltage than any of the Li-ion Batteries

Low Capacity compared to Li-ion battery

New technology (have limited availability).

Zinc-Air: Zinc-air batteries are energize only when oxygen is absorbed into the electrolyte through a gas-permeable, liquid –tight membrane. Nominal voltage of the battery is 1.5 volts. Advantages of using this batteries are:

High energy density (1.69 MJ/Kg), but low power.

Inexpensive materials.

When sealed, has excellent shelf life, with a self-discharge rate of only 2 percent per year.

Disadvantages of using this batteries are:

Sensitive to extreme temperatures and humid conditions.

After activation, they have a high self-discharge.

When carbon dioxide from the air form carbonates, conductivity is reduce.

Table 3 summarizes the information showing the major advantages and disadvantages of each of the batteries discussed. Only the rechargeable batteries are compared in the table.

Page 30: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

26

Battery Energy Density (Wh/kg)

Voltage (volts)

Advantage Disadvantage

Nickel Cadmium

90 1.2 Long Battery life, cheap, high power

Contains toxic agents, suffers from memory effect

Nickel Metal Hydride

125 1.2 Less toxic and a better capacity than Ni-Cd, less memory effect affect the battery

The mechanism to charge the battery is more complex and the battery is more expensive than a Ni-Cd

Lithium Ion

240 3.7 High energy density, light and small, low discharge rate as well

Battery is more expensive, also it needs a protection circuit in order con keep voltages stable

Lithium Ion Polymer

260 3.6 Light weight, more resistant to overcharge than li-ion battery, safe

More expensive than a li-ion battery, also needs a protective circuit to keep voltages stable

Lithium Ion Iron Phosphate

108 3.2 Safest of all the types of li-ion, Cycle life is better

Comparing it with the other Li-ion it has by far the lowest energy density

Page 31: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

27

Table 3 - Main Battery Characteristic Summary

3.4.2 Charging

When it comes to batteries, charger selection is as important as selecting the battery type (Ni-Cd, Li-Ion, etc.). Selecting a poorly designed charger, can make best battery pack selected to fail. For this reason, it is very important to know the battery’s chemistry and also take into account the application requirements for the ACR car. Sometimes a charger may work well with a specific battery chemistry but may not work as well with another. Table # shows the advantages and disadvantages of several types of battery chemistry when it comes to charging them.

Battery Chemistry Advantages Disadvantages

NiMH/NiCd This battery types has no danger of a catastrophic failure due to overcharge.

Ni-MH-fast charge has to be great enough to force active termination characteristics, also MCU would need many A/D inputs

Li-Ion/Li-Poly It has a very simple charge algorithm, no need for an elaborate termination technique.

Overcharging this type of battery can result in a catastrophic damage to the cell, causing the cell to go in flames. Also cannot be charge as fast as a Nickle based chemistry type.

LiFePO4 It has a very simple charge algorithm as well, it has no need for an elaborate termination technique and is able to charge very fast.

The technology is new, therefore there are very limited charge IC’s available.

Table 4 - Advantages and Disadvantages of charging a battery in the different battery types

When it comes to recharging the battery, there are some major points that must be taken into account. These are input currents ranges, input voltage range,

Page 32: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

28

capacity and safety. Table 5 show the type of current or voltage needed based on the chemistry of the battery in order to have an effective charge.

Battery Chemistry Type of voltage or current needed

Ni-Cd Constant Current, Pulsed Current

Ni-MH Constant Current, Pulsed Current

Li-Ion Constant Current, Constant Voltage 4.2 to 4.25 V

Lithium Polymer Constant Current, Constant Voltage to 4.2 to 4.25 V

LiFePO4 Constant Current, Constant Voltage to 3.65 V

Table 5 - Key current and voltage needs when charging different battery types

For the purpose of charging, charger that are able to safely charge batteries in the lithium ion family are to be considered. The lithium ion family is the most prominent option to use for the ACR car and for that matter is to be covered more in depth. The major reason why this has been decided is because based on table 5, the lithium ion family has one of the greatest output voltages and also they have a really high energy density.

3.4.3 Safety:

Safety is mainly concerned with the Li-ion family especially because they are known to blow if overcharging occurs. The battery does comes with a built in circuit which helps to regulate and control the voltage and current. Nevertheless it is imperative that certain measures of caution are taken in order to comply with its safety standards. The subsequent precautions should be taken into account:

Charge in an environment that is at close to room temperature condition( not freezing, or too hot)

Charging should be discontinued if battery gets too hot

Battery is not to be charge with a current higher than 1 amp

Battery does not need to be completely charge in order to operate satisfactory

Always disconnect the charger once the battery is charge

Following the simple steps, helps to prevent any injuries when charging the device. Caution is a necessary requirement to perform when dealing with any electrical device.

Page 33: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

29

3.4.4 Voltage regulators Voltage regulator is a crucial component when designing the ACR car. The car has various subcomponents that require a constant voltage level to run efficiently. The need to effectively and accurately supply the correct amount of voltage to each subsystem is of great importance. Supplying too much voltage to the system, it makes the system overheat, and the system in the car is due to fail. On the other hand, if the amount of voltage supplied is too low the system may malfunction as well. There are several voltage regulator to choose from the following options are: linear regulators, switching voltage regulators, and Zener diode regulators.

3.4.4.1 Linear Regulator: A linear regulator is a way to control how much voltage is supplied to each of the ACR car subsystem. Sometimes the voltage supply needed for each of the subcomponents may differ from the voltage the source supplies. What a linear voltage regulator provides is a constant DC output voltage to the subsystem. It holds the output voltage regardless of changes in the input voltage or in the load current. One major minimum requirement for the voltage regulator to hold a constant output voltage is that it must be within the voltage regulator’s operating range. Linear voltage regulators can operate by using a voltage controlled current source forcing a fixed voltage at the regulator output terminal. The limit imposed in the current source determines the maximum lead current the regulator can source and still maintain a regulated voltage. Linear regulators do require a capacitor connected from the output lead to ground in order to assure stability in the system. The way the regulator works is by taking the difference between the input voltage and the output voltage burning the difference in the way of heat. This requires the linear voltage regulator to use of a heat sink in the system in order to dissipate all the heat that is going to be produce in the regulator so that it does not affect the system of the ACR car. There are three types of linear regulators: Standard Linear Regulator, Low Drop-out (LDO) linear regulator and the Quasi LDO linear regulator. One major important characteristic that differentiates the three types of linear voltage regulators is the ground pin current. The ground pin current is the current necessary by the regulator when driving rated load currents. This current is undesirable for the design of the ACR car because it must be supplied by the source but it does not help to power the load. That’s why this type of current is to be considered as current wasted. Another major characteristic that distinguishes these three regulator is the dropout voltage. A dropout voltage refers to the minimum voltage required across the linear regulator to maintain an adequate output voltage regulation. This information infers that the lower the regulator dropout voltage, the more efficient the regulator is going to be and operate.

Page 34: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

30

One benefit is that these regulators are easy and inexpensive to apply. Many of them are used in low voltage and low power systems. They work by adjusting the series resistance by a feedback loop. Many of the regulators on the market, are basic and easy to use due to the circuitry required when executing them. Linear regulators can only step down an input voltage, therefore the input voltage must be greater than the output voltage. If linear regulators are used in the ACR, batteries will be required to be in series until the voltage is high enough to exceed the voltage required. This way the input voltage only needs to be step down, in order to satisfy the need of every subsystem. The efficiency of the system is high only when the difference between the input and output voltages is small. Linear regulators tend to release energy and be less efficient when the difference between the input voltage and the output voltage is small. This is an important factor to consider when designing the ACR car, a system than losses energy in the form of heat, make the battery lose power by not being efficient. A positive feature of linear regulators is the price. They are inexpensive to buy. Also, linear regulators have the advantage of having a very clear output with little noise and no ripple in the system. They are designed to be reliable and maintain a safe minimum voltage. The following is a list of the characteristics that makes Linear Voltage Regulators a desirable choice for the ACR car:

Size is small

Low noise

Low cost

Ripples almost negligible

The following is a list of the characteristics that makes Linear Voltage Regulator an undesirable choice for the ACR car:

It can only step down voltages

Low efficiency

May need a heat sink to dissipate the heat.

3.4.4.2 Switching Regulators:

Switching Regulators are very popular way of controlling a voltage of a system. The way the regulator works is that it take small chunks of energy from the input voltage and bit by bit it moves them to the output. This is accomplished by the use of a controller and an electrical switch. When the energy is transferred from the input to the output, losses in the process are very small. The regulator has the ability to step up an input voltage as well as to step down the voltage. The regulator is very efficient, except when it has low load currents. An important characteristic of the voltage regulator is the switch duty cycle which controls the amount of energy being transferred. That’s why the output voltage relies on the input voltage and the duty cycle that the switch controls.

Page 35: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

31

Due to its high efficiency, a system with power less than 10 watts it is able for the components to run cool. The cost of a switching regulator is higher than a linear regulator is. Switching regulators are very dependable. A disadvantage of the regulator is that it can produce higher noise in the system which is due to the ripples caused by the switching rate. This has to be taken into account when regarding the use of a switch voltage regulator for the ACR car. There are many different types of switching regulators available in the market today, but the main and most commonly used with the most favorable characteristics to have as part of the ACR car are: the Flyback Converter, the Boost Converter, Buck Converter, and the Buck Boost Converter. Boost Converter: The Boost converter is used when the output voltage level needed is higher than the input voltage level is. Therefore, this converter is considered a step up converter. One of the requirement is that the voltage levels must be of the same polarity. Also, it can operate very efficiently with very little power loss. This converter operates by using a transistor as a switch that alternately connects and disconnects the input voltage to an inductor. Buck Converter: Buck converters are used when there is a need to reduce a DC input voltage to a lower DC voltage. One of the requirements is that the voltage levels must be of the same polarity. This converter operates by using a transistor as a switch that alternately connects and disconnects the input voltage to an inductor. Buck Boost Converter: The buck boost converter, also called the inverting converter, produces an output voltage that is opposite in polarity to the input voltage. The magnitude of the output voltage can be greater than or less than the magnitude of the input voltage. As a result, the converter may be used as a step up or a step down converter. One of the desirable attributes of this converter is that it can operate very efficiently with little power loss. Similar to the other converters discussed, it uses a transistor as a switch that creates the two different operating mode for the converter. Flyback Converter: The Flyback converter is a very special and unique, with its many diverse uses. The converter can produce an output voltage that is less than or greater than the input voltage. The converter can be used in both types of applications, whether it is needed to step up or step down the voltage. Also, is able to produce multiple outputs. This allows for multiple subsystems to be supplied different output voltages simultaneously. This is consider one of the most versatile of all the regulators. Table 6 summarizes the most important features of using linear regulators versus switching regulators. Many characteristics important to the ACR car are taken into account.

Page 36: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

32

Features Linear Voltage Regulator

Switching Voltage Regulator

Function Step down only, output voltage must be less than input voltage

Steps up or Steps Down the voltage, can produce multiple outputs.

Size Small to medium in portable design, may be even larger if heat sink is needed

Large than linear at low power, but smaller in the case where linear requires a heat sink

Efficiency Low to medium High

Weight Light Medium

Transient Response 20 µs 1.0 ms

Noise Low Medium to high due to ripple effect

Output Ripple Very small almost negligible

Large

Cost Low Medium to high

Hold up time 1.0ms-2.0 ms 20ms-30 ms

Waste Heat High, when load and voltage difference is high

Low, most components will run cool for low power levels

Complexity Low, only requires the regulator and a bypass capacitor

Medium to high, requires inductors, diodes, capacitors, transistors, filters

Table 6 - Linear versus Switching Voltage Regulator

3.4.5 Zener Diode Regulator: Zener diodes can be arranged in a way that they can produce a stabilize voltage output with low ripples under varying load current conditions. The concept is that by passing a relatively small current through the diode from a voltage source, via a suitable current limiting resistor, the diode can conduct sufficient current to maintain a voltage drop in the output. This is a very cheap way of controlling a voltage. A disadvantage of this circuit is that it can sometimes generate electrical noise on top of the DC supply as it tries

Page 37: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

33

to stabilize the voltage. In order to solve this problem, a large value decoupling capacitor across the zener’s output may be required to smooth the signal in the output.

3.4.6 Voltage regulator Conclusion: Based on the research, switching regulators look as a more prominent choice for the ACR. It has many desirable characteristic that makes it stand out. For example: switching regulators can be more efficient than linear voltage regulators are. Also, switching regulator can step up or step down a voltage as required. This is a key characteristic to have because some of the subcomponents have different voltage needs. Also they are more efficient, which reduces the heat being produce in the system. This characteristic helps to make the circuit smaller (because there will be no need for a heat sink) and also allows the system to save more energy. Saving energy is a factor that in DC power, it is very important, considering that the power source the ACR car is using is composed of a rechargeable battery.

3.5 Inertial Measurement Unit (IMU) Research The inertial measurement unit (IMU) is a component of navigational equipment used in everything from boats to aircraft and spacecraft, which uses a combination of accelerometers, gyroscopes, magnetometers and sometimes other electrical sensors inertial measurement units can measure orientation, acceleration rates, and rotational changes. These are often produced in different styles with differing levels accuracy which is measured in degrees of freedom. The inertial measurement unit can also be used to measure gravitational forces which are commonly called g-forces and by measuring the various forces and keeping track of them, the inertial measurement unit is able to produce a linear record of these measurements, which are then processed and the data that results is used to calculate the inertial measurement unit’s position based on reported velocity, direction, and time elapsed. This data can be directly overlaid onto an electronic mapping system that can tell the inertial measurement unit its location and orientation with respect to a point, which can be useful to detect a possible wreck of our car, adding an extra safety measure to our system. Our autonomous would use a combination of an inertial measurement unit along with various other inputs including triangulation data, wheel/shaft encoders, and possibly camera video processing system the inertial measurement unit would supplicate the other sensors and be used primarily as a redundancy. This would be another layer of navigational data that the automated vehicle would have

Page 38: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

34

access to in order to ensure that the navigational information and position of the automated vehicle is as accurate as possible.

3.6 Wireless Technology Research The main goal of using wireless technology in the ACR project, it is the ability to send and receive data without using any cables between the user and the car in order to communicate. One specific use, is in the scenario when the Follower car using the camera, recognizes the car’s plate it is in the Blacklist, it will send a text message to the mainframe. Wireless communication will be crucial, to alert the user of such finding. The objective is to allow the user to be at least 10 meters away from the car, and remain in control using the I-pad. In order to reach this goal, there are some important parameters that have to be consider when working with wireless technology. Operating range, power consumption, the rate it transfers data and last but not least connectivity time are a few examples of the parameters related and of great importance to the project. Based on this requirements, research was done on the most common wireless technology available. These are: Wi-Fi, wireless USB, ZigBee, Infrared and Bluetooth technologies.

3.6.1 Wi-Fi: Wi-Fi is one of the most prominent wireless connectivity technology available today. Its method of communication uses high frequencies to communicate by radio frequencies. The technology is based on the IEEE 802.11 standard. This standard specifies how to communicate in the 2.4 GHz and 5 GHz frequency. There are four main connections classified by the IEEE standard 802.11a, 802.11b, 802.11g and 802.11n. Table # shows how each IEEE standard differs in the range and the speed in Mbps of data that the standard is able to transmit. Having a range that is essential in order for the ACR car to travel far enough from the point of access is of great importance to consider. The benefits of using Wi-Fi is that it can connect more than one device to the same network to send and receive data. Wi-Fi has also has its disadvantages as well. It requires more power to operate, draining the battery faster than other wireless connections. Also, security of the connection can be compromised when the encryption is not configured properly. This can create many problems especially when trying to secure a connection via cellphone or tablet connection. Fortunately Wi-Fi does provide different encryptions method to secure the connection such as WEP, WPA and WP2. One of the concerns in the connection for our project, is protecting the connection so that any other party is not allowed to look at what the camera is video streaming.

Page 39: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

35

Also we don’t want any other party from controlling the movements of the ACR car. Ensuring a proper security protocols allows the ACR car to be safely controlled via the cellphone app created by the team.

802.11 Standard RF Band (GHz) Max Speed (Mbps)

Range (meters)

a 5 54 100

b 2.4 11 150

g 2.4 54 200

n 2.4 or 5 600 250

Table 7 - IEEE 802.11 standard range and speed at certain frequencies

The following is a list of the characteristics that makes Wi-Fi technology a desirable choice for the ACR car:

Range: depending on the standard, average is higher than 100 meters

Speed: depending on the standard, average can perform at 54 Mbps, which makes it essential for video streaming

Security: Have WEP, WPA, and WP2 encryption methods to protect the data being sent.

The following is a list of the characteristics that makes Wi-Fi technology an undesirable choice for the ACR car:

Power consumption is higher than the other types of wireless communication choices.

Complexity of the connection is high.

3.6.2 Bluetooth: Devices using Bluetooth technology, use radio wave very similar to what Wi-Fi technology uses to communicate between a transmitter and a receiver. This method of transmitting radio signals in Bluetooth technology is better known as frequency-hopping spread spectrum. The way the technology works is by sending packets of data and randomly changes the frequency to send it at a rate 1600 times every second. The technology can use about 79 different frequencies. It has a band range of about 2.4 GHz and 2.48 GHz. It uses GSFK (Gaussian Frequency-shift keying) modulation and supports all network topologies. T he band ranges used in Bluetooth are similar and common to what other wireless devises use to communicate. There are many advantages Bluetooth technology have. For example: the technology has a high throughput. Also, it does not required a clear line of sight between the devices being synced. This is very important factor, because in the ACR car there may be objects in between the

Page 40: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

36

connections and not having a clear line of sight, and being able to communicate is a must. It has a Low power consumption, which is very beneficial to the battery life. The technology also have some disadvantages. For example, the data transfer rate is at 1 MB – 3 MB per second, depending on the resolution of the camera chosen for the project, this might be a problem. Also, the maximum range that it can offer (considering a class 2 device) is 10 meters. The system needs to be operated at 100mw in order to have a range proximity of about 100 meters for class 1 devices. Table # shows how the class of the Bluetooth device affects the consumption of power and the operating range it can perform.

Class Maximum Power (mW)

Operating Range (meters)

Class 1 100 100

Class 2 2.5 10

Class 3 1 1

Table 8 - Bluetooth device classes

There are two different types of Bluetooth technologies to be discuss that can be consider as part of the ACR car. The first one is the Bluetooth Classic and the other one is the Bluetooth Low Energy technology.

3.6.2.1 Bluetooth classic:

Many of the specification of the Bluetooth classic is already covered in the general information. For example: the max range of the Bluetooth classic is 100m. Data rates are about 1-3 Mbps. It takes around 100ms to transmit data packets, which can be a really important specification when considering for the use of the ACR car. The peak level consumption is about 30mA. The following is a list of the characteristics that makes Classic Bluetooth technology a desirable choice for the ACR car:

Low Cost

High Range (based on a class 1 device)

No line of sight required

Secure connection (128 bit encryption)

Higher data rates when compared to Bluetooth Low Energy Technology

The following is a list of the characteristics that makes Classic Bluetooth technology an undesirable choice for the ACR car:

Higher power consumption when compared to the Bluetooth Low energy technology

Page 41: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

37

3.6.2.2 Bluetooth Low Energy:

Bluetooth Low energy is a new version of the standard Bluetooth technology that is available in the market. This technology has many similarities to the Bluetooth Classic. In the other hand, Bluetooth LE has been design for the sole purpose creating a low energy consumption alternative. Range has been reduce to just 50 meters, which still satisfies the requirements for the ACR car and allows it to be consider as an option for the design. It also uses GFSK modulation but instead of transmitting on 79 channels as the Bluetooth classic does, it can only transmit on 40 channels 2 MHz wide. Maximum transmit power of 10 mW. The data transmit rate is 1 Mbps and the transmit time is only 6ms. This reduction in the transmit time greatly reduces the amount of power the Bluetooth LE technology consumes. The following is a list of the characteristics that makes Bluetooth Low Energy a desirable choice for the ACR car:

Low power consumption

Very Secure (128 bit encryption)

Protocol Stacks are already available

Compatible with all OS platforms

Does not requires line of site connection

The following is a list of the characteristics that makes Wi-Fi technology an undesirable choice for the ACR car:

Range is not as high as classic Bluetooth technology

Data rate is not as high as classic Bluetooth technology

Table 9 represents the specific characteristics comparing the Classic Bluetooth vs Bluetooth Low Energy. It is only considering a class 1 Classic Bluetooth technology the reason why the range is at 100 meters.

Specification Classic Bluetooth Technology

Bluetooth Low Energy Technology

Range 100m 50m

Total time to send data

100ms 6ms

Data rate 1-3 Mbps 1Mbps

Security 128 bit encryption 128- bit AES encryption

Voice capable Yes No

RF Channels 79 40

Modulation GFSK GFSK

Page 42: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

38

Power Consumption 100mW 10mW

Table 9 - Classic Bluetooth vs Bluetooth Low Energy Technology

3.6.3 ZigBee: ZigBee is a technology for applications low in costs and low in power relying on the use of wireless mesh networks. The technology is based on the IEEE 802.15.4 standard for wireless personal area networks (WPANs). It is most used for data transfer from a sensor or device. It can operate on unlicensed bands such as 868 MHz, 900 MHz, and 2.4 MHz. A great advantage ZigBee technology has is a large network capacity. It uses a Mesh network topology which means there is one Master and many slaves, but the slaves are capable of transmitting messages from one to another. If one of the ZigBee devices breaks down, it is still possible to get the data received or transmitted by another ZigBee device. The transmission range is between 10 and 75 meters which satisfies the minimum requirements. The maximum output power is about 1 mW allowing the battery to last months and even years. It is a very reliable and secure type of communication. On the other hand, ZigBee also has some disadvantages to be taken into account. For example, it has low data speeds, and low data rates. The following is a list of the characteristics that makes ZigBee technology a desirable choice for the ACR car:

Low Power Consumption

Low cost

Flexible network structure

Easy implementation

Short time delay 30ms

Range

The following is a list of the characteristics that makes ZigBee technology an undesirable choice for the ACR car:

Low data rate: (250 kbps)

Size of bandwidth

3.6.4 Infrared (IR) Infrared technology allows devices to communicate via short range wireless signal. It allows for digital data to be transferred bi-directionally. The way it works is by using infrared light to transfer data. There are 29 different infrared standards to consider. The three main types of IR wireless technology are: IrDa-SIR has a data rate of 115 kbps, IrDa-MIR has a data rate of 1.15 Mbps, and IrDa-FIR has a data rate of 4 Mbps. Advantages about this technology is that IR is not affected by radio transmission. Also it has a low power consumption allowing the battery to last longer. I

Page 43: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

39

nfrared systems are very secure because there is no signal spillover. A major disadvantage of using this technology is the need for direct line of sight. This is a major problem because requiring a line of sight it will be a problem when objects are in the way between the user and the ACR car. Losing the connection is something the user cannot afford to have. Factors like rain may greatly influence the connection between the devices. The following is a list of the characteristics that makes IR technology a desirable choice for the ACR car:

Compatibility

Not affected by radio transmission

Security- no signal spillover

The following is a list of the characteristics that makes IR technology an undesirable choice for the ACR car:

Must have a direct line of sight

Indoor or evening use only

Fluorescent lights nearby may cause interference

3.6.5 Wireless USB (WUSB) The technology is based on WiMedia’s Ultra-wideband radio platform where you can connect wirelessly with very high bandwidth capabilities. The following is a list of the characteristics that makes Wireless USB technology a desirable choice for the ACR car:

Speed: It can deliver speeds of up to 480 Mbps at 10 feet and 110 Mbps at 30 ft.

Power Management: Provides maximum power efficiency. Has a sleep, listen, wake and conserve mode to ensure the device only uses minimum power necessary.

Convenience: the technology is very easy to use, plug and play capability.

Having such a high transfer rate of data is very desirable to have, because of the use of video stream. The ranges on the other hand may become an issue. The following is a list of the characteristics that makes Wireless USB technology an undesirable choice for the ACR car:

Range up to 10 meters

Table 10 summarizes the most relevant characteristic each of the different wireless technologies have to offer. Bluetooth technology and Wi-Fi are the most desirable wireless technologies for the project. ZigBee is a great technology because it has really low power consumption and a low cost allowing the battery in the technology to be powered for years, but the data rate is too low for the use of video steaming in the ACR. Wi-Fi and Bluetooth technology both meet the minimum data rate required in order to stream data. Also both of these technologies have great security features. Wi-

Page 44: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

40

Fi has a lower latency of data than Bluetooth does making it a more desirable choice.

Features Wi-Fi Bluetooth ZigBee

Power Hours Days Years

Range 100m 10m 10-75m

Frequency 2.4,5 GHz 2.4 GHz 2.4GHz, 950 MHz, 868 MHz

Security High-WPA, WEP, WPA2

128 bit 128 bit AES

Complexity Very Complex Complex Easy

Data rate 54 Mbps 1 Mbps 250 Kbps

Nodes 32 7 64,000

Physical Layer Standard

802.11 802.15.1 802.15.4

Network Architecture

Star Star Mesh

Latency 3 seconds 10 seconds 30ms-1s

Optimized For Speed Convenience, Low Cost

Low power, low cost, reliability, scalability

Table 10 - Wireless communication comparison (Wi-Fi, Bluetooth and ZigBee technologies)

3.6.6 Wireless technology Conclusion

Based on the research gathered Wi-Fi technology is selected as the most desirable wireless technology to be implemented to the ACR car. It meets the basic requirement for video streaming which is high data rates. Also, the technology will be useful when the alert feature of sending a text message is performed. High security protocols (WEP, WPA, WPA2) can be easily implemented to the device. Security allows the user to stream data and maintain a safe connection between the tablet and the ACR car. The power consumption is high, but based on the requirements of the ACR car, the battery in the power supply circuit, should be able to keep the car working for at least an hour even more.

Page 45: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

41

4 Project Hardware and Software Design Details This section has a purpose to describe the details involving the different subjects of our project.

4.1 Video Processing

The video processing will take place in an embedded Linux environment on an on-board microcomputer such that we are able to accomplish two main tasks:

1. Real Time Video Streaming

2. Real Time License Plate Recognition

In order to accomplish these tasks we plan to use a set of software tools to be implemented in the microcomputer.

4.1.1 Computer Vision (CV)

We plan to use the OpenCV library for Computer vision, OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++ it can be implemented in nearly any platform, including an embedded Linux environment such as the one we plan to use.

4.1.2 Image Processing

For image processing we will be using the Leptonica Image Processing Library which will perform the necessary conditioning on the capture and render image of the license plate for the next step. Some of the featured operations provided by Leptonica are:

Raster operator (a.k.a. bit-boundary block transfer)

Affine transformations such as scaling, translation, rotation and shear on images of arbitrary pixel depth

Binary and grayscale morphology, rank order, and convolution

Seed fill and connected components

Image transformations combining changes in scale and pixel depth

Pixelwise masking, blending, enhancement, arithmetic ops, etc.

The image can be processed by Leptonica to be converted into a binary image such as the one seen in Figure 5 below. This will prepare the image to be analyzed by the Character Recognition software package.

Page 46: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

42

Figure 5 - Image Pre-Processed

“Permission Pending”

Once the image has been processed then it is segmented and ready to be send to the next step, the Character Recognition, the image processing steps van be vizualised in Figure 6

Figure 6 - Image Processing Steps

“Permission Granted under the terms of the GNU Free Documentation License”

4.1.3 Optical Character Recognition (OCR)

After the image is conditioned the next step is to extract the characters out of our conditioned image, for this we will use Tesseract OCR, which is probably the most accurate open source OCR engine available, this engine was developed at the HP

Page 47: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

43

labs in between 1985 and 1995 and is now sponsored by Google.

The process or architecture, which explains how Tesseract works is shown in the flow chart displayed in Figure 7, which is below

Figure 7 - Architecture of Tesseract

4.1.4 License Plate Recognition (LPR)

To automatize the process to perform license plate recognition, we will use, OpenALPR, which is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output is the text representation of any license plate characters found in the image. This library has some dependencies, all of which are previously mentioned. The algorithm for de decision making given the License Plate Recognition seen in figure 8:

Page 48: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

44

Figure 8 - License Plate Recognition Process

Upon detecting the license plate the results are displayed in the user interface, while also signaling to the user the locations of the detected license plate and enclosing them in squares for easy recognition, the user interface also displays the License plate number, the confidence of the reading which will be the highest confidence attained and then the time took to perform the whole plate detection process. On the background all the possible combinations will be available as seen in Figure 9 but in the user interface only the highest confidence will be shown such as it is seen in Figure 10.

Page 49: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

45

Figure 9 - LPR Results with different Confidence %

Figure 10 - License Plate Detection Example

“Permission Granted under the terms of the GNU Free Documentation License”

After a license plate is recognized and the results are extracted, this is compared with a database on a server, depending upon the results, this may or may not trigger the automated following mechanism, the decision making is as per figure 11 as seen below:

Page 50: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

46

Figure 11 - License Plate Recognition Decision Flow Chart

4.1.4.1 Normal Operation Conditions

Normal operation conditions are such that the video processing used for the license plate recognition will be fully functional and recognizes most of the license plate, lighting conditions, as well as weather conditions such as rain might affect the readings as well as the confidence level, our system is only intended for conditions where there will not be any of the conditions

4.1.4.2 Non-Ideal Conditions

Non-ideal condition will be those, such that we image processing will not lay any results even in the presence of actual results and are including but not limited to:

Image distortions depending on angle

Inclement Weather

Page 51: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

47

Lighting Conditions

Road Conditions

4.2 Sensors Sensor is a one of significant component in our project. With image-processing system, they are used to implement the passive following. Main purpose of using Sensor is determining the distance between target and Robot. However, we can do a lot of thing with that distance such as controlling the acceleration, calculating the angle of turning, maintaining the safety distance with target or avoiding obstacles. There are two types of sensors we need to consider. They are Infrared sensor and Ultrasonic sensor. In this section, we will go over features of each type of them to see the advantage and disadvantages.

4.2.1 Infrared Sensor: This type of sensor use Infrared light for operation. The light is emitted and reflected back from object. Depending on the angle of this reflection, we can determine the distance between object and sensor. Therefore, the sensors cannot work accurately outside or even inside, if there is direct or indirect sunlight. In other words, we only use IR sensor for indoor applications. Another weak point is accuracy. Because the light never reflect the same way with every surface, the IR sensor reading will be different for different surfaces, different colors and difference shapes, even the distances are the same. Thus, most of IR sensors are not so accurate in ranging detection. They only work for detecting the proximity of an obstacle. However, if we want to use the IR sensor for ranging accurately, we can use the sharp IR sensor. It is the most accurate IR sensor, and it provides the analog output, which is easy to use. Obviously, this type of IR sensor reading is still affected by color of surfaces.In general, IR sensor is very simple and cheap, even you can build it by yourself, except the Sharp IR sensor. Conclusion for IR sensors: Use infrared ranging sensors if:

1. You do not care about incredibly accurate ranging 2. The sensor will not be used outside in the sun 3. You need a narrow beam width 4. The object should not have dark color ”

Page 52: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

48

4.2.2 Ultrasonic sensor This type of sensors use sound for ranging instead of light. This is reason why Ultrasonic sensor can be used inside or outside building because the sunlight does not affect its operation. Thus, this sensor is amazingly accurate. Ultrasonic sensor will emits a sound signal and keep tracking the time pass until detecting the return echo. Based on the time pass between signal sent out and the return echo received, we can calculate the distance between object and sensor. Beside the high accuracy, this type of sensor has longer range operation compared to Infrared sensor. The factors, which can influence the accuracy of Ultrasonic sensor, are the sound absorbing obstacle and ghost echo. The ghost echo is caused when the sound is bounced off in strange pattern such as wall or multiple obstacles. CONCLUSION FOR ULTRASONIC SENSORS: Use ultrasonic sensors if:

1. You need accurate distances of obstacles, no matter what color they are 2. The robot will not encounter sound absorbing materials as obstacles 3. You will be using the ultrasonic sensor inside or outside

Overall, after considering all features of each type, we will pick the Ultrasonic sensor for our project because it is the best fit to our need in the following mechanism. Specially, we are going to consider two model. They are “Ultrasonic ranging module HC - SR04” and “Ultrasonic Range Finder - LV-MaxSonar-EZ1”.

4.2.3 Comparison between IR and Ultrasonic sensor

We just went over Infrared sensor and Ultrasonic sensor to see the advantage and disadvantage of each type of sensor. We also discussed the case when we need to use IR or ultrasonic. Now, we come up with the comparison to make a final decision for which type of sensor we are going to use.

IR sensor

(using light wave)

Ultrasonic sensor

(using sound wave)

Work only inside building without direct sunshine, not for outdoor applications.

Work well in extremely noisy environment.

Less accurate in ranging

Able to work indoor and outdoor.

Fail in extremely noisy environment.

High accurate in ranging with longer range operation

Have to deal with ghost echo

Page 53: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

49

Not work with dark color object but can work with small size target

Target need to be large enough

Tablet 11 – IR vs. Ultrasonic

We need to use sensor for distance calculation, so our requirements come up on the side of Ultrasonic sensor. The ability of working outdoor and indoor is not so important, but we need an accuracy in range detection. Also, ultrasonic has longer range operation than Infrared sensor. It seems like infrared sensor only works for detecting the proximity of an obstacle. Because of these reasons, we pick the Ultrasonic type for our project distance sensor. In two sections below, we are going to consider two model of this type of sensor to determine which one we will use.

4.2.4 Ultrasonic ranging module HC - SR04 As we discussed above, the Ultrasonic sensor is chosen to be used in our project because of its advance. Ultrasonic ranging module HC-SR04 is a good choose. Its stable performance and ranging accuracy is the reason why it is a popular model in electronic market. Ultrasonic ranging module HC - SR04 provides 2cm - 500cm non-contact measurement function, the ranging accuracy can reach to 3mm. If compared to the Shap IR ranging module , HC-SR04 is much cheaper. However, it has the same ranging accuracy and longer ranging distance. This module includes ultrasonic transmitters, receiver and control circuit. Everything is ready in this module, all we need to do is connect to the micro-controller and use programming to implement the operation list below. This model is designed to interface easily with any micro-controller. This is one of reason we pick that to use. There are four pins out of the module such as Vcc, Triger, Echo and Ground (GND). We need 5V DC supply for Vcc, but DC voltage pins of micro-controller we use only provide 3.6 V. Therefore, Vcc will be connected to power system. Output of DC voltage regulator will make sure that 5V DC is always provided for sensor’s operation. Both Triger and Echo will be connected to I/O pins of microcontroller. Pulling a high level in Triger pin to sending sound signal out. Then, when sensor received signal come back, it immediately sets high level at Echo pins. Thus, micro-controller can know how long sonic signal travel and then we can calculate the distance of target ahead. Specification:

A power supply: 5V DC

Quiescent current: < 2 mA

Effectual angle: < 15˚

Ranging distance: 2cm to 500 cm

Resolution: 3 mm

Page 54: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

50

Basic principle of work:

Using IO trigger for at least 10 us high level signal

The module automatically sends eight 40 kHz and detect whether there is a pulse signal back

If the signal back, through high level, time of high output IO duration is the time from sending ultrasonic to returning. Distance= time x velocity of sound (340m/s)/2

4.2.5 Ultrasonic Range Finder - LV-MaxSonar-EZ1

This is a second model we are considering for our project. The Maxbotix is offering this fantastically model with progressively narrower beam angles allowing the sensor to match the applications. It is extremely pleased with the size, quality and ease of use for any small range finder.

It is one model of Ultrasonic sensor, so basically this operation is based on the sound wave and similar to “Ultrasonic ranging module HC - SR04”. However, EZ1 also has some unique feature in operation. The EZ1 sends out pulse of ultrasonic sound at a frequency of 41kHz and listens for the reflections of the sound off nearby objects. The fact is that this frequency is higher than what human can hear, so it seems like EZ1 is working in silence.

By recording the time between the initial pulse and when the reflection of the sound is heard, the distance to object can be determined. Sound travels at about 343 m/s, so we can calculate the travel distance based on the time. Besides that, EZ1 does some clever signal processing to filter out false data to give the best possible range estimate.

The EZ1 requires a power supply from 2.5V to 5.5V and the current of only 3mA. Although the sensor can work with 3.6V supplied by micro-controller with a built-in voltage regulator, we need let it operate at 5V in order to provide the best output power for long range applications. Thus, we need to use the external source such as power system to handle this job. We will talk more about this in voltage regulator section later on.

One benefit of this sensor model is that the EZ1 can provide range data in a number of different ways, which makes it easy to interface to any project. The available outputs are serial, analog and pulse width moduation (PWM). The simplest interface is the analog output, which generates a voltage that is proportional to the distance to object. The voltage output will be half of the positive supply voltage (Vcc) at maximum EZ1 range. In other words, we can say that The EZ1 model is built to be compatible to most of the purpose of any project.

Page 55: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

51

Specifications:

42kHz Ultrasonic sensor

Operates from 2.5-5.5V

Low 2mA supply current

20Hz reading rate

RS232 Serial Output - 9600bps

Analog Output - 10mV/inch

PWM Output - 147uS/inch

Now, we will look at the limitation of this EZ1 model. Everything has own advantage and disadvantage points. Therefore, there are some things which are to be considered when using the EZ1. Because the ultrasonic sensor EZ1 uses sound to sense nearby objects, it is subject to real-world acoustics and may not work well in every situation, such as extremely noisy environments. It works best for detecting large, solid objects such as walls that provide a strong reflection. Small objects may not reflect enough sound for the sensor to pick up and soft objects may absorb the sound rather than reflecting it back to the sensor. Oblique surfaces may cause glancing bounces to objects further away and then give erroneous reading.

4.2.6 Conclusion of sensor model

Through all section from 4.2.1 to 4.2.4, we already discussed about all type of sensor and 2 models of ultrasonic sensor. We decided to use ultrasonic sensor because of our need in this project. With our own requirement in this project, the ultrasonic bring up more benefits than the infrared sensor. The next step is which model of the ultrasonic sensor we need to use. Nowadays, there are a lot of model available in market place for us to choose. However, after looking for several designs, we only consider two models of them, they are “Ultrasonic ranging module HC - SR04” and “Ultrasonic Range Finder - LV-MaxSonar-EZ1”.

In sections 4.2.3 and 4.2.4, we discussed more details about each one of them. Generally, the EZ1 brings up more advantages compared to the HC-SR04. The EZ1 has longer range, more type of output available and more hardware available for signal processing. This is really fantastic model. However, these benefits also push up the cost. This EZ1 cost us around $26 compared to $4 for HC-SR04. If we look at the role of sensor in our project, we can realize that the HC-SR04 is able to handle all jobs we need in distance sensor. It is true to say EZ1 is a better model, but it is not better choice for us in this case.

One thing we need to consider behind the performance is how much we need to spend. Obviously, in any project, we do not want to pay for something we never use. Therefore, the model of HC-SR04 is our final answer for this topic of sensor.

Page 56: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

52

On the other hand, because of the advantage of EZ1, we will keep it as back-up plan for distance sensor in case that we get trouble in implementation with HC-SR04.

4.3 RC Car Drive This is an important part of the Robot, how we drive a Robot’s movement. In this section, we do not talk about how to follow, but discuss about the drive style to use for moving. There are 2 main types of driving style: steering drive and tank drive. Each drive style have different advantage and disadvantage. We will consider both and see what is possible for us to implement and useful for our project. This part is more about mechanical issue, so we try to minimize the work on that in order to have more time focusing on another electrical part such as controlling the car to track the target.

4.3.1 Steering Drive This is a typical type of driving in the real world. The movement of Robot will rely on the steering mechanical system. Usually, two back wheels are powered to drive the car forward or backward but the direction will be controlled by two front wheels. With additional steering mechanical system, two front wheels are able to turn with a certain angle to make change the moving direction. We can see this type of steering in any vehicle on the road. However, it is not typical use for Robot design because it requires the additional mechanical system to take care the steering. It does not mean that we are not using it in any Robot project. If we can handle this mechanical problem, it will bring up a lot of benefit for our project. With powering only two rear wheels, we can reduce a big amount of power consumed. Besides that, this steering system can provide high speed in turning or changing moving direction. It will be really useful in any application, which requires operation at high speed of movement. In this project, we want to implement high speed chasing, so this type of drive is obviously a first consideration. Because we are not mechanical engineering, so we will not build this steering mechanical system by ourselves, but we will buy one from the market and use the servo motor to control the angle of turning.

4.3.1.1 Servo motor

Generally, a servo is a small DC motor with the following components added: some gear reduction, a position sensor on the motor shaft, and an electronic circuit that controls the motor's operation. The servo motor is typically used for angular position. Particularly in this project, we use servo motor to control the angle of Robot’s turning. It is really an important part if we want to use the steering drive because this is a heart of steering mechanical system.

Page 57: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

53

The external controller (electrical circuit) such as micro-controller, will tell the servo where to go with the signal known as pulse proportional modulation (PPM) or pulse code modulation. As we can see at figure above, PPM uses 1 to 2ms out of a 20ms time period to encode its information. The servo expects to see a pulse every 20 milliseconds (.02 seconds). It means the servo motor will refresh and change the angle after 20ms. If we want to keep the steering mechanical system turning at certain angle, we need to send out a same signal (pulse) every 20ms. The length of the pulse will determine how far the motor turns. Technically, a 1.5 millisecond pulse will make the motor turn to the 90 degree position (often called the neutral position). If the pulse is shorter than 1.5 ms, then the motor will turn the shaft to closer to 0 degrees. If the pulse is longer than 1.5ms, the shaft turns closer to 180 degrees. Based on this scale, it is easy to do calculation for the other angle between 0 and 180 degrees.

4.3.1.2 HS-422 Servo Motor (product code: RB-Hit-27)

This model of Servo Motor is chosen for the project. The Hitec HS-422 Servo Motor is one of the most durable and reliable servos Hitec has ever offered. With its dual iron-iolite bushings, high impact resin gear train and high performance circuitry, the HS-422 features excellent centering and resolution. Connection with micro-controller: This model is designed for interfacing with any micro-controller. There are 3 wires coming out from the servo motor: Power (red), Ground (black) and Signal (orange). We need to provide a 5V DC Voltage for “Power” wire. As we mentioned in previous sections, all DC voltage pin of our micro-controller are below 5 V, so we have a power system to supply this DC voltage for servo motor’s operation. The black (ground) wire will be connected to ground pin of micro-controller. The orange (signal) wire is a control line connected to I/O pin. By programming, we can pull high level for the signal line with appropriate time to turn servo motor to desired angle. Based on fundamental of servo motor’s operation we discussed in (4.3.1.1), the algorithm for coding will be built and implement in micro-controller. The figure below shows us the specification and technical information of HS-422 Servo Motor, which we consider to use in this project. The dimension is really compatible with our Robot’s size. Also, it provides really high torque, so in case of heavy load this servo still handle the turning accurately and fast enough for high-speed chasing purpose. Note: We are not going to build the mechanical system for the wheel turning by ourselves because we are not mechanical engineer. Instead, we will get this turning system from market place and install our HS-422 servo motor to control it.

Page 58: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

54

In other words, we only focus on the electrical part of this project and try to minimize all issues not related to the field of electrical engineering.

Figure 12 HS-422 Servo motor

(From commercial website: www.robotshop.com)

4.3.2 Tank Drive This type of drive is also called differential steering. It consists of two independent powered and controlled wheels system. In specific, two wheels on each side will create one system. They are mounted parallel to each other and along the same axis. Based on the difference in direction and speed of the rotation in these two systems, we can drive the Robot with any type of movements. The advantage of

Page 59: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

55

this type of drive is that it is possible to drive and steer the robot without implementation of additional steering mechanism.

Figure 13 Tank Drive’s Operation mode

The Operation mechanism of the tank drive is described below:

If both wheels rotate at the same speed and in the same direction, the robot will move in a straight line.

If one wheel rotates faster than the other, the robot will follow a curved path, turning inward toward the slower wheel.

If the wheels rotate at equal speed, but in opposite directions, both wheels will traverse a circular path around a point centered half way between the two wheels. Therefore the robot will pivot, or spin in place

This type of drive is currently used in the most of Robot design project because of being easy to implement and control. We do not need to worry too much and minimize problem in steering mechanical system. However, it also have some disadvantages. The tank drive will consume more power than steering drive because we need to power all the wheels of system. Besides that, I cannot change direction of movement quickly. In order to make a turn, it need to change speed of

Page 60: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

56

wheels in one side, which take time to do because we cannot change the speed immediately. Although today there are a lot of way to increase the speed and rate of turning for the tank drive, people still do not pick this type of drive for any application, which requires high speed of movement.

4.3.3 DC Brushed Motor In two sections above, we already discussed about two types of drive style available for us to implement the following robot. However, whichever type we pick, we also need to build it based on the motor. Therefore, determining type of motor and how we can control it are really significant point in building the Robot System. DC brushed motor is one type of motor available in market place. This type of motor is the cheap one but still able to provide high speed with high torque in case of driving with heavy load. One advantage of this DC brushed motor is easier to control the speed and direction of rotation than another model of motor. Technically, DC brushed motor is currently used widely in building Robot applications. It means there are a lot of resource showing the circuit schematic and method to enhance the performance of motor. That is one of reasons why we consider to use it for our Robot. The model of DC brushed motor that we pick from the marketplace is DS-540 Electric DC motor. It is operating with full speed of 20000 rpm at 12V. Below is the specification and data of this model. We use it for out references later.

Figure 14 DS-540 Electric DC motor

Page 61: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

57

(From commercial website: http://dsdmotor.en.alibaba.com)

Figure 15 Circuit schematic for controlling the motor

(From tutorials website: www.afrotechmods.com) Method to control the speed of motor is supply the different voltage across the motor. With different voltage supply, motor will operate at different speed. The higher voltage is, the faster the motor can rotate. Based on that property, the top circuit is designed for changing speed of DC motor. It use Pulse Width Modulation (PWM) for implementing this type of idea. Besides that, because of running with DC current, changing direction of current flowing through motor will control the direction of rotation. Based on this mechanism, the second circuit above was designed for controlling the direction and speed of motor rotation. This is call H-bridge method. With a switch, we can control the operation of four transistors in circuit. There is one transistor on each side at a time, so it allows the current pass through DC motor. For changing direction of motor, we just need to control the ON and OFF state of these four transistor properly so that DC current flow in appropriate direction. For

Page 62: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

58

convenience, in this case, micro-controller will be used as a switch, so everything will be autonomously controlled by system or we can do remote control manually.

4.3.4 Brushless DC motor

The brushless DC motor is second type of motor used in Robot applications. Brushless motors are more power efficient, and significantly reduced electrical noise, and last much longer. But they also have several disadvantages, such as higher prices and the requirement for a special brushless motor driver. Besides that, one advantage of this type over the brushed motor is that it requires less and sometimes no maintenance due to the lack of brushes. It is really convenience for a long period used applications, a two pole brushless motor as the one seen in figure 16_A should be sufficient enough for our application which requires certain speed.

Figure 16_A - 2 Pole Inrunner BL Motors

(Permission pending from Leopard Hobby)

The model of this brushless DC motor we consider is “Brushless DC Escap 22BS”. This is slotless brushless DC motor manufactured by Portescap. At the rated voltage of 12V, it requires current of 2.8A and is able to provide speed of 39500 rpm. This is really fast compared to the model we discussed in 4.3.3. It also supply really high torque. This is one of important thing we need to care when using a motor because the torque will determine if motor can handle the heavy load or not. The torque of a motor is highly dependent on the input voltage. Higher the voltage is applied, higher the torque motor can provide. Like all other motors, brushless motors also run on an optimal voltage.

If you apply too high a voltage, the coils could melt for all the heat, and if you apply too little voltage, torque could be quite low. Therefore, we need to be careful about voltage supply to the motor. Thus, we need to make sure the voltage regulator of

Page 63: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

59

power system is able to maintain the output voltage at desired value without any problem. Below is the specification of the Escap 22BS:

Electronically commutated motor

Rated voltage: 12 V

No load current: 160 mA

Phase/phase resistance: .43 Ohm

No load speed: 39,500 RPM

Maximum continuous torque at 10 kRPM: 6.9 mNm (0.97 oz-in)

Maximum continuous current at 10 kRPM: 2.8 Amp

Maximum continuous power at 10 kRPM: 7.2 Watt

Stall torque: 7.7 mNm (1.10 oz-in)

Stall current : 3.0 Amp

Maximum rated coil temperature : 125 deg C

Motor dimensions (not including shaft): 37.8 mm L x 22 mm diameter

Round shaft dimensions: 8 mm long x 3 mm diameter

Comes with 30 cm long flexible leads. Mass: 2.6 oz. (75 g)

Additionally, in order to control the brushless motor, it requires a complicated system to drive. It means we need more hardware to go with this type of motor. In market place, the motor shield is one of typical tools used for controlling the brushless DC motor. The expensive of this tool in market place varies from model to model but it will not cost more than $10. Also, because of its size we should be able to fit it in our car given the space constrains, the dimensions are shown in the following figure 16_B and they measure in millimeters.

Figure 16_B – BLDC motor mechanical dimensions

(Permission pending from Leopard Hobby)

Page 64: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

60

Figure 16_C – BLDC Electronic Speed Control (ESC)

In order to be able to drive the BLDC motor using pulse width modulation we need to use an ESC in this case an electronic speed control from Turnigy, which is a 35 ampere speed controller which comes in a small packaging that fits our size constraints while providing the necessary power to the motor, the connections of the ESC include but are not limited to the following:

BLDC Three phase connection

Battery Connection

Switch for ON/OFF conditions

Additional condition to power external Servo motor

4.3.5 Comparison

In sections 4.3.3 and 4.3.4, we considered the brushed DC and the brushless DC motors. Just make comparison to see which one is better choice for us to implement the following mechanism.

Page 65: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

61

Brushed DC motor Brushless DC motor

Pros Generally inexpensive and reliable.

Two-wire control and require fairly simple control or no control at all in fixed-speed designs.

Require few or no external component at all

Tend to handle rough environments reliably.

More accurate in positioning applications.

Require less and sometimes no maintenance due to the lack of brushes.

Provide high torque. Be able to handle heavy load.

High speed range

No power loss across brushes, making the components significantly more efficient.

Low heat dissipation and low noise operation

cons Require periodic maintenance as brushes must be cleaned and replaced for continued operation

If high torque is required, brush motors fall a bit flat. (It is not big issue and acceptable)

As speed increases, brush friction increases and viable torque decreases.

High heat dissipation

Low speed range compared to brushless motor.

Higher cost

Require control strategies that can be both complex and expensive.

Require more hardware for controller such as motor shield

Table 12 – Brushed vs. Brushless DC motor

After knowing all information about pros and cons of each type of motor, the choice is depended on what we want to implement in the project. For example, if this robot only performs basic movements or is part of an introductory kit, there’s no need to go with long-life brushless motors that cost more than brushed counterparts. The toy or kit will probably end up in the recycling bin well before the brush motors have burned out. In the other hand, the brushless motors are more versatile, mainly

Page 66: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

62

because of their savvy in the speed and torque departments. They also come in compact packages, making them viable for a variety of compact designs.

4.3.6 Final Conclusion

Now we need to make a choice for us. What do we use the motor for? We need motor to drive the ACR. We want a high speed and ease of control. Also, cost is one of factor need to be considered. Besides that, this senior design project is basically not used in the real world. I means at least in this case. It only requires that ACR can operate in presentation which will not last longer than 30 minutes, so we do not need to care about maintenance period of motor.

With DS-540 model for brushed DC motor, it can handle really high speed up to 20000rpm. The fact is that this speed and torque provided by this brushed DC motor are lower than brushless but they are still high compared to our requirements. Moreover, the method for controlling motor is also simpler and easy to implement by the circuit schematic mentioned in section 4.3.3. It means we don’t need to spend money on external hardware like motor shield or some tools to handle the motor drive. The last factor is the cost. Obviously, the brushless one is more expensive than brushed motor. Therefore, the primary choice will be the brushed motor with DS-540 motor.

However, the Escap 22BS model of brushless type is the back-up choice. One possible thing can happen is that the DS-540 may fail to drive heavy load or we still have time at the end for improving the performance. In this case, we will replace DS-540 by Escap 22BS. In conclusion, the primary choice is DS-540 DC brushed motor.

4.4 Microcontrollers For this project we have looked at different microcontrollers including wireless modules. We looked at the AVR XMEGA family of microcontrollers such as the ATxmega384C3 and also looked at the arm family of microcontrollers such as the ARM Cortex-M4 and ARM Cortex-M7. Some of the other options where the Arduino Due, the BeagleBone Black, the Raspberry Pi, and the UDOO. Below we describe each microcontroller in detail and give a table summary at the end of each microcontroller that show the most important features. We also have a conclusion at the end of this section where we pick the microcontroller and why we made that choice.

Page 67: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

63

4.4.1 ARM Cortex-M4 The Cortex-M4 processor is a low-power processor that features low gate count, low interrupt latency, and low-cost debug. The Cortex-M4 includes optional floating point arithmetic functionality. The processor intended for deeply embedded applications that require fast interrupt response features. This processor is slower than the ARM Cortex-M7 of course, because is the predecessor of it. Even though it is slower and has less memory than the ARM Cortex-M7 we decided to take a look at it anyways because we might not need that much processing power from the Cortex-M7.

4.4.2 ARM Cortex-M4 Features Summary

ISA Support Thumb® / Thumb-2

DSP Extensions

Single cycle 16/32-bit MAC Single cycle dual 16-bit MAC 8/16-bit SIMD arithmetic Hardware Divide (2-12 Cycles)

Floating Point Unit Single precision floating point unit IEEE 754 compliant

Pipeline 3-stage + branch speculation

Performance Efficiency

3.40 CoreMark/MHz*

Performance Efficiency

Without FPU: 1.25 / 1.52 / 1.91 DMIPS/MHz** With FPU: 1.27 / 1.55 / 1.95 DMIPS/MHz**

Memory Protection Optional 8 region MPU with sub regions and background region

Interrupts Non-maskable Interrupt (NMI) + 1 to 240 physical interrupts

Interrupt Priority Levels

8 to 256 priority levels

Wake-up Interrupt Controller

Up to 240 Wake-up Interrupts

Sleep Modes Integrated WFI and WFE Instructions and Sleep On Exit capability.

Page 68: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

64

Sleep & Deep Sleep Signals. Optional Retention Mode with ARM Power Management Kit

Bit Manipulation Integrated Instructions & Bit Banding

Debug Optional JTAG & Serial-Wire Debug Ports. Up to 8 Breakpoints and 4 Watchpoints.

Trace Optional Instruction Trace (ETM), Data Trace (DWT), and Instrumentation Trace (ITM)

4.4.3 ARM Cortex-M7 The ARM Cortex-M7 processor is the most recent and highest performance member of the energy-efficient Cortex-M processor family, and enables partners to build the most sophisticated variety of MCUs and embedded SoCs. Below are some of the features that an ARM Cortex-M7 has:

Designed for efficient embedded system.

Very easy to use, most applications can be programmed completely in C

or any high level language.

Scalable architecture supporting ultra-low power sensors to high

performance controllers.

Scalable from simple system to complex multi-processor systems.

Interrupt Handlers can be written entirely in C.

Easy to use.

Powerful instruction set to enable high performance systems.

6 stage superscalar pipeline in Cortex-M7 processor for unmatched

performance for embedded processors

Architectural defined sleep modes

Deterministic and low jitter

Wide choice of debug tools available

4.4.4 ARM Cortex-M7 Features Summary

ISA Support ARMv7-M

DSP Extensions Single cycle 16/32-bit MAC Single cycle dual 16-bit MAC

Page 69: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

65

8/16-bit SIMD arithmetic Hardware Divide (2-12 Cycles)

Floating Point Unit Single and double precision floating point unit IEEE 754 compliant

Pipeline 6-stage superscalar + branch prediction

Performance Efficiency

5 CoreMark/MHz

Performance Efficiency

2.14 / 2.55 / 3.23 DMIPS/MHz

Interconnect 64-bit AMBA4 AXI, AHB peripheral port (64MB to 512MB)

Instruction cache 0 to 64kB, 2-way associative with optional ECC

Data cache 0 to 64kB, 4-way associative with optional ECC

Instruction TCM 0 to 16MB with optional ECC

Data TCM 0 to 16MB with optional ECC

Memory Protection Optional 8 or 16 region MPU with sub regions and background region

Interrupts Non-maskable Interrupt (NMI) + 1 to 240 physical interrupts

Interrupt Priority Levels

8 to 256 priority levels

Wake-up Interrupt Controller

Up to 240 Wake-up Interrupts

Sleep Modes

Integrated WFI and WFE Instructions and Sleep On Exit capability. Sleep & Deep Sleep Signals. Optional Retention Mode with ARM Power Management Kit

Bit Manipulation Integrated Instructions

Debug Optional JTAG & Serial-Wire Debug Ports. Up to 8 Breakpoints and 4 Watchpoints.

Trace Optional Instruction and Data Trace (ETM), Data Trace (DWT), and Instrumentation Trace (ITM)

Page 70: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

66

4.4.5 Atxmega384C3 The Atxmega384C3 is a low power, high performance, and peripheral rich 8/16-bit microcontrollers based on the AVR enhanced RISC architecture. By executing instructions in a single clock cycle, the AVR XMEGA devices achieve CPU throughput approaching one million instructions per second (MIPS) per megahertz, allowing the system designed to optimize power consumption versus processing speed. The AVR CPU combines a rich instruction set with 32 general purpose working registers. All 32 registers are directly connected to the arithmetic logic unit (ALU), allowing two independent registers to be accessed in a single instruction, executed in one clock cycle. The resulting architecture is more code efficient while achieving throughputs many times faster than conventional single-accumulator or CISC based microcontrollers. The XMEGA C3 devices provide the following features: in-system programmable flash with read-while-write capabilities; internal EEPROM and SRAM; two-channel DMA controller, four-channel event system and programmable multilevel interrupt controller, 50 general purpose I/O lines, 16-bit real-time counter (RTC); five, 16-bit imer/counters with compare and PWM channels; three USARTs; two two-wire serial interfaces (TWIs); one full speed USB 2.0 interface; two serial peripheral interfaces (SPIs); AES cryptographic engine; one sixteen-channel, 12-bit ADC with programmable gain; two analog comparators (ACs) with window mode; programmable watchdog timer with separate internal oscillator; accurate internal oscillators with PLL and prescaler; and programmable brown-out detection. The ATx devices have five software selectable power saving modes. The idle mode stops the CPU while allowing the SRAM, DMA controller, event system, interrupt controller, and all peripherals to continue functioning. The power-down mode saves the SRAM and register contents, but stops the oscillators, disabling all other functions until the next TWI, USB resume, or pin-change interrupt, or reset. In power-save mode, the asynchronous real-time counter continues to run, allowing the application to maintain a timer base while the rest of the device is sleeping. In standby mode, the external crystal oscillator keeps running while the rest of the device is sleeping. This allows very fast startup from the external crystal, combined with low power consumption. In extended standby mode, both the main oscillator and the asynchronous timer continue to run. To further reduce power consumption, the peripheral clock to each individual peripheral can optionally be stopped in active mode and idle sleep mode. In order to maximize performance and parallelism, the AVR CPU uses a Harvard architecture with separate memories and buses for program and data. Instructions in the program memory are executed with single-level pipelining. While one

Page 71: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

67

instruction is being executed, the next instruction is pre-fetched from the program memory. This enables instructions to be executed on every clock cycle. The arithmetic logic unit (ALU) supports arithmetic and logic operations between registers or between a constant and a register. Single-register operations can also be executed in the ALU. After an arithmetic operation, the status register is updated to reflect information about the result of the operation. The ALU is directly connected to the fast-access register file. The 32 x 8-bit general purpose working registers all have single clock cycle access time allowing single-cycle arithmetic logic unit (ALU) operation between registers or between a register and an immediate. Six of the 32 registers can be used as three 16-bit address pointers for program and data space addressing, enabling efficient address calculations. The program memory is divided in two sections, the application program section and the boot program section. Both sections have dedicated lock bits for write and read/write protection. The SPM instruction that is used for self-programming of the application flash memory must reside in the boot program section. The application section contains an application table section with separate lock bits for write and read/write protection. The application table section can be used for safe storing of nonvolatile data in the program memory. The arithmetic logic unit (ALU) supports arithmetic and logic operations between registers or between a constant and a register. Single-register operations can also be executed. The ALU operates in direct connection with all 32 general purpose registers. In a single clock cycle, arithmetic operations between general purpose registers or between a register and an immediate are executed and the result is stored in the register file. After an arithmetic or logic operation, the status register is updated to reflect information about the result of the operation. ALU operations are divided into three main categories – arithmetic, logical, and bit functions. Both 8- and 16-bit arithmetic is supported, and the instruction set allows for efficient implementation of 32-bit arithmetic. The hardware multiplier supports signed and unsigned multiplication and fractional format. The Atmel AVR XMEGA devices contain on-chip, in-system reprogrammable flash memory for program storage. The flash memory can be accessed for read and write from an external programmer through the PDI or from application software running in the device. All AVR CPU instructions are 16 or 32 bits wide, and each flash location is 16 bits wide. The flash memory is organized in two main sections, the application section and the boot loader section. The sizes of the different sections are fixed, but device-dependent. These two sections have separate lock bits, and can have different levels of protection. The store program memory (SPM) instruction, which is used to write to the flash from the application software, will only operate when executed

Page 72: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

68

from the boot loader section. The application section contains an application table section with separate lock settings. This enables safe storage of nonvolatile data in the program memory. Some features in the device are regarded as critical for safety in some applications. Due to this, it is possible to lock the I/O register related to the clock system, the event system, and the advanced waveform extensions. As long as the lock is enabled, all related I/O registers are locked and they cannot be written from the application software. The lock registers themselves are protected by the configuration change protection mechanism. This microcontroller has two-channel direct memory access (DMA) controller that can transfer data between memories and peripherals, and thus off-load these tasks from the CPU. It enables high data transfer rates with minimum CPU intervention, and frees up CPU time. The four DMA channels enable up to four independent and parallel transfers. The DMA controller can move data between SRAM and peripherals, between SRAM locations and directly between peripheral registers. With access to all peripherals, the DMA controller can handle automatic transfer of data to/from communication modules. The DMA controller can also read from memory mapped EEPROM. Data transfers are done in continuous bursts of 1, 2, 4, or 8 bytes. They build block transfers of configurable size from 1 byte to 64KB. A repeat counter can be used to repeat each block transfer for single transactions up to 16MB. Source and destination addressing can be static, incremental or decremented. Automatic reload of source and/or destination addresses can be done after each burst or block transfer, or when a transaction is complete. Application software, peripherals, and events can trigger DMA transfers. The two DMA channels have individual configuration and control settings. This include source, destination, transfer triggers, and transaction sizes. They have individual interrupt settings. Interrupt requests can be generated when a transaction is complete or when the DMA controller detects an error on a DMA channel. To allow for continuous transfers, two channels can be interlinked so that the second takes over the transfer when the first is finished, and vice versa. Sleep modes are used to shut down modules and clock domains in the microcontroller in order to save power. XMEGA microcontrollers have five different sleep modes tuned to match the typical functional stages during application execution. A dedicated sleep instruction (SLEEP) is available to enter sleep mode. Interrupts are used to wake the device from sleep, and the available interrupt wake-up sources are dependent on the configured sleep mode. When an enabled interrupt occurs, the device will wake up and execute the interrupt service routine before

Page 73: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

69

continuing normal program execution from the first instruction after the SLEEP instruction. If other, higher priority interrupts are pending when the wake-up occurs, their interrupt service routines will be executed according to their priority before the interrupt service routine for the wake-up interrupt is executed. After wake-up, the CPU is halted for four cycles before execution starts. The content of the register file, SRAM and registers are kept during sleep. If a reset occurs during sleep, the device will reset, start up, and execute from the reset vector. Atmel AVR XMEGA C3 devices have a set of five flexible 16-bit timer/counters (TC). Their capabilities include accurate program execution timing, frequency and waveform generation, and input capture with time and frequency measurement of digital signals. Two timer/counters can be cascaded to create a 32-bit timer/counter with optional 32-bit capture. A timer/counter consists of a base counter and a set of compare or capture (CC) channels. The base counter can be used to count clock cycles or events. It has direction control and period setting that can be used for timing. The CC channels can be used together with the base counter to do compare match control, frequency generation, and pulse width waveform modulation, as well as various input capture operations. A timer/counter can be configured for either capture or compare functions, but cannot perform both at the same time. A timer/counter can be clocked and timed from the peripheral clock with optional prescaling or from the event system. The event system can also be used for direction control and capture trigger or to synchronize operations. There are two differences between timer/counter type 0 and type 1. Timer/counter 0 has four CC channels, and timer/counter 1 has two CC channels. All information related to CC channels 3 and 4 is valid only for timer/counter 0. Only Timer/Counter 0 has the split mode feature that split it into two 8-bit Timer/Counters with four compare channels each. The USB module is a USB 2.0 full speed (12Mbps) and low speed (1.5Mbps) device compliant interface. The USB supports 16 endpoint addresses. All endpoint addresses have one input and one output endpoint, for a total of 31 configurable endpoints and one control endpoint. Each endpoint address is fully configurable and can be configured for any of the four transfer types; control, interrupt, bulk, or isochronous. The data payload size is also selectable, and it supports data payloads up to 1023 bytes. No dedicated memory is allocated for or included in the USB module. Internal SRAM is used to keep the configuration for each endpoint address and the data buffer for each endpoint. The memory locations used for endpoint configurations and data buffers are fully configurable. The amount of memory allocated is fully dynamic, according to the number of endpoints in use and the configuration of these. The USB module has built-in direct memory access (DMA), and will read/write data from/to the SRAM when a USB transaction takes place. To maximize throughput, an endpoint

Page 74: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

70

address can be configured for ping-pong operation. When done, the input and output endpoints are both used in the same direction. The CPU or DMA controller can then read/write one data buffer while the USB module writes/reads the others, and vice versa. This gives double buffered communication. Multipacket transfer enables a data payload exceeding the maximum packet size of an endpoint to be transferred as multiple packets without software intervention. This reduces the CPU intervention and the interrupts needed for USB transfers. For low-power operation, the USB module can put the microcontroller into any sleep mode when the USB bus is idle and a suspend condition is given. Upon bus resumes, the USB module can wake up the microcontroller from any sleep mode. The universal synchronous and asynchronous serial receiver and transmitter USART) is a fast and flexible serial communication module. The USART supports full-duplex communication and asynchronous and synchronous operation. The USART can be configured to operate in SPI master mode and used for SPI communication. Communication is frame based, and the frame format can be customized to support a wide range of standards. The USART is buffered in both directions, enabling continued data transmission without any delay between frames. Separate interrupts for receive and transmit complete enable fully interrupt driven communication. Frame error and buffer overflow are detected in hardware and indicated with separate status flags. Even or odd parity generation and parity check can also be enabled. The clock generator includes a fractional baud rate generator that is able to generate a wide range of USART baud rates from any system clock frequencies. This removes the need to use an external crystal oscillator with a specific frequency to achieve a required baud rate. It also supports external clock input in synchronous slave operation. When the USART is set in master SPI mode, all USART-specific logic is disabled, leaving the transmit and receive buffers, shift registers, and baud rate generator enabled. Pin control and interrupt generation are identical in both modes. The registers are used in both modes, but their functionality differs for some control settings. An IRCOM module can be enabled for one USART to support IrDA 1.4 physical compliant pulse modulation and demodulation for baud rates up to 15.2kbps.PORTC, PORTD, and PORTE each has one USART. Notation of these peripherals are USARTC0, USARTD0, and USARTE0, respectively. The Advanced Encryption Standard (AES) is a commonly used standards for cryptography. It is supported through an AES peripheral module, and the communication interfaces and the CPU can use these for fast, encrypted communication and secure data storage. The AES crypto module encrypts and decrypts 128-bit data blocks with the use of a 128-bit key. The key and data must

Page 75: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

71

be loaded into the key and state memory in the module before encryption/decryption is started. It takes 375 peripheral clock cycles before the encryption/decryption is done. The encrypted/encrypted data can then be read out, and an optional interrupt can be generated. The AES crypto module also has DMA support with transfer triggers when encryption/decryption is done and optional auto-start of encryption/decryption when the state memory is fully loaded. This microcontroller has an ADC with 12-bit resolution that is capable of converting up to 300 thousand samples per second (ksps). The input selection is flexible, and both single-ended and differential measurements can be done. For differential measurements, an optional gain stage is available to increase the dynamic range. In addition, several internal signal inputs are available. The ADC can provide both signed and unsigned results. The ADC measurements can either be started by application software or an incoming event from another peripheral in the device. The ADC measurements can be started with predictable timing, and without software intervention. It is possible to use DMA to move ADC results directly to memory or peripherals when conversions are done. Both internal and external reference voltages can be used. An integrated temperature sensor is available for use with the ADC. The AVCC /10 and the bandgap voltage can also be measured by the ADC.

4.4.6 Atxmega384C3 Features Summary

Nonvolatile program and data memories

o 384KBytes of in-system self-programmable flash

o 8KBytes boot section

o 4KBytes EEPROM

o 32KBytes internal SRAM

Peripheral features

o Two -channel DMA controller

o Four-channel event system

o Five 16-bit timer/counters

o One USB device interface

USB 2.0 full speed (12Mbps) and low speed (1.5Mbps) device compliant

32 Endpoints with full configuration flexibility

o Three USARTs with IrDA support for one USART

o Two two-wire interfaces with dual address match

o Two serial peripheral interfaces (SPIs)

o AES crypto engine

Page 76: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

72

o CRC-16 (CRC-CCITT) and CRC-32 generator

o 16-bit real time counter (RTC) with separate oscillator

o One sixteen-channel, 12-bit, 300ksps Analog to Digital Converter

o Two Analog Comparators with window compare function, and current sources

o External interrupts on all general purpose I/O pins

o Programmable watchdog timer with separate on-chip ultra-low power oscillator

Special microcontroller features

o Power-on reset and programmable brown-out detection

o Internal and external clock options with PLL and prescaler

o Programmable multilevel interrupt controller

o Five sleep modes

o Programming and debug interface

I/O and packages

o 50 programmable I/O pins

o 64-lead TQFP

o 64-pad QFN

Operating voltage

o 1.6 – 3.6V

Operating frequency

o 0 – 12MHz from 1.6V

o 0 – 32MHz from 2.7V

4.4.7 Atxmega32A4U The Atxmega32A4U is very similar to the Atxmega384C3 but the Atxmega32A4U has less processing power and les I/O pins this microcontroller might be fine because we might not need all those I/O pins from the Atxmega384C3 and/or the processing power. The AVR XMEGA A4U devices provide the following features: in-system programmable flash with read-while-write capabilities; internal EEPROM and SRAM; four-channel DMA controller, eight-channel event system and programmable multilevel interrupt controller, 34 general purpose I/O lines, 16-bit real-time counter (RTC); five flexible, 16-bit timer/counters with compare and PWM channels; five USARTs; two two-wire serial interfaces (TWIs); one full speed USB 2.0 interface; two serial peripheral interfaces (SPIs); AES and DES cryptographic engine; one twelve-channel, 12-bit ADC with programmable gain; one 2-channel 12-bit DAC; two analog comparators (ACs) with window mode; programmable

Page 77: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

73

watchdog timer with separate internal oscillator; accurate internal oscillators with PLL and prescaler; and programmable brown-out detection.

4.4.8 Atxmega32A4U Features summary

Nonvolatile program and data memories

o 16K-128KBytes of in-system self-programmable flash

o 4KBytes boot section

o 1KBytes EEPROM

o 2K-8KB internal SRAM

Peripheral features

o Four-channel DMA controller

o Eight-channel event system

o Five 16-bit timer/counters

o One USB device interface

USB 2.0 full speed (12Mbps) and low speed (1.5Mbps) device compliant

32 Endpoints with full configuration flexibility

o Five USARTs with IrDA support for one USART

o Two two-wire interfaces with dual address match

o Two serial peripheral interfaces (SPIs)

o AES crypto engine

o CRC-16 (CRC-CCITT) and CRC-32 generator

o 16-bit real time counter (RTC) with separate oscillator

o One sixteen-channel, 12-bit, 300ksps Analog to Digital Converter

o Two Analog Comparators with window compare function, and current sources

o External interrupts on all general purpose I/O pins

o Programmable watchdog timer with separate on-chip ultra-low power oscillator

Special microcontroller features

o Power-on reset and programmable brown-out detection

o Internal and external clock options with PLL and prescaler

o Programmable multilevel interrupt controller

o Five sleep modes

o Programming and debug interface

I/O and packages

o 34 programmable I/O pins

o 44-lead TQFP

Page 78: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

74

o 44-pad QFN

Operating voltage

o 1.6 – 3.6V

Operating frequency

o 0 – 12MHz from 1.6V

o 0 – 32MHz from 2.7V

4.4.9 Arduino Due

Let’s start with the Arduino Due, this board comes with an AT91SAM3X8E 32-bit ARM core that allows operations on 4 bytes wide data with a single CPU clock. The CPU is clocked at 84 Mhz and it has 96 Kbytes of SRAM and 512 Kbytes of Flash memory for code which should be enough for the type of project that we are doing which is just controlling a couple of sensors and sending data via WiFi. The input voltage is 3.3v which is very standard amongst microcontrollers. It has 54 I/O pins of which 12 provide PWM output this will be more than enough for us since we just need to control 5 motors at most. It comes with 12 analog input pins and 2 analog outputs pins. The sensors that will use the analog pins will be the proximity sensors, we would only have at most 6 so we should be fine. This microcontroller can be powered either with USB (5V) or with DC power jack (7-12V). Each of the 54 digital pins on the Due can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 3.3 volts. Each pin can provide (source) a current of 3 mA or 15 mA, depending on the pin, or receive (sink) a current of 6 mA or 9 mA, depending on the pin. They also have an internal pull-up resistor (disconnected by default) of 100 KOhm. Each of the 12 analog inputs can provide 12 bits of resolution (i.e. 4096 different values). By default, the resolution of the readings is set at 10 bits, for compatibility with other Arduino boards. It is possible to change the resolution of the ADC with analogReadResolution(). The Due’s analog inputs pins measure from ground to a maximum value of 3.3V. Applying more than 3.3V on the Due’s pins will damage the SAM3X chip. The analogReference() function is ignored on the Due. For communications, the Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers, and different devices like phones, tablets, and cameras and so on. The SAM3X provides one hardware UART and three hardware USARTs for TTL (3.3V) serial communication. The Programming port is connected to an ATmega16U2, which provides a virtual COM port to software on a connected computer (To recognize the device, Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically.). The 16U2 is also connected to the

Page 79: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

75

SAM3X hardware UART. Serial on pins RX0 and TX0 provides Serial-to-USB communication for programming the board through the ATmega16U2 microcontroller. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1). The Native USB port is connected to the SAM3X. It allows for serial (CDC) communication over USB. This provides a serial connection to the Serial Monitor or other applications on your computer. It also enables the Due to emulate a USB mouse or keyboard to an attached computer. We really like the feature of being able to emulate a USB mouse or keyboard but I don’t think we would be needing this features. Programming this board by uploading sketches to the SAM3X is different than the AVR microcontrollers found in other Arduino boards because the flash memory needs to be erased before being re-programmed. Upload to the chip is managed by ROM on the SAM3X, which is run only when the chip's flash memory is empty. We really like the Arduino Due and it features it has but I think it would be awesome if it had WiFi integrated which would make things way easier.

4.4.10 Arduino Due Features Summary

Microcontroller AT91SAM3X8E

Operating Voltage 3.3V

Input Voltage (recommended) 7-12V

Input Voltage (limits) 6-16V

Digital I/O Pins 54 (of which 12 provide PWM output)

Analog Input Pins 12

Analog Outputs Pins 2 (DAC)

Total DC Output Current on all I/O lines

130 mA

DC Current for 3.3V Pin 800 mA

DC Current for 5V Pin 800 mA

Flash Memory 512 KB all available for the user applications

SRAM 96 KB (two banks: 64KB and 32KB)

Clock Speed 84 MHz

Length 101.52 mm

Width 53.3 mm

Weight 36 g

Page 80: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

76

4.4.11 BeagleBone Black

Next is the BeagleBone Black, is the newest member of the BeagleBoard family. It is a lower-cost, high-expansion focused BeagleBoard using a low cost Sitara XAM3359AZCZ100 Cortex A8 ARM processor from Texas Instruments. It is similar to the Beaglebone, but with some features removed and some features added. The processor is clocked at 1Ghz which is way faster than the Arduino Due. It has and HDMI interface and 512MB of DDR3L running at 800MHZ which is very nice. This is a diferent beast than the Arduino Due, the BeagleBone Black can actually run Android, FreeBSD, Nintendo, Gentoo, ArchLinux, LinuxCNC, Minix, XNU, Asterisk, and TIEZSDK. That is way more than we need for our project. This BeagleBoard has four boot modes: eMMC Boot...This is the default boot mode and will allow for the fastest boot time and will enable the board to boot out of the box using the pre flashed OS image without having to purchase an SD card or an SD card writer. SD Boot...This mode will boot from the uSD slot. This mode can be used to override what is on the eMMC device and can be used to program the eMMC when used in the manufacturing process or for field updates Serial Boot...This mode will use the serial port to allow down loading of the software direct. A separate USB to serial cable is required to use this port. USB Boot...This mode supports booting over the USB port. Out of all the booting options we most likely be suing eMMC boot since is the most standard and the default boot mode. I don’t see any need to boot from another booting mode. This Board has miniUSB connector that connects the USB0 port to the processor which is a nice feature to have. It has a serial debug port which is provided via UART0 on the processor via a single 1x6 pin header. In order to use the interface a USB to TTL adapter will be required. The header is compatible with the one provided by FTDI and we can purchase one for about $12 to $20. But I don’t think we are going to use this feature. As stated above the BeagleBone Black comes with a single HDMI interface which is connected to the 16 bit LCD interface on the processor. The 16b interface was used to preserve as many expansion pins as possible to allow for use by the user. The NXP TDA19988BHN is used to convert the LCD interface to HDMI and convert the audio as well. The signals are still connected to the expansion headers to enable the use of LCD expansion boards or access to other functions on the board as needed. The HDMI device does not support HDCP copy protection. Support is provided viaEDID to allow the SW to identify the compatible resolutions. Currently the following resolutions are supported via the software:

Page 81: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

77

1280 x 1024 1440 x 900 1024 x 768 1280 x 720 The BeagleBone Black has the ability to accept up to four expansion boards or capes that can be stacked onto the expansion headers. The word cape comes from the shape of the board as it is fitted around the Ethernet connector on the main board. This notch acts as a key to insure proper orientation of the cape. The majority of capes designed for the original BeagleBone will work on the BeagleBone Black. The two main expansion headers will be populated on the board. There are a few exceptions where certain capabilities may not be present or are limited to the BeagleBone Black. These include: GPMC bus may NOT be available due to the use of those signals by the eMMC. If the eMMC is used for booting only and the file system is on the SD card, then these signals could be used. Another option is to use the SD or serial boot modes and not use the eMMC. The power expansion header is not on the BeagleBone Black so those functions are not supported. The main Power Management IC (PMIC) in the system is the TPS65217C which is a single chip power management IC consisting of a linear dual-input power path, three step-down converters, and four LDOs. The system is supplied by a USB port or DC adapter. Three high-efficiency 2.25MHz step-down converters are targeted at providing the core voltage, MPU, and memory voltage for the board. The step-down converters enter a low power mode at light load for maximum efficiency across the widest possible range of load currents. For low-noise applications the devices can be forced into fixed frequency PWM using the I2C interface. The step-down converters allow the use of small inductors and capacitors to achieve a small footprint solution size.LDO1 and LDO2are intended to support system standby mode. In normal operation, they can support up to 100mA each. LDO3 and LDO4 can support up to 285mA each. By default only LDO1 is always ON but any rail can be configured to remain up in SLEEP state. In particular the DCDC converters can remain up in a low-power PFM mode to support processor suspend mode. The TPS65217C offers flexible power-up and power-down sequencing and several house-keeping functions such as power-good output, pushbutton monitor, hardware reset function and temperature sensor to protect the battery. A 5VDC supply can be used to provide power to the board. The power supply current depends on how many and what type of add-on boards are connected to the board. For typical use, a 5VDC supply rated at 1A should be sufficient. If heavier use of the expansion headers or USB host port is expected, then a higher current supply will be required. The connector used is a 2.1MM center positive x 5.5mm outer barrel. The 5VDC rail is connected to the expansion

Page 82: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

78

header. It is possible to power the board via the expansion headers from an add-on card. The 5VDC is also available for use by the add-on cards when the power is supplied by the 5VDC jack on the board. The design will support standard DDR3 and DDR3L x16 devices. A single x16 device is used on the board and there is no support for two x8 devices. The DDR3 devices work at 1.5V and the DDR3L devices can work down to 1.35V to achieve lower power. The specific Micron device used is the MT41K256M16HA-125. It comes in a 96-BALL FBGA package with 0.8 mil pitch. Other standard DDR3 devices can also be supported, but the DDR3L is the lower power device and was chosen for its ability to work at 1.5V or 1.35V. The standard frequency that the DDR3L is run at on the board is 303MHZ. The EEPROMs on each expansion board are connected to I2C2 on connector P9 pins 19 and 20. For this reason I2C2 must always be left connected and should not be changed by SW to remove it from the expansion header pin mux settings. If this is done, then the system will be unable to detect the capes. The I2C signals require pull-up resistors. Each board must have a 5.6K resistor on these signals. With four capes installed this will be an effective resistance of 1.4K if all capes were installed and all the resistors used were exactly 5.6K. As more capes are added the resistance is reduced to overcome capacitance added to the signals. When no capes are installed the internal pull-up resistors must be activated inside the processor to prevent I2C timeouts on the I2C bus. The BeagleBoard Black has a lot of features that we have to get accustom with and experiment with. I think that this board is going to be essential to our project because we need the ability to stream video to a tablet, therefor we need to have a good processor. We would have to do some test but I think that this board is going to be a good candidate.

Page 83: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

79

4.4.12 BeagleBoard Black Features Summary

Table 13 – BeagleBone Black Specs.

4.4.13 Raspberry Pi Model B+ The next microcontroller that we are thinking of using is the Raspberry Pi Model B+ sized computer board that's up and running when a keyboard, mouse, display, PSU and MicroSD card with installed OS are added. It’s a miniature ARM-based PC which can run many of the applications that normally require a desktop PC, like spreadsheets, word-processing and games. It also plays High-Definition video. Model B+ features lower power consumption, better audio performance and a 40-pin GPIO connector amongst other improvements over the earlier model. This board uses a Broadcom BCM2835 700MHz ARM1176JZFS processor with FPU and VideoCore IV dual-core GPU. The GPU provides Open GL ES 2.0,

Page 84: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

80

hardware-accelerated OpenVG, and 1080p30 H.264 high-profile decode GPU is capable of 1Gpixel/s, 1.5Gtexel/s or 24GFLOPs with texture filtering and DMA infrastructure which is a very nice feature to have. The board comes with 512MB SDRAM, HD 1080p video output, Composite video (PAL/NTSC) output, Stereo audio output10/100 BaseT RJ45 Ethernet socket, HDMI 1.3 & 1.4 video/audio socket 3.5mm 4-pole audio/composite video out jack socket, 4 x USB 2.0 sockets 15-way MPI CSI-2 connector for Raspberry Pi HD video camera, 15-way Display Serial Interface connector, and MicroSD card socket. Is nice to have all these features already implemented on a board.

4.4.14 Raspberry Pi B+ Features Summary

Figure 16 – Raspberry Pi Specs

Page 85: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

81

4.4.15 UDOO The last microcontroller we looked at was the UDOO which is a single board computer that can be used both with Android and Linux, paired with an Arduino-compatible processor. It is a powerful prototyping board for software development and design; it’s easy to use and allows developing projects with minimum knowledge of hardware design. UDOO merges different computing worlds together: each one has its proper strengths and weak points, but all of them are useful in today’s life for educational purposes as well as Do-It-Yourself (DIY) and quick prototyping. UDOO is an open hardware, low-cost platform equipped with an ARM i.MX6 Freescale processor, and an Arduino Due compatible section based on ATMEL SAM3X8E ARM processor, all this available on the same board! The UDOO board has a Freescale i.MX6Quad, 2\4 x ARM® Cortex™-A9 core @ 1GHz with ARMv7A instruction set. It has a GPU Vivante GC 2000 for 3d + Vivante GC 355 for 2d (vector graphics + Vivante GC 320 for 2d). This board has an Atmel SAM3x8E ARM Cortex-ME CPU which is the same CPU that is on the Arduino Due. It has 1GB of DDR3 RAM and 76 fully available GPIO with Arduino compatible R3 1.0 pinout. It comes with HDMI and LVDS + Touch, 2 micro USB, and 2 USB 2.0 type A and 1 USB 2.0 internal pin header. It has analog audio and mic jacks. It has a WiFi module which would be very helpful for our project, since we would be using the WiFi to connect the tablet with the car.

4.4.16 UDOO Features Summary

Freescale i.MX 6 ARM Cortex-A9 CPU Dual/Quad core 1GHz Integrated graphics, each processor provides 3 separated accelerators for

2D, OpenGL® ES2.0 3D and OpenVG™ Atmel SAM3X8E ARM Cortex-M3 CPU (same as Arduino Due) RAM DDR3 1GB 76 fully available GPIO Arduino-compatible R3 1.0 pinout HDMI and LVDS + Touch (I2C signals) Ethernet RJ45 (10/100/1000 MBit) WiFi Module Mini USB and Mini USB OTG USB type A (x2) and USB connector (requires a specific wire) Analog Audio and Mic SATA (Only Quad-Core version) Camera connection Micro SD (boot device) Power Supply 12V and External Battery connector

Page 86: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

82

4.4.17 Conclusion

Deciding on the “right” microcontroller is a difficult task because of so many types and models are available that is hard to make a decision. First we have to identify what’s going to be the purpose of the microcontroller and what exactly do we need it for. This question is hard to answer in an early stage of development because we don’t know how everything will interact with each component or if is even possible at all. With the experience that we have is hard to determine if this microcontroller will be sufficient for our job. Another challenge when dealing with a microcontroller is how we are going to program it and how we are going to interface with it. In the case of this microcontroller it comes with USB capabilities witch will helps us a lot.

For this project we will need probably different microcontrollers: One main microcontroller that will process all data on the car and transmitted to the tablet or anything that is connect it to it (in this case it will be via WIFI). The other microcontroller will mostly be the for the WIFI radio and the one that will actually process the transmitting and receiving of the data that will go to the main microcontroller which in turn regulate acceleration, turning, and sensor data. One more microprocessor will be in charge of image processing and passing the data to the main microprocessor. After looking at some microcontrollers and what their capabilities are we have concluded that we are going to use the BeagleBoard Black because it has a 1Ghz processor and 512MB or RAM which will be very helpful for streaming live video to the tablet. It also has other nice features like USB and HDMI that we can use for connecting a WiFi USB or a monitor and work on the microcontroller like working with a normal computer. Also, it runs an operating system so it would be perfect for getting Open CV running on it. Using something like the BeagleBoard will mean that we won’t have to use a separate microcontroller to receive or send WiFi because we can plug in a USB WifI adapter to it, which will make things a lot easier.

4.5 Programming For this project the programming is going to be separated between the microcontrollers and the tablet which will be where the user interacts with the car. For the microcontrollers the programming will mostly in C or C++ and for the tablet we have 3 option: JAVA, C#, or C++. Below we describe some pros and cons of each one. C# is better than C++ in that it has native garbage-collection. It allows you to treat class-methods’ signatures as free functions, and create more dynamic and flexible relationships between classes. It has a huge standard library with so much useful

Page 87: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

83

stuff that’s well-implemented and easy to use. It allows for both managed and native code blocks. C# lets you set classes, methods and fields to be assembly-internal which means they are accessible from anywhere within the DLL they’re declared in, but not from other assemblies. C# is better than Java in that instead of a lot of noise with EJB, private static class implementations, etc. you get elegant and friendly native constructs such as Properties and Events. In C# you have real generics not the bad casting joke that java calls generics, and you can perform reflection on them. C# has Lambdas and LINQ, therefore supporting a small amount of functional programming. It allows both generic covariance and contra variance explicitly. It also has dynamic variables if we want to use them. All these factors make C# a better choice to develop but the biggest problem is that Android uses JAVA natively so it is faster to get started programming with JAVA since there is no configuration or other software to download. Our team is also more experience with JAVA and with using JAVA to program Android applications. To make an Android application in C# we would have to download something called Mono that would enable us to export our code into the Android device. Writing code with C++ is more challenging. To write C++ code for an Android operating system we would need the Android NDK which is a companion tool to the Android SDK that lets developers build performance-critical portions of an app in native code. It provides headers and libraries that allows the building of activities, and handle user input, use hardware sensors, access application resources, and more. Native code applications still get packaged into an .apk file and they still run inside of a virtual machine on the device. Another good thing is that the fundamental Android application model does not change. Using native code does not result in an automatic performance increase, but always increases application complexity which we don’t want to happen because nobody in our group is very experience with C++. The Android page recommends that unless developers run into any limitations using the Android framework APIs, then we probably don’t need the NDK. So, unless we are doing some very performance intensive stuff that will choke the application when programming in Java, then we should stay away from programming with the NDK. It’s a lot messier and more difficult to write NDK code properly unless you really know what you are doing and have a strong knowledge of C++ which we don’t have. Therefore, we would not be coding the android app using C++.

4.5.1 Programming Language Conclusion With C++ out of the question, the decision is between Java and C#, but since nobody in our group is familiar with C# and Mono then we decided that we are

Page 88: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

84

going to use JAVA for android programming. We choose Java also, because one member of our team already is familiar with Java and has programmed two android applications.

4.5.2 Microcontroller Programming For the main microcontroller the programming will be more challenging than the tablet because on the main microcontroller is where we are going to do the logic of the car so we have to implement and algorithm that will take sensor data and be able to follow the car in front. The microcontroller logic will go something like this:

Figure 17 – Microcontroller Logic

As we see in the drawing above the basic idea is that the microcontroller will wait for a signal to be received and then chose the path it needs to go depending on

Page 89: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

85

the signal. If the tablet has the autonomous switch OFF then the microcontroller will go to a mode that just listens for command from the tablet. As long as the switch in the tablet stays OFF the microcontroller will let the tablet drive the robot. If the switch changes to the ON position then the microcontroller takes the right path in the drawing above and starts execution the autonomous code. Is going to be tricky to implement this separation in the microcontroller because it will always have to be checking if autonomous is disable or enable. I think the best way is to use an interrupt that will let the microcontroller know when it has to change to another state. The microcontroller by default, will start on manual mode because we have to drive the car manually first to scan for target. Once a target has been seen the microcontroller will change to autonomous mode and follow the other car, the user can then switch back to manual if he wants. We can also implements something that if the car detects a target it sends a command to the tablet to inform the user that a target has been detected and ask the user if he would like to change to autonomous mode automatically. This way the user has total control of what the car is doing and would be able to decide if he want autonomous mode or keep controlling the car manually. Letting the user decided if he wants to change to autonomous mode after the car has detected a target could be very risky because the user can take some time to decide and if he decides he wants autonomous then the target might have been gone from view already, which will put the robot in an unknown state because it won’t be able to find the target. Because of the side effect I don’t think we are implementing this feature. We have to let the car switch as fast as possible to autonomous so that the car we are chasing does not go out of site. The user of course can change back to manual at any time. We could have another problem with this implementation, and that is that if the robot sees a target it will automatically change to autonomous, if at that point the user changes to manual and the target is still close the car will change back to autonomous and this could be an endless cycle. To take care of this scenario we could have a check to see how long ago the user changed to manual. If the car changed to autonomous and the user changed to manual then the robot will wait some time before changing back to autonomous. We could also have to user control when the robot changes back to autonomous that way the user will have complete control of what the robot is doing.

4.5.3 Tablet Programming The programming on the tablet will still be challenging because we have to set up a graphical user interface that communicates with the microcontroller via WiFi. For the Android application we will just have one class that will handle the connection and the main activity class which will do the displaying of the GUI and handling user input. The GUI will have to support multi touch because if the tablet is in

Page 90: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

86

manual mode then we want the user to be able to press a direction button at the same he is pressing the forwards or backwards button. This is important because the user would have a hard time trying to control the car since he/she will have to turn first and then click the forward button and then click the turning button. This could be avoided if we just implement a joystick kind of component where it has 360 degrees of rotation so the user will just drag the button in the direction he/she wants and the car will maintain speed while turning. The joystick method will required no multi touch implementation and it will be more intuitive for the user. It will also prevent cases were the user clicks the forward button and the same time he is clicking the backwards button which it will be possible with multi touch but impossible with the joystick implementation. Pushing the forwards and backwards button will cause unexpected results so we have to avoid that method or create a check to make sure we are handling those impossible cases. Another way of letting the user control the car is to use an external device like a ps2 controller for example. This device will attach to the tablet and we would just have to receive and translate the input from that device and pass it to the microcontroller. Using an external controller requires more coding and knowledge of how to receive input from and external device. This method would be the most intuitive for the user because it will be something that they can physically hold and it just feel natural. There is an app on the google play store called Sixaxis Controller that connect a ps3 controller via Bluetooth and once the controller is connected it lets you select the input method that you want to use, so if we selected the ps3 controller then the whole tablet would be controlled with the ps3 controller. This will enable us to control our application using the ps3 controller which would be the best option for driving the car. Since the ps3 controller will be always close to the tablet we won’t have any problems with the connection strength or having the ps3 controller disconnect in the middle of driving.

Below is a high level class diagram for the tablet application that shows the main classes. The main activity class is the entry point of the application and where everything is going to be controlled from. I have added a helper class called Connect.java which is going to be responsible for connecting to the car or the router via WiFi. Ideally the Connect.java class will establish a connection and inform the main activity class that a connection has been stablished and pass the connection object so that the main activity class can send and receive information to/from the network. Some of the features of the main activity class is to get the input from the user. The most important input will be the input that drives the car which is going to be implemented with the ps3 controller. We would have to translate the input from the

Page 91: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

87

ps3 controller and send it to the car using the sendCommand() method. Other important methods that we need to implement are getSwitchState() which is a simple method that determines in what state the switch so that we can determine if we are running manual or autonomous. The method getImage() is also important because it will be the method that is going to display the stream images coming from the car.

Figure 18 – Java Class

4.6 Tablet User Interface The tablet user interface is going to be the place where the user is able to interact with the car. The user will have an option to switch between manual operation and autonomous operation. If the user has the manual operation switched on then he/she will be able to control the car acceleration and turning. If the user switches to the autonomous mode then the car will start looking for something to follow and work autonomous. The user will also have an option to connect to the car via WiFi and see the video stream from the camera of the car. For the car and the tablet to communicate we will probably have to have a router so that both devices can connect to the router

Page 92: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

88

and be able to talk to each other. The other way is to have the BeagleBone WiFi set up as Ad-Hoc, this will not require any router and it will let the tablet connect to the car directly with no other external hardware (like a router). Setting up an Ad-Hoc might be a little tricky because we don’t know on what mode we have to set the wireless interface on the BeagleBone to work on an Ad-Hoc mode. Ad-Hoc might not work on Android devices probably because Android devices don’t want to deal with the problems of Ad-Hoc networks and will refuse to connect to them, only connection to networks in infrastructure mode. If this is the case then there is not much we can do about this other than to get a router and have the tablet and BeagleBone connect to the router. The router option might be the best because this way we can supply internet to the BeagleBone to do multiple things like downloading a Linux package if we need to. We can connect an Ethernet cable for the internet to the router but this would mean that the router would have to be stationary which is alright for our project, but in case we don’t have a Ethernet port where we have to do the demo then we would have to use a laptop that connects to the router and bridges the connection so that every device that is connected to the router is connected to the internet using the laptops internet which would be connected via WiFi to the schools network. Below is a diagram that represents in a high level the basic flow of the Android application which is very simplified. The user will start the application and if it is started for the first time then the setting for the WiFi would be blank but if the user has started the application before and added a setting for connecting to the WiFi network then the next time the user launches the application it will try to connect to that same WiFi just like a laptop would when it has a saved WiFi network. If the user launches the application for the first time he would see a list of SSIDs of the nearest WiFi networks that he could connect to, once the user selects the WiFi network he/she would have to type the password to join the network if there is a password (we are going to set up a password on the router). Once the user connects successfully the connected “LED” on the application graphical user interface will turn green to indicate that the tablet is connected to the network successfully. Once the user connects successfully the tablet will be on manual mode by default and should be able to drive the robot with the ps3 controller with no problems. When the user drives the car around the car will be “analyzing” license plates and determining if the license plate is a targeted license plate. If the car finds a license plate then it enters in an autonomous chasing mode and the user will no longer be driving the robot around and on the graphical user interface the “Turn on Autonomous” switch will be ‘on’. The user can override this and put the car back in manual mode, which will immediately stop the car from chasing.

Page 93: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

89

If for some reason the car or the tablet lost connection to the router then the car will stop doing whatever the car was doing no matter if it was in autonomous mode. If the car was in autonomous mode and the signal was lost; when the car reconnects again it will not back to autonomous mode, instead it will go to manual mode just like if it was turn on for the first time.

Figure 19 – Application Start Process

The graphical user interface will have some kind of control to switch from manual or autonomous, it will have a way to control the car only if the manual option is selected. The graphical user interface will also have some way of establishing a connection between the tablet and the car via WIFI. It will also have an indicator to show the user if the tablet is connected to the car.

Manual Mode Autonomous

Mode

Start application

Select MODE

Send command to

put the robot on

manual

Send command to

start autonomous

logic

Car receives

command and

executes code

Page 94: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

90

The tablet could also display some other useful features like sensor data, show a video stream from the camera, etc. The two images below demonstrate visually how the tablet GUI will look like with the autonomous button on and off. In the ‘ON’ case the controls to drive the car are greyed out, which means that the user cannot do anything with them. In the ‘OFF’ case the controls to drive the car are enabled and working.

Figure 20 – Tablet Proposed GUI #1 Autonomous

Page 95: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

91

Figure 21 – Tablet Proposed GUI #1 Manual Mode

4.7 Power Hardware Design A very important aspect is how the power supply is going to work. There are two considerations that will be use in the design of the power supply. The first option to be consider is to have a power supply for each subcomponent. The second options is to have a main power supply to power all of the subsystems. There are many advantages and disadvantages with this two options. Multiple power supplies can be good to the design, because it is an easier way to implement and make sure each system is obtaining the voltage required. Also ensures that other loads in the system, are not drawing power from the same source, in case one of them goes low, the other systems will not malfunction. A disadvantage of using this approach is space, with the many power sources for each subsystem, the car it is going to get crowded. On the other hand for the second option, an advantage of having only one power souse is that everything can be more compact and will allow for less wires in the connections. When dealing with too many wires, design connection may arise, having less wires eliminates more errors and may cause less circuit problems like wires touching.

Page 96: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

92

It is decided that option two, building one power system to power every component in the car is the best choice for the ACR car. Having decided on the power system to be used, it is a matter of choosing the battery. In order to satisfy the many requirements in our project, the correct battery must be carefully chosen. If the power provided to each of the subsystem is not right, then the ACR might malfunction and the system will not be efficient. For this reason, this are the main battery requirements to consider:

Low Memory effect, if possible none at all

Must be lightweight

High current discharge

Medium Nominal Voltage

Battery life must be at least 1-2 hours

Be able to provide at least 16Amps to the motors

Price must be reasonable

Must provide at least 12 Volts to the motors

Must have a high capacity

High energy density

Size must be suitable for the platform of the ACR car.

Centered on this requirements two main battery options arise. One, have a really high voltage battery and use it to power the source. Second option, is to have smaller batteries in parallel to produce the voltage requirement needed. The voltage that focused on is the 7.4 to 11.1 V batteries. It is decided that smaller batteries are a better choice because having just one batteries, is going to be heavy and bulky. Based on the requirements of the project, it is needed to keep a certain amount of weight so the speed and the dexterity of the car is not to be affected. The table below show a comparison of three batteries being considered.

Brand Venom Venom Tenergy

Model 1577 15352 31003

Chemistry Li-Po Ni-MH Li-Ion

Voltage (V) 11.1 7.2 7.4

Discharge rate (mAh)

2100 3000 2200

Charge rate 1C (2.1 Amps) 1C(3Amps) 1C (2.0amps)

Weight (ounces) 6.2 14.4 3.2

Capacity (C) 20 10 2.5

Page 97: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

93

Price $19.99 $17.99 $13.99

Table 14 - Batteries Comparison

The research showed that these three types of batteries: Ni-MH, Li-ion and Li-Po all have good battery life. Even though the batteries have great performance, Li-ion and Li-Polymer batteries are going to be looked more in detail. The reason Ni-MH is to be discarded as an option is because comparing it with the Li-Po the capacity is not as high. Also the battery weighs about 14.4 ounce, being relatively heavier than the Li-Po and the Li-Ion. In the other hand, the Li-Po battery meats all the requirements needed for the ACR. Capacity is a big factor in the selection, the table shows that there is a big margin between the Li-Po battery and the Lithium Ion. The requirements expect at least 16 amps be provided to the motors. The best option is the use of two batteries in parallel instead of using just one battery. In order to figure the maximum current that the battery can discharge; the following

equation must be use 𝑀𝑎𝑥𝑖𝑚𝑢𝑚 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 = 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 ∗ 𝐷𝑖𝑠𝑐ℎ𝑎𝑟𝑔𝑒 𝑅𝑎𝑡𝑒. Even though the discharge rate represents the current for only one hour, it serves as a reference point and warning not to exceed that rating when the system is performing. Two batteries are going to be used, at least 8.5 A of current should be drawn from each battery. Referring back to the table # comparing the Lithium Ion and Li-Po batteries. The Li-Ion battery is cheaper and also has a higher discharge rate, but the capacity of the battery is 4 times less than the capacity of the Li-Po battery. The Li-ion if we use the formula for Maximum current, it will only produce 5.5 A per battery, which is really low for what the ACR requires. In contrast the Li-Po battery is able to produce 42 Amps. The difference in cost between the two is about $6 dollars, which based on the amounts of current the Li-Po provides, it is a fair trade off.

4.7.1 Battery Selected The battery in figure 22 is the battery selected to use for the power source in the ACR car. The battery is a Venom 11.1 2200mAh rechargeable battery pack. From table 14 it was clear that the battery offered more amps of currents and a higher capacity than any of the other batteries. The battery is not affected by memory effect and can provide more power than any of the other batteries. A good characteristic is that the weight of the battery is light, not having to worry about the weight affecting the performance of the ACR.

Page 98: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

94

Figure 22 11.1 V Li-Po battery pack (Permission Granted by Atomic RC)

4.7.2 Charger Selection: Figure 23 shows the Charger selected for the ACR car. The main reason of looking for a charger instead of building one was for the efficiency the product brings and safety. Many people who tried to design the circuit end up overheating or even damaging the battery. Also, it is inefficient and considering that the Lithium Ion Polymer battery needs a balancer, building it will be time consuming.

Figure 23 Tenergy TB6-B 50 W Balancing Charger

(Permision Granted by Tenergy)

Having so many different components in the ACR car it is imperative that we take the safe route and buy the charger. The selected charger was the Tenergy 50 watts balancing charger. Some key features the charger has are:

Built in Balancer

Operating Voltage: DC 11-18 Volts, AC 100-240 V

Charge/Discharge power: max 50/5 watts

Ni-Cd/MH: 1 to 15 cells

Li-lon/Li-Po/Li-Fe: 1 to 6 series

Charge current: 0.1 to 5.0 A

Discharge current: 0.1 to 1.0 A

Page 99: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

95

The charger is a great choice because it allows the Lithium Polymer battery to be charge efficiently and prevents overheating and malfunction of the battery. A drawback is that it does not include an AC power cord, therefore one must be provided. The battery charger has a price of $45.99 on Amazon.com. The price is a little bit high for what the group planned, but emails have been sent in order to contact other stores and retailers to see if a better offer is available for the product.

4.7.3 Voltage Regulator: In order to create the circuit for the voltage regulators, table # provides the voltage and current requirements each subcomponents needs in order to work properly.

Items Input Voltage (volts) Input current (mA)

Distance Sensor 5 <2

HS-422 Standard Deluxe Servo

4.8 to 6.80 Information to be acquired

Electric DC motor 7.4V 10,000

Microcontroller 1.6-3.6 12 mA at (3.0V)

XBee Wi-Fi 2.1-3.6 700-450

Table 15 Voltage Requirements for Subsystems

Webench: The program is a design tool from Texas Instruments that is going to assist in the design selection of the voltage regulator circuit needed to supply the ACR Car. The tool provides the user with some relative information like:

Efficiency of the system

Heat distribution

Parts needed to build the circuit

Cost of the circuit

Microcontroller Voltage Regulator: The microcontroller that has been chosen for the ACR car is the TPS562200 Low Iq Synchronous Buck converter. The voltage regulator was design using the Texas Instrument Webench architect tool which allows for multiple loads. The regulator has a 91% efficiency, allowing for a better use of the battery. Figure 24 shows the schematic design for the microcontroller voltage regulator.

Page 100: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

96

Figure 24 Power Supply Microcontroller Voltage Regulator

Motor Voltage regulator: The voltage regulator chosen to control the voltage and current flowing to the motors is the TPS40305 Synchronous buck converter. The voltage regulator was design using the Texas Instrument Webench architect tool which allows for multiple loads. The regulator has an impressive 95% efficiency, allowing for a better use of the battery. Figure 25 shows the schematic design for the microcontroller voltage regulator.

Figure25 Power Supply Motor Voltage regulator

Based on Figure # the distribution of power is clear. The two Li-Po batteries are going to be the power source for the ACR car. Even though 1 battery is going to have sufficient power for all the components, two batteries are ideal for the

Page 101: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

97

reliability of the system. The minimum requirement for the power of the ACR to last is 1 hour, having two batteries ensure that the power supply will not malfunction or drain too rapidly. There will be switch voltage regulators using a step down converter which will regulate the voltage needed for each subsystems. One will regulate the voltage for the motor and the other one will regulate the voltage to the microcontroller and the other subsystems. Figure 26 shows a block diagram that represents how the power is to be distributed among the subsystems:

Figure 26 Power Distribution Block Diagram

4.8 Wireless Technology Design Based on the research, using Wi-Fi technology for the ACR car is the most beneficial. Wi-Fi technology had many key features, that simply the other types of wireless technology lack. For example: having great connectivity range of over 100 meter. Also it has high data rates as seen on table 26 depending on the 802.11 standard being use, speeds can be in the 54 Mbps and up to the 600 in the case of the IEE standard 802.11n.

Power Supply:

(2) 11.1 V Li-Po Batteries

Voltage

Regulator

Voltage

Regulator

Wi-Fi Distance

Sensor Camera

Microcontroller Motor

Image

Processor

Page 102: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

98

In the Wi-Fi technology, three main products arise. One of them is Texas instrument Wi-Fi module product CC3100 SimpleLink Wi-Fi and Internet-Of-Things solution for MCU application. The second product is the Xbee Wi-Fi Module. The third product is the Edimax EW-811Un Wi-Fi USB adapter. These three products shows great promise to the ACR car and will be cover more in depth.

4.8.1 CC3100 SimpleLink Wi-Fi module:

The CC3100 SimpleLink Wi-Fi module it is a tool that allows any low cost, low-power microcontroller to connect to the Internet of things (IoT). The product allows to ease and simplify the internet connection. The CC3100 has integrated in it all the protocols needed for Wi-Fi and Internet. This allows to greatly minimize software requirements by the host microcontroller (MCU). The main key features are:

Wi-Fi Network Processor Subsystem o Wi-Fi Internet-On-a-Chip o Offload Wi-Fi and Internet Protocols from the External MCU o Has 802.11b/g/n Radio control o TCP/IP Stack o Station, AP, and Wi-Fi Direct Modes o Allows for WPA2 Personal Security o Application Throughput

UDP: 16Mbps TCP: 12Mbps

Power-Management Subsystem o Needs a 2.1 to 3.6 Volts to operate

Ambient Temperature Range: -40 degrees Celsius to 85 degrees Celsius

The Internet-On-a-Chip is a technology that is allowing embedded devices connect to the internet. The expected use of this technology in 2020 is in the 30 billion allowing devices communicate with each other.

4.8.2 XBee Wi-Fi Module with Wire Antenna:

XBee Wi-Fi Module with wire antenna it is a low power-Low cost solution for the connection and implementation of internet in a device. It uses the 802.11 /g/n networks to communicate. Some of the key features of this technology are:

Uses 3.3 V at 309 mA to operate

It allows for a maximum data rate of 72 Mbps

Has 10 Digital I/O pins

Has AT and API for advance configuration options

This technology is very promising. One of the advantages is that is widely used by robotic hobbyist and there is plenty of information available in the implementation and interfacing of the device with a microcontroller. The XBee Wi-Fi many

Page 103: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

99

characteristics that makes it a desirable choice for the ACR car. These characteristics are:

Low current consumption

High data rates

Uses 802.11 standards which allows for long range

Up to 13 channels

The following are the most important characteristic that makes of the XBee Wi-Fi with wired antenna an undesirable choice for the ACR car:

Price ( requires an additional add on, in order to connect the device to the USB port of the computer to program it)

The wired antenna in the device might get easily damaged.

4.8.3 Edimax EW-7811UN Wi-Fi USB:

Edimax Wi-fi USB is the smallest of the three devices discussed. The features that makes the Edimax Wi-Fi Usb desirable for the ACR car are:

Supports 150 Mbps at the IEEE standard 802.11n

Power saving designed- supports auto-idle state when it is not in use

Supports WMM(Wi-Fi Multimedia) Standard

Includes a EZmax setup wizard for easy connectivity

Channels (FCC) at a frequency of 2.4 GHz

Very small

Security protocols (WEP, WPA-PSK)

Modulation OFDM: BPSK, QPSK, 16-QAM

The device shows great promise, because of it has a very low power consumption. Also it supports WMM (Wi-Fi Multimedia) which allows for a better real-time video streaming. This feature is very important because it will be needed when using the camera for a real-time video streaming experience to the user.

4.8.4 Conclusion The XBee Wi-Fi with wired antenna is the best choice for the ACR car. The decisive factor was the ease of use, and there is more information on how to use and connect the device. The device has Wi-Fi connectivity so the range of the connection meets the requirements for the project. Also the size is very small and is also light weight. This ensures that the performance and speed of the ACR car will not be affected by the XBee Wi-Fi. The device is able to use the protocols of encryption and protection of data WPA, WEP, and WPA2. This allows for a more secure transmission of data between the user and the receiver. Also, since video streaming is going to be enable, allows for sensitive data to be protected. Even though the device does needs at least 3.3 V to be turn

Page 104: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

100

on, it have different modes like sleep mode allows the device to use less power when it is not in use. The device has 10 I/O pins which are to be used for the transfer of information to the microcontroller. The device can use X-CTU which is a Digi’s XBee configuration software, providing an easy to use interface in order to modify all of the module’s setting of the device. Also it provides Wi-Fi network scanning allowing for an easy connection. In the other hand, a USB Explorer board it is need when connecting the XBee Wi-Fi board to the USB port of the computer being used to program the device. The USB Explorer board is about $25 dollars which will have to be added to the overall budget of the ACR car. The prices has been a tradeoff for the ease of connectivity of the device.

4.9 Inertial Measurement Unit (IMU) Design

To get the most accuracy we want to incorporate a 9 degrees of freedom IMU unit, which we will achieve by incorporating three sensors, an ITG-3200, which is a MEMS triple-axis gyro, a triple-axis accelerometer model number ADXL345 and HMC5883L which is a triple-axis magnetometer, all of these together provided nine degrees of freedom for inertial measurement, the processing will be done by a separate microcontroller than the one used for motor control, making it independent of the functioning from the main board, as this will be a separate safety mechanism, the outputs of all sensors are processed by an ATmega328.

Page 105: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

101

Figure 27 - Schematic for Gyro, Accelerometer, and Magnetometer Sensors

Figure 28 - Schematic for ATmega328.

4.10 Car Mechanical Dimensions

The chassis used for our project is a one that would be regularly used for a remote controlled car, it is a 1:4 scale go-kart with its low center of gravity and sticky tires which keep the kart turning sharply and allowing high speeds, it included a powerful full size servo is included with kart to keep the steering precisely and quick. Entire floor pan is made of 4mm Carbon fiber sheet for good protection of the equipment that will be on board. These are some of its specifications:

Length: 450mm

Width: (Front) 262mm / (Rear )305mm

Height: 201mm

Ground Clearance: 5~12mm

Top Speed Rated: 45~60km/h

Tyres: 56×30mm / 58×45mm

Pinion: 13T

Gear Ratio: 13:2.37

Page 106: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

102

Drive/Main Ratio: 13:47

T-Tube/Main Ratio: 20:30

Chassis Weight: 1,500g approximately.

The chassis can be observed from a top and a side view in figures # and # respectively.

Figure 29 - Top View of Chassis

In Figure 29 where we observer the top view, we see that there is predetermined space where the battery will be collocated, additional there is set spaces for other pieces of equipment including the electronic speed controller as well as the brushless DC motor, according to estimations made of the sizes of the rest of our parts we should be able to accommodate everything within the space accordingly

Page 107: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

103

Figure 30 - Side View, Including view of Tires.

5 PCB Vendor and Assembly A major requirement for Senior Design is the use of a printed circuit board (PCB) as part of the design. The use of a PCB allows all the subsystems to come together as one, making it look more compact and professional. In order to create the PCB, the need of a software program to assemble all the parts together is needed. For this reason, from the many available options, Eagle Cad was chosen. Eagle Cad has a free version which meet the minimum requirements in order to effectively build the PCB. Designing the PCB has many requirements that must be followed and taken into account. Many online websites offering the service are available, and will also accept multiple file formats in order to have a more pleasant experience while building the board. Having different options online, allows the easy comparison of prices, effectiveness, shipping delivery time. The most cost effective way but time consuming is to get a PCB and solder everything. The only drawback is the risk of soldering the wrong leads. Also, the probability of malfunction or a short accidentally created in the PCB is increased. The following are the PCB manufacturers being considered to build the PCB for the ACR car. OSH-Park: OSH-Park uses the method of community PCB order. The PCB that you order, is made at the same time with the order of other customer in order to take more advantage of the space. Also, this methods allows the manufacturer and the consumer to save money making the board. A disadvantage of using this method is that it will take more time for the board to be made, since the manufacturer waits for enough customers until the board is filled. They charge a

Page 108: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

104

flat fee of $5 dollar for shipping and handling. In the order, three PCBs are included in the price. Their price depends on the amount of layers the PCB have and also by square inch. For example: they charge $5.00 dollars per square inch, for a two layer PCB board, and $10.00 dollars per square inch for a 4 layer PCB design. Express PCB: Express PCB is different from OSH-Park because they are not based on a community order. Therefore the price fee for a board is going to be much higher. For example: for a 2 layer PCB, express PCB charges a flat fee of $51 dollars. For a 4 layer PCB board, they charge a $98.00 dollars flat rate. The order does include three PCB boards. If the customer pays $10 extra dollars a 2-day delivery of the board is guaranteed as long as the order is made on business day. Time is a major tradeoff to consider when choosing the appropriate manufacturer for the board.

6 Project Prototype Testing For this project just in like any other project it is important to make a prototype and or test the different subsystems of the ACR, some of these tests are described here and in the subsequent sections.

6.1 Hardware Test Environment The hardware is to be tested in an area that resembles a road, however the ideal and non-ideal conditions should be taken into account

6.2 Hardware Specific Testing

In this sections, we will discuss the method how to test each hardware component we chose in all previous section above. We have to go over one-by-one component to make sure every hardware working properly and then double check if they are able to implement the function we expected when we put all stuff together.

6.2.1 Ultra Sonic Sensors

Ultra sonic sensors will be used for the following performed by the autonomous vehicle, to ensure its functioning we will do some testing before implementing.

6.2.1.1 Sensor Testing

As we discussed in section 4.2 about all the type of sensors, we decide to use Ultrasonic with HC - SR04 model. Now, this is step by step how we test it:

1. Connect sensors to micro-controller: Vcc line to output of 5V DC voltage regulator, Trigger and Echo lines to I/O pins, GND line to ground pin.

Page 109: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

105

2. Place the block in front of sensor with certain distance d.

3. Using IO trigger for at least 10 us high level signal. The module automatically sends eight 40 kHz and detect whether there is a pulse signal back.

4. If the signal back, Echo pin will get high level. Time of high output IO duration is the time from sending ultrasonic to returning. Distance= time x velocity of sound (340m/s)/2

5. Compare this value calculated from step 4 with the value of d in step 2. Obviously, they are not identical but they should be close to each other. We can calculate the percent error to see how close they are. If this percent error is less than 5%, this sensor is acceptable for using.

6. Repeat step 1 to 5 many times with different distances (at least 5 times) to make sure the reliability of component.

We will run this test with 3 sensors of this model HC-SR04 to make sure if this model is useful or not. If not, we need to look for another type of model.

6.2.1.2 Measure angle of turning by using distance sensor

In this project about following target, sensor is not only used for calculating the distance but also finding the turning angle of target. Determining behavior of target is the main purpose of using distance sensor. We will show below the procedure for testing and calculating turning angle of target with the distance sensor.

Page 110: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

106

Figure 31 set up for measuring the turning angle

This figure show how to set up sensor for measuring the turning angle of target.

The turning angle is define by the value of 𝜷. In order to determine this angle, we need to sensor to handle the job.

1. Place the block in front of 2 sensors with certain angle, which is able to measure by mechanical method. We assume this angle is known.

2. Use distance sensor for determining D1 and D2

3. Value of d is fixed because of set up.

4. 𝜷= arctan( d/(D1-D2))

The step-by-step procedure above is used for calculate 𝜷. Repeat these step many times with different true value of 𝜷 from step 1. After step 4, make comparison between value in step 1 and step 4. Calculate the percent error to see if we can

Page 111: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

107

rely on this sensor for finding the turning angle. The percent error is below 5% is acceptable.

We will not stop here. We need to do one more thing to make sure that we can apply it into following system. We repeat all step 1 to 4 but right now, the block is

not static. In other words, it keep turning during the process of finding angle 𝜷. By doing this, we can see how system of sensor calculate the turning angle corresponding to movement of target. We can see how the value of angle we get from sensor change over time and the percent error looks like. We need to know all of them because the action of Robot will be controlled based on these information. Sometime we need to make approximation but we do not want this error is too big, which can cause negative effect on behavior of the whole system.

6.2.2 Power Testing

6.2.2.1 Test: Battery charging

Objective: To check the amount of time it takes the battery to reach back its nominal voltage of 11.1 V. Components:

Tenergy Battery Charger

Lithium Ion Polymer Battery pack

Multi-meter

Preparation: In order to star to test the battery, it is imperative that expectation of the battery are met. It must be check that the battery pack is in operational conditions. There must be no cracks or corrosion on the battery. The terminals where the batteries are connected must be clean without any trace of dirt. Also, a check for any possible short in the terminals. This prevents from any overheating the battery pack which could lead to a fire. Also, the condition of the battery pack must be check in order to make sure the batteries in the pack maintain a reasonable temperature (they are not getting too hot) while charging is in place. Procedure: Before starting the procedure, all the preparation steps must be done first. The testing of the battery shall proceed in the following chronological order.

1. Use a multi-meter to measure the initial voltage of the battery before charging starts

2. Use a multi-meter to measure the initial current of the battery before charging starts

3. Discharge the battery completely 4. Connect battery pack to the charger 5. Connect the balancer to the charger 6. Start charging the battery at the specified charging current for the battery

pack 7. Monitor the temperature as charging is taking place

Page 112: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

108

8. Measure the voltage in battery as its charging until it has the initial voltage the battery started at.

9. Measure the current in the battery and compare it with the initial current measurement when the battery was fully charged

10. Monitor if there is any memory effect.

Expected Results: The results expected after this procedure are taken is that the time that it takes the battery to charge completely should take less than 7 hours to recharge completely. Also it is needed to confirm that there is no Memory effect taking place in the battery. The battery is not overheating which helps to prolong the life of the battery.

6.2.2.2 Test: Battery Discharge rate to microcontroller

Objective: The purpose of this test is to check that the power supply of the system is discharging the requirements needed for the microcontroller to run effectively. Components:

Lithium Ion Polymer battery pack

Multi-meter

Beagle board microcontroller

Voltage regulator circuit

Breadboard

Preparation: In order to start the test of the discharge rate of the battery by the load of the microcontroller, it is needed to fully inspect the battery first. It must be check that the battery being use to power the microcontroller has an acceptable operation condition. For this, there must be no crack or corrosion on the battery. Also the terminal have to be clean, so that no traces of dirt of debris are to be found. It must also be check that there are no shorts in the terminals of the battery pack. This lowers the possibility of the battery pack overheating which may lead to the battery exploding or even a fire. Also it must be monitor the condition for the battery are in a reasonable temperature during the test (the battery must not get too hot). Procedure:

1. Set up the voltage regulator circuit in the breadboard 2. Attach the output of the voltage regulator to the microcontroller 3. Attach the battery in order to power the circuit. 4. Measure the output voltage of the circuit to ensure the voltages satisfies

the requirements for the microcontroller to be connected to. 5. Measure the output current of the circuit to ensure that current

requirements are satisfied 6. Turn on the microcontroller 7. Monitor the battery or the microcontroller is not overheating

Page 113: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

109

Expected Results: The output to the microcontroller from the voltage regulator built in the breadboard should have a voltage of about 5v. Also the current provided should be about 1.5 A which will effectively and safely turn on the microcontroller. Temperature in the microcontroller, the battery pack as well as the voltage regulator circuit must be relatively cool.

6.2.2.3 Test: Battery Discharge rate to motors

Objective: The purpose of this test is to make sure that the power supply in the circuit is supplying the required amount of voltage and current for the motors to run appropriately. Component:

Lithium Ion Polymer battery pack

Voltage regulator circuit.

Motors

Multi-meter

Preparation: In order to start the test of the discharge rate of the battery by the load of the motors, it is needed to fully inspect the battery being use for the test first. It must be check that the battery being use to power the microcontroller has an acceptable operation condition. For this, there must be no crack or corrosion on the battery. Also the terminal have to be clean, so that no traces of dirt of debris are to be found. It must also be check that there are no shorts in the terminals of the battery pack. This lowers the possibility of the battery pack overheating which may lead to the battery exploding or even a fire. Also it must be monitor the condition for the battery are in a reasonable temperature during the test (the battery should not get too hot). Procedure:

1. Set up the voltage regulator for the motor in the breadboard 2. Attach the Lithium Polymer battery as the power source to the voltage

regulator circuit 3. Measure the output voltage of the voltage regulator to ensure that it meets

the requirements for the motors to work properly 4. Measure the output current of the regulator to ensure it meets the

requirements. 5. Attach the motor to the output of the voltage regulator circuit 6. Check the motors are turn on. 7. Monitor the temperature of the components being tested (motors, battery

pack and also the voltage regulator circuit) that none of them are overheating.

Expected Results: The output to the motors from the voltage regulator built in the breadboard should have a voltage of about 10v. Also the current provided should be about 16 A which will effectively and safely to make the motors operate. Temperature in the battery pack as well as the voltage regulator circuit must be

Page 114: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

110

relatively cool, even though high voltage and current from the motors it is expected to get warmer.

6.2.3 DC Voltage Regulator We need to run a test to check if it satisfies our requirements or not.

1. Instead of using battery, we use DC power supply for input voltage. Our purpose is testing regulator, so we need to make sure everything else is ideal. DC power supply will maintain a constant input for this test. Set DC power supply with 12V

2. Pick value for resistors to get the desired output voltage

3. Turn on the DC power supply

4. Using multi-meter to measure voltage across output terminals

5. Compare results in step 4 with value of desired output voltage in step 2

6. Calculate the percent error

The Voltage operation is really important to make sure component is able to work properly. We need to guarantee a robust supply of the desired voltage for each component. If voltage supply is lower, efficiency will be low and their performance will be not what we expected. In case, if we supply too high voltage, it can destroy devices and make the whole system fail.

Because of this reason, we need to add some more step into the DC voltage regulator testing process. As we discuss above from step 1 to 6, we need to repeat this whole process at least 5 times with five different desired output voltage. It is necessary to make sure the circuit model of regulator is able to supply any output we want. If pass, we move to the next one to test the reliability of this model.

1. With the setup above, turn on the DC power supply and let it run about 5 mins

2. After 5 mins, check if output voltage is still constant or not

3. Now, keep changing the value of RL to see how the load affect to the output voltage

If the output voltage does not change much through these steps, this model is good to use for providing the voltage supply.

6.2.4 Servo testing

As discussed in section 4.3.1.1, we use PPM to control the HS-422 servo motor with micro-controller. Thus, now we need to test it to see how it work

1. Connect hardware:

Signal line to I/O pins of micro-controller

GND line to ground pin of micro-controller

Page 115: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

111

Power line to power system ( output of 5V DC voltage regulator)

2. Pick one value for the angle between 0 to 180 degree

3. Calculate the high level time of pulse we need to use (it should be between 1.25ms to 1.75 ms)

4. Micro-controller pulls high level signal at Signal line with duration time calculated in step 3. Note: we need to apply this pulse every 20ms to maintain shaft at certain angle. If not, the shaft of servo will back to 0 degree.

5. Measure the angle of the shaft

6. Calculate percent error of this result

7. Repeat step 1 to 5 at least 5 times with different value of angle

One thing we need to care is the speed of turning, so install this servo into the steering mechanical system to see how fast it turn. The servo motor is expected to maintain a high speed of turning with load around 3 to 4 Kg. When we test the servo, the last step is checking how fast it make a turn. If this HS-422 servo motor cannot satisfy the speed, we need to look for a new model of servo.

6.2.5 Motor testing

The motor is one important part of Robot. This component will determine how efficiency of following. We are really in trouble if we fail in controlling or making sure it works properly. For the testing, we will use the schematic showed in section 4.3.3. This allows us to control the speed and direction of motor movement. Technically, the top circuit will use PWM to change the voltage apply on motor so that speed of motor is able to change. The bottom circuit is used for changing direction of current flowing through DC motor. Our testing is based on these mechanism.

Build circuit on PCB

Using micro-controller to apply PWM into the DC motor

Changing the period time of PWM to see how speed of motor changes

Instead of using switch, we can use micro-controller for the same purpose

Connect to the I/O pins and micro-controller will determine which way to apply the signal. It can control the direction of current flowing.

Double check multiple times to make sure that the speed and direction of motor can be controlled. The speed is really important because this project is about high speed chasing. We need to make sure it is fast enough to pass a test so that when we install it with heavy load, ACR still maintain a high speed following.

For testing motor, we do not need to calculate percent error or compare to the other value. Our goal for using the motor is make sure it can change direction and speed, not necessary maintain at specific speed.

Page 116: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

112

6.2.6 Steering Angle Testing

As discussed in section 4.3.1.1, we use PWM to control the HS-422 servo motor with micro-controller, very like we will perform the testing for the Servo motor, and we will indeed use the motor, however the goal is to measure the accuracy of the angle at which our servo motor runs to, in order to do so we will follow the following procedure:

Connect the Configuration for Servo testing,

Using an Energia steckh for easy prototyping, which will be modified to get the desired angle

Use a ruler to determine the actual angle at which the tire is with respect to a plane which we will decide later on.

Repeat for a relatively high amount of angles, such that we get accurate data.

6.3 Software Test Environment

Since the software for this project might be a little complicated because we have two major parts which are the microcontroller and the Tablet. Both of these use different software and different tools to program them. For the microcontroller the only way to test will be to run the code and see if it works and if it does not then go back change something in the code and try again.

For the tablet it will be easier to test some functions by using a testing framework like JUnit. The problem is that this function will not have to depend on having connectivity with the robot or have Wi-Fi connectivity because it will make it much harder to have everything couple together to test.

For the microcontroller there will be not software testing environment because it will be too complicated to test something at the microcontroller level.

6.4 Software Specific Testing

For this project we have the microcontroller software and the tablet software. For the microcontroller we have to test that the sensor work and they give the data in a form that would be easy to interpret and use it. In general for the microcontroller we would test:

Check that the motor is getting the required signal to go forward and

backwards

Check that the servo motor is getting the required signal to turn the wheels

Check that the microcontroller can connect via Wi-Fi

Check that the microcontroller can receive an image from the camera and

send it via Wi-Fi

Page 117: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

113

Check that when everything is running the microcontroller does not die

quickly

For the tablet we would do the following test:

Check that the applications loads fine without any error

Check that the button on the application work

Check that when the autonomous button is enable the joystick feature

disappears and when the autonomous button is disable the joystick

features is enable and ready for the user to use.

Check that the tablet can connect to the microcontroller

Check that the tablet can receive/send input to the microcontroller

Check that the tablet can receive the video stream from the camera on the

car

Check that the user can control the car using the ps3 controller

Check that the tablet can interpret the command from the ps3 controller

and successfully transmitted to the car and make the car move and/or

make the car turn.

Check that the tablet can successfully disconnect from the microcontroller

and that no data is being transmitted when disconnected.

Check that when the autonomous switch is enabled the car cannot be

controlled with the ps3 controller.

Check that when the autonomous switch is disable the tablet can send

commands to the car using the ps3 controller and that the car is not in

autonomous anymore.

7 Administrative Content

It is essential to have proper project management, that is, create and ensure that a schedule and budget are followed carefully. It is also important to get to know the people working on the project, and their goals and aspirations. In this section will cover the administrative material of the project and what we enjoy doing.

7.1 Format of Meeting Notes

The group met two times a week, and after each meeting were there was any significant progress a set of meeting notes was taken and sent out to all of the members for future reference, the format in which we devided the sections of the things discussed and recorded from the meeting in this meeting notes is as follows:

Attendees

Purpose of Meeting

New / Open Action Items

General Meeting Notes

Page 118: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

114

To Be Discussed in Next Meeting

Additional Notes

7.2 Relevant/Important Meetings Our group met two times a week, one of the meetings had as a goal to talk about where were we in our progress with respect to our milestones at the given time, the second meeting was a status meeting—that is a meeting just to discuss and make sure that the goals set during our main meeting were taking place, for those meetings were we had significant discussions, meeting notes were recorded and as presented as follows. September 16th, 2014: this meeting happened shortly after deciding the topic of our project, we reached the conclusion that it would be important to define our main goals for the project, an extract from the meeting notes states the objectives defined during this meeting:

Robot autonomously (passively) follows a given target (i.e. another robot). Robot has wireless video stream to tablet. Following is Triggered on these ways:

o By image recognition (recognizes a given license plate number). o Manually using a tablet GUI (Optional).

Once trigger occurs: o If multiple triggers occur:

Option A: selects major treat. Option B: gives user option to select using GUI on tablet.

o If only one trigger occurs: Lock onto and start following target possessing the given

license plate. Sirens, police lights and headlight are turned on. Sends alert to Police Dispatch (in our case a possibly a text

message to a given phone number). Once following starts:

o Will follow autonomously until the followed robot/car stops. o Will keep a safe distance from followed robot/car (tentatively 2 ft.).

September 18th, 2014: in the previous to this, we discussed the main goals for the main portion of our project, the goals for the handheld device—in the case of this project a tablet are thoroughly discussed during this meeting, and were determined to be as follows: Defining Tablet User Interface Objectives and Data Ingress/Egress:

Tablet App Objectives: o License Plate Database

Black/Whitelist, Add, Remove, Alert, display location o Alert (send SMS to "Police Dispatcher", could be text or e-mail)

Page 119: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

115

o Receive Video Stream o Receive misc. data (license plate number, etc.) o Remote Control Follower o In screen target selecting o Display location of target on screen (using square to enclose)

Ingress: o Video Stream o Misc. Data:

License Plate: Number(s) and Location(s) Robot Battery Level (Optional) Once Trigger occurs: Location of locked Target

Egress: o Manual Instructions:

Select Target (Trigger Following). Remote Control. Siren, police lights and headlight.

September 19th, 2014: during this meeting we discussed the research done as well next steps to be taken in the research process.

Car Drive: two of the options being considered were Tank Drive and Steering Drive, upon discussion we decided that we will tentatively use Steering Drive, because it behaves in a more similar way to a real car. Because using the Steering usually involves a relatively complicated mechanical system we also decided to use the body of a Remote control Car.

Wireless: up to this point we are going to look into the xBeeWiFi module, as it seems to be a common occurrence for similar projects.

Video Camera: at this point we are contemplating using an IP camera, as it seems to be one of the most intuitive when it comes to interfacing with other components.

October 14th, 2014: during this meeting we talked about sponsorship and the updates as well as tasks to be completed and which would be the next topics of research.

Steering Drive: the way that the Steering Drive seems to be controlled is called Dual Rate Steering, where PWM is used to the determine the how much the wheel will turn (i.e. the angle), while the amplitude determines the Sensitivity (i.e. how much and how fast the wheel is allowed to turn).

Microcontroller and Wi-Fi: we found a micro-controller that has Wi-Fi built in and it is currently in consideration. It is to be determined whether it is compatible with the image processor.

Distance Detection with Image Processing: it seems to be possible (there is research on it), but there seems to not be a lot of documentation in implementation in an embedded environment, in other words it is not likely we will be able to implement it given our time constraints, so we will base the following mechanism on other sensors.

Page 120: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

116

Following Mechanism: we will have to use sensors it was also noted during the meeting that our following mechanism will be limited to certain constrains that will be later stated (e.g. as in the case that the followed car turns again before the follower finds it).

November 15th, 2014: the purposes of this meeting included: 1. Review Block Diagram 2. Determine some of the parts to be used 3. List next things to be done

We reviewed the block diagram, the new (tentative) revision looks as seen on Figure # and is an updated/modified version of the one seen on Figure # in section:

Figure 32 Block Diagram Submitted for Initial Proposal

Some of the changes from Figure 32 to Figure 1 are:

The “Motors” block more specific adding Servo for steering and Brushless DC (BLDC) for moving forward/backwards.

Added Electronic Speed Control (ESC) to the Block Diagram and its respective connections to the MCU.

Camera is no longer connected directly to the Wireless Transceiver, as video needs to be encoded before it is transmitted.

Added “Miscellaneous Sensors” which are optional, namely a set of sensors (accelerometer, magnetometer and gyro) all of which together are known as Inertial Measuring Unit (IMU). These sensors for a low cost, averaging around 10 USD and it is also relatively easy connections can add a safety

Page 121: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

117

feature (e.g. in case we lost video feed and our vehicle tip upside-down, we would be able to tell, or in a sudden stop).

Some of the parts have already been acquired, including Brushless DC (BLDC) Motor, Servo Motor, Electronic Speed Control (ESC) and Car Body. The ultrasonic sensors have been ordered. Testing: for the servo we did some testing using an MSP430F5529 Launchpad Board. The test was ran using Energia's Example for Servo Sweep, with angles modified, now ranging from 45 to 145 degrees instead to 0 to 180. For the Brushless DC (BLDC) motor. A similar test was run to test the BLDC motor, using a PWM signal with a total width of 20ms, and a varying HIGH width from 0.7ms to 2ms, achieving high speeds. Further testing will be needed to see how to better control the speed. Figure # shows the an array similar to the one used, however in our experiment we used a MSP430F5529 Launchpad Board, and Figure # shows a picture of the experiment taking place.

Figure 33 - BLDC Testing

7.3 Milestone Discussion

From the beginning of our project we set some dates to accomplish, which were listed and are presented below in Figure #

Page 122: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

118

Figure 34 - Milestones

Page 123: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

119

7.4 Budget and Finance Discussion

ITEM COST

BeagleBone Black $49.95

FPGA (Zedboard) $249

Sensors (IR, Accelerometer, Gyro, etc) $100

RC Car(s) $50

Miscellaneous Electrical (Cables, batteries, prototyping boards, etc)

$150

Miscellaneous Mechanical $100

Wireless Transceivers $30

PCB Fabrication $60

Camera $110

Turret pan/tilt mechanism $150

Android Tablet $200(already acquired)

Total $1048.95

Tablet 16 Budget

This table shows the estimated project budget. Everything is overestimated so that it can show the maximum amount we need to spend. In other words, this amount already included budget for back-up plan. If something wrong happens such as component is broken down or we need to change design, we still can afford with that budget.

This action is really necessary for any project because we do not know what will happen or guarantee that our first design is able to work properly. Also, during this time, everything is about research, so we also list all component we think we should use and being applicable for our project. It means some component will be taken off later and amount of money will be reduced.

Page 124: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

120

Financial sponsor:

Currently, this project is sponsored by Boeing Corporation. After reviewing the idea and the possibility of “Autonomous Chasing Car”, investigators from Boeing saw it as a high potential for some future applications in the real world. They agreed to sponsor us the budget amount up to $1000. It is also an honor because this amount is considered as a maximum budget which Boeing can provide for a student’s project. We need to know that not all senior design projects are able to get this $1000.

This is also our motivation for doing the best to prove that we deserve this award. In order to receive the award a set of guidelines is to bet followed:

1. Items must be sent to a UCF business address. No UCF dorms or offices are permitted.

Dr. S. M. Richie! GXX, UCF, HEC-346, BLDG-116! 4328 Scorpius Street Orlando, FL 32816-2362

2. Reimburse will be made by check and must be paid to a U.S. citizen.

3. Original receipts, or printed electronic receipts are required showing that the item was delivered. The receipt should have your name, the item, and its cost. A credit card statement may be needed to show payment if not all items are on the delivery invoice.

4. Please be mindful of your credit card billing cycle. It can take 2-3 weeks to receive reimbursement from the UCF Foundation, Inc.

5. Requests for reimbursement must be made within 30 days of delivery.

6. Items purchased by the UCF Foundation belong to UCF. Parts disposition paperwork will be handled by Dr. Riche after the end of the semester.

In addition to Boeing, Dr. Chung-Young Chan, Lecturer from the Department of CECS, in the ECE division, has agreed to contribute to up to $500, should we need any further amount past the money provided by the generosity of Boeing.

Page 125: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

121

8 Appendices

8.1 Appendix A - Copyright Permissions

Permission Request/Grant for Pi-Camera Mechanical Dimensions Image

Page 126: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

122

Permission Request (directed to Jamie Johnson)

for Tablet GUI used for Project Example

Permission Granted

Page 127: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

123

Permission for Figure 10 – Image showing License Plate Detected and shown in Place

Permission request images from Leopard Bruless DC motors

Page 128: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

124

Permission Request to Lula Gabric

Page 129: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

125

Permission Status: Granted

Page 130: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

126

Permission Status: Granted

Permission status: Pending

Page 131: Group 19 Autonomous Chasing Robot (ACR)First thing, we need to build a robot (car) that can follow any object. We mean “any object”, not just follow only certain colors. This is

127

8.2 Appendix B – Datasheets

<Body>

8.3 Appendix C- Sources

Motors and Sensors:

www.eecs.ucf.edu/seniordesign/su2009fa2009/g02/ www.eecs.ucf.edu/seniordesign/sp2012su2012/g07/index.html www.robotshop.com www.dsdmotor.en.alibaba.com www.afrotechmods.com www.beam-wiki.org/wiki/Steering_Techniques www.societyofrobots.com/member_tutorials/node/71 www.sainsmart.com/ultrasonic-ranging-detector-mod-hc-sr04-distance-sensor.html www.sparkfun.com Wireless and Power: www.eecs.ucf.edu/seniordesign/sp2014su2014/g04/ www.eecs.ucf.edu/seniordesign/sp2014su2014/g07/ http://batterydata.com/ http://batteryuniversity.com/learn/article/sharing_battery_knowledge/when_was_the_battery_invented www.adafruit.com/cattegory/112 www.atomikrc.com/ web.mit.edu/evt/summary_batttery_specifiation.pdf www.usb.org/channel/About_WUSB.pdf