Docsity

Tekbot Range-Finder - Study Guide | ECE 441, Exams of Electrical and Electronics Engineering

Partial preview of the text

Download Tekbot Range-Finder - Study Guide | ECE 441 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

Tekbot Range-Finder

Group 13

ECE 441: Senior Design

Roger Traylor

Taylor Gray Sid Ong Chieh Hsu 1 December 2006

Table of Contents

  • 1.0 Revision HistoryÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ..P.
  • 2.0 IntroductionÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ P.
  • 2.1 Customer Requirements and Product BackgroundÖ................P.
  • 2.2 Competitive AnalysisÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ..P.
  • 2.2.1 Product Space AnalysisÖÖÖÖÖÖÖÖÖÖÖÖÖ..P.
  • 2.2.2 Target Feature SetÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ..P.
  • 2.3 ReferencesÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖP.
  • 2.4 Naming Conventions UsedÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ.P.
  • 3.0 Architectural OverviewÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ..P.
  • 3.1 Implementation ApproachesÖÖÖÖÖÖÖÖÖÖÖÖÖ.....P.
  • 4.0 Top Level DescriptionÖÖÖÖÖÖÖÖÖÖÖÖÖ............................P.
  • 4.1 Top Level Block DiagramÖÖÖÖÖÖÖÖÖÖÖÖÖÖ......P.
  • 4.1.1 Top Level Interface DefinitionÖÖÖÖÖÖÖÖÖÖ..P.
  • 4.1.2 EnvironmentÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ...P.
  • 5.0 Functional Unit Description (level 1)ÖÖÖÖÖÖÖÖÖÖÖÖÖÖP.
  • 5.1 Functional unit block diagram (fub 1)ÖÖÖÖÖÖÖÖÖÖ..P.
  • 5.1.1 Functional unit interface definition (fub 1)ÖÖÖÖÖ..P.
  • 5.1.2 Functional unit operation (fub 1)ÖÖÖÖÖÖÖÖÖ..P.
  • 7.0 TestingÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ..P.
  • 7.1 Functional TestÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖP.
  • 7.2 System TestÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ..P.
  • 7.3 Manufacturing TestÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖP.
  • 8.0 Development PlanÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ...P.
  • AddendumsÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖÖ.P.

2.2 Competitive AnalysisSee the following Table 1.

Camerabot

Cost ($)

CameraDefinition

User Interface

ComputerInterface

Target Designation

Obsticle Avoidance

Team 13 Tekbot

350

1.3 Mp

Custom Verilog

GUI

Serial

Bright Colors

Forward Bumpers

Terk Qwerkbot

Classic

12

550

1.3 Mp

Custom GUI

Wireless802.11G

None

None

Evolution Robotics

ER

13

499.99 +Laptop

1.3 Mp

Custom GUI

USB Serial

Yes

Yes, objectrecognition

Camerabot

Brains

Control

Website

Team 13 Tekbot

Spartan

FPGA/ATmega

Autonomous

http://classes.engr.oregonstate.edu/eecs/fall2006/ece441/groups/g13/

Terk Qwerkbot

Classic

Qwerk embedded computer

User Controlled

http://www.terk.ri.cmu.edu/recipes/qwerkbot-overview.php

Evolution Robotics

ER

Integrated Laptop

Autonomous/User

Controlled

http://www.evolution.com/er1/

Table 1: Competitive Analysis of Similar Camerabot Kits

2.2.1 Product Space Analysis

The first robot discussed is the Terk Qwerkbot Classic. A rechargeable 7. Volt NiCad battery is used to power the system and at the center of the robot is the Charmed Labs designed Qwerk embedded computer. This computer is mounted on a chassis and three elements are plugged into the Qwerk computer. This includes the motors, the Logitech STX webcam, and the Zonet 802.11G wireless USB pen. This wireless capability allows any computer with a wireless card and Terk software to control from a distance and a click of the mouse giving the Qwerkbot an added feature over the other two robots. Due to the limited software complexity, the robot is restricted to being user controlled with no autonomy. There is no way for the Qwerkbot to avoid objects without the user manually controlling the system. The robot cannot designate targets let alone track them. The software/hardware could possibly be altered to allow for autonomy, target designation, and tracking; however, since it cannot perform these functions, it does not have the capability the other two robots posses.

The Evolution Robotics, ER1, is a higher end home robotics system. The base model is $700 pre-assembled or $500 dollars un-assembled. This price is deceiving. An additional purchase of a decent laptop is required. A relatively cheap laptop at $700 in conjunction with the un-assembled base model ER1 will cost $1300. This will be too expensive to fulfill our target feature set. Since a laptop controls the cambot, the robot is given the ability to evolve with advances in hardware technology. With the current ER1 software, users are able to designate and track a target. These targets do not have to be dramatically different than the surrounding environment (like a tennis ball or a blue LED). The camera is able to recognize objects in the ER1ís path and avoid them autonomously. All of these abilities add up to the ER1 being the highest performing robot of the three compared, but the cost of the system is too expensive for most consumers. The product is designed for consumers, and does not allow for the same degree of hardware and software debugging as the other two robots provide.

The camera range-finder Tekbot is the cheapest of the three platforms. At $350, the robot is economically viable. The Tekbot platform is much smaller in dimension than the other two cambots, placing fewer restrictions on where the robot can navigate. Using the Avago camera as opposed to web cameras such as the other two robots allows the design to maintain its smaller profile. Without any USB interfaces on the camera range-finder Tekbot, quick plug and play of additional devices and modifications is not an option. The Tekbots navigation control is a compromise between the other two robots compared. Without having wireless capabilities, the Tekbot in its current state cannot be conveniently user navigated such as the Qwerkbot. The camera range-finder Tekbot can navigate autonomously. The Tekbot does rely on forward mounted bumpers, forcing it to hit an object and then react to the impact by altering course. This is not as advanced as the ER1ís ability to navigate around objects by simply analyzing its streaming video input giving the Tekbot a disadvantage when compared to the ER1. One advantage the camera range-

[7] "Cyclone II FPGA Starter Kit." Altera. 2006. Altera. 29 Oct. 2006 .

[8] "ProAsic Starter Kit." Actel. 2006. 29 Oct. 2006 .

[9] Meadows, Ben, Larry Pham, John Kim, Sebastien Vang, and Perry Cui. Team Avago. Oregon State University. Corvallis: Oregon State University, 2005. 7 Nov. 2006 .

[10] Spartan-3 Starter Kit." Xilins. 2006. Xilinx. 28 Oct. 2006 .

[11] "AVR Atmega128." Atmel. 2002. Atmel. 1 Nov. 2006 http://eecs.oregonstate.edu/education/student_ref/ics/microcontrollers/ATmega128.pdf [12] Xilinx webpack

[12] Qwerkbot. Carnegie Mellon University. 2006. 7 Nov. 2006.

[13] "ER1: Personal Robot System." Evolution Robotics. 9 July 2003. Evolution Robotics. 7 Nov. 2006 .

2.4 Naming Conventions Used

[i] Tekbot: An instructional robotics program at Oregon State University. A basic Tekbot is rectangular in shape and drives on two motorized foam wheels, using two bumper pads to navigate objects set forth in its path.

[ii] FPGA: Field-Programmable Gate Array. A semiconductor device used to program gate logic. We will be using the Xilinx Spartan 3 FPGA to communicate to the Atmega 128 what the Avago Camera is seeing.

[iii] Atmega128: A microcontroller with 128 Kb self-programming flash memory. Cheap and currently integrated within the Tekbot curriculum.

[iv] GUI: Graphical User Interface.

[v] PC: A Personal Computer running windows operation system.

3.0 Architectural Overview

The first component required is the Tekbot. This robotís chassis will allow for the mounting of all the additional required parts. The second component will be the camera. The camera will connect through a serial control interface to a Xilinx Spartan-3 FPGA Starter board. The serial control interface between the camera and the FPGA board will use a serial transfer clock (SCLK) and a serial data signal (SDATA) 1. Another connection from the camera will be to Port D of the microcontroller. Port D is an 8-bit bi-directional I/O port. This will allow the two components to communicate back and forth.

The FPGA will also be connected to the Atmega128 AVR microcontroller through Port A. Port A is similar to port D in that they are both 8-bit bidirectional I/O ports. The FPGA will send the designated [x y] coordinate to the microcontroller, which will connect to the motor control board giving it the ability to decide where the Tekbot will move.

3.1 Implementation Approaches

This project is a carry over from a project last year. Stated below are the different implementations approaches considered yet were not sufficient enough to meet the desires of the customer.

  • Implement the Avago 1.3 Mp cell camera as opposed to the Logitech 1.3 Mp webcam

Other than being 1.3 Mp, the two cameras are different. The Logitech camera has larger dimensions than the Avago camera which would be different to mount on the Tekbot. We plan on mounting a camera on the forward face of the Tekbot. If we were to do this with the Logitech camera, the bumper sensors (which are also mounted on the same forward face) would be behind the camera. In order to solve this problem our group would have to manufacture a new bumper solution. We will not have to alter the current bumper design using the Avago camera. Another difference are the interfaces. The Logitech STX webcam uses USB to interface with a user while the Avago cell phone camera uses a 20 pin ribbon cable. The Logitech STX (or similar webcam) would cost $40 of our $500 dollar budget making it a waste of money and resources whereas the Avago camera has been presented to us for free.

  • Use a serial interface between robot and computer instead of wireless

While researching camera robot designs, we came to the realization that a wireless interface would be a useful feature. This would save a user the time

The power switch turns on the Tekbot. The R, G, B, and M switches on the Spartan-3 board correspond to Red, Green, Blue and Motor mode. These slide switches are initially set to the off position. The serial port on the ATmega128 is connected to a PC. The Tekbot will show video images on the PC monitor when the power switch is set to on. The PC monitor will only show a single color if one of the RGB switches is on. For example, the PC monitor will only show red when the R switch is on. The Tekbot will not move when the power switch is on because the M switch is set to off. The users can choose a single target on the PC monitor and turn the M switch to on causing the Tekbot to move toward the target.

Figure 2: Software User Interface

The user interface will use the Java programming language to display to the user what the camera is seeing. The code will display the camera image in streaming video mode and also give user prompts at the bottom of the monitor. The prompts will ask the user if he/she would like to designate a target. If yes, the user will be given a pointer to click on a target.

4.1 Top Level Block Diagram

Figure 3: Hardware Interface

Figure 5: User Display Software Block Diagram

4.1.1 Top Level Interface Definition

Table 2: Interface definition which corresponds with Figure 3

•^

Atmega128: This microcontroller will drive the motors to travel to the designated [x y] coordinate.

-^

Spartan-3 FPGA Starter Kit: Narrows down the designated target to [x y] pair and sends this coordinate to the Atmega128.Streams the camera video onto a PC display. The Spartan-3 tells the camera to switch between its various color modes.

-^

Tekbot Motor: Turns the wheels of the Tekbot.

-^

Tekbot Battery: Powers all modules.

-^

Avago Camera: Steams live video feed of Tekbot forward view.

-^

Motor Control Board: Controls the direction and seed of each Tekbot motor

Device

Voltage

Protocol

Input

Output

Other Specs

Atmega

4.5-5.5 Volts Serial

Spartan-

Motor Control

0-8 MHz Clock speed

Spartan-3 FPGA Starter kit 5 Volts

Serial/JTAG Avago Camera

Atmega128/PC Display/Camera

50 MHz Clock speed

Tekbot motor

8 Volts

N/A

Motor Control Board

Tekbot Wheels

N/A

Tekbot battery

8.4 Volts

N/A

N/A

Motor Control/Spartan-3/Atmega128/Avago Camera Rechargeable

Avago Camera

2.8 Volts

I2C

Camera Lens/Spartan-3 Spartan-3 FPGA

N/A

Motor Control Board

5 Volts

Serial

Atmega128/Battery

Tekbot Motor

N/A

Table 4: Interface definition which corresponds with figure 5

Method Description

Destination Block Type Clicked_x Returns what user click FPGA Integer Clicked_y Returns what user click FPGA Integer

Center_x

Calculates center of target

Display visible 'x' Integer

Center_y

Calculates center of target

Display visible 'x' Integer

4.1.2 Environment

A flat surface will be required for this project. This Tekbot will not operate in an ideal state if it is on a slant. The camera will need targets to focus on while moving toward the intended target. Space between the Tekbot and the target will be essential in order to demonstrate the purpose of our project. Since this project will be dealing with colors, it will be important not to have the same colors near each other. The Tekbot could become easily confused and not target the correct object if the same colors are next each other.

The operating temperature of the Atmega128 microcontroller ranges from -55 degrees Celsius to 125 degrees Celsius. It needs to be stored in temperatures ranging from -65 degrees Celsius to 150 degrees Celsius. Six volts is the maximum operating voltage on the microcontroller 11. This is ideal for our project since the supply from the Tekbot power to the microcontroller is five volts.

This project must interface with a PC because it will not interface with a Mac or Linux operation system. The operating environment for the FPGA will be Verilog. Last yearís group programmed primarily in this environment and highly recommended it over VHDL. Verilog allows the user to program code in shorter time than VHDL. Verilog will be programmed into the FPGA allowing it to communicate between the camera and the microcontroller. The library used will be Webpack according to Don Reid, an Avago programmer. According to Xilinx, ìwebpack offers HDL synthesis and simulation, implementation, device fitting, and JTAG programmingî^12. C will also be used to program between the Atmega128 and the motor control board. This has already been done since we will be using the code from ECE 375. The libraries used will be ëmega128.hí and ëdelay.hí. The ëmega128í will allow us to communicate with the Atmega128 and give us the tools to program it to move in a given direction. The ëdelayí library will allow us to program the Tekbot to delay for a given period so we can turn the Tekbot.

Another programming language used will be Java 1.5. This language will allow the camera to display the image on to a monitor. A GUI will be initialized so a user will be able to designate a target. For this to be accomplished, several libraries, or classes, will be introduced into the code. To initialize the GUI, javax.swing will be used. This will allow the user to see the target on the monitor. In order for the keyboard and mouse to function within the GUI, we will use the classes AWT and Mouse Event. Since our goal is to have the user designate the target, the code will need to use MouseInfo and MouseListener. MouseInfo states where the location of the pointer is and MouseListener forces the object to react to a mouse click. Both rely on the class Mouse Event.

5.1 Functional Unit Block Diagram (fub1)

Figure 6: Schematic diagram of hardware interface

5.1.1 Functional Unit Interface Definition (fub1)

Signal Name Description Type GND Ground Common FLAG Flash Synchronization Output MCLK Module Clock Input VSYNC Vertical Synchronization Output

D

Parallel data 0/Serial Data Output SCLK Serial Control Clock Input SDATA Serial Control Data Input/Output VDD Voltage Input Input RESETn Camera Module Reset Output ON/OFF Camera Module Control Input

HSYNC

Horizontal Synchronization Output VCLK Video clock/serial clock Output D1 Parallel data1 Output D2 Parallel data2 Output D3 Parallel data3 Output D4 Parallel data4 Output D5 Parallel data5 Output D6 Parallel data6 Output D7 Parallel data7 Output Table 6: Interface definition which corresponds to figure 6