Presentation

Download Report

Transcript Presentation

Final Design Review
By:
Alireza Veiseh
Anh-Thu Thai
Luai Abou-Emara
Peter Tsang
Introduction
• Goal:
–To allow students to learn basic programming concepts by
controlling movements of a toy tank via a set of instructions.
Overview
•
•
•
•
Parts List
Requirements
Design Scheme
Modules:
–
–
–
–
–
–
–
Electronic Compass
Radio Frequency Module
Oscillator
Sonar Ranging Module
XSV-300
Remote Control
User Interface
• Reviewer Comments
• Current Status
Parts List
Part Name
Manufacturer
Part #
Supplier
Cost
Tank
Hobby Zone
2050
CSE lab
$99.95
Compass
Precision Navigation
V2X
CSE lab
$49.95
Virtual Wire Development Kit
RF Monolithic
DR1004-DK
CSE lab
No
Sonar Ranging Kit
Polaroid
R11-6500
CSE lab
No
XSV-300 Board
Xilinx
XSV300
CSE lab
No
PIC
Micro-Chip
PIC16F876
CSE lab
No
Oscillator
FOX
F1100E
CSE lab
No
Transistors
Radio Shack
276-1617
Self-Supl.
$2.69
Resistors
Unknown
Unknown
CSE lab
No
Capacitor
Unknown
Unknown
CSE lab
No
PC
Dell
Unknown
CSE lab
No
Wood
Home Depot
Unknown
Self-Supl.
$30.00
Batteries
Radio Shack
Alkaline D
Self-Supl.
$7.00
Requirements
Design Scheme
Sonar:
–
Is used to measures the distance
of the tank to the border of the
world
Compass:
–
Calculates the current heading of
the tank, and sends it to the PIC
–
Processes and formats the input
from the sonar or the compass
Sends the formatted packets to
the RF transceiver
PIC:
–
RF transceiver:
–
Transmits packets from the
remote component to the central
component
–
Runs the user interface
application to send commands to
the XSV-300 board
PC:
XSV-300 board:
–
–
Processes the inputs from the PC
and the RF transceiver
Control movements of the tank
Tank remote control:
–
Commands the tank to move or
to turn
Compass – PIC Interface
Compass:
– Operates in slave mode
– Performs I/O in binary
format
PIC:
– Resets compass
– Polls data periodically from
the compass
– Receive interrupt from EOC
– Provides the clock for the
compass
– Reads data from SDO
RF Transceiver – PIC Interface
RF Transceiver:
– Communicates using RS232
protocol with peripheral
devices (PIC and XSV-300)
PIC:
– Periodically retrieves data
from the compass and the
sonar
– Encodes them separately
into specific format that RF
requires
– Sends them to RF for
transmission
Oscillator – PIC Interface
Oscillator:
– Provides the clock for PIC
(20 MHz)
Sonar-PIC Interface
Sonar:
– Operates in single-echo
mode.
– Transmits sound wave
and gets the echo
reflected off of the
border.
PIC:
– Triggers the input signal
of the sonar module
and turn on its timer at
the same time.
– Receives the interrupt
from sonar and turns
off the timer.
– Calculates the distance
of Etank to the border
using the response
delay.
PC to XSV-300 Interface
• User sends a destination to the XSV-300 using a PC
application. It is sent as a (command, units) pair
through the parallel port.
– Commands:
•
•
•
•
Move forward
Move backward
Turn right
Turn left.
– Units:
• Degrees if a command is to turn
• Millimeters if a command is to move forward or backward
PC
Application
Command, Units
XSV
XSV-300 Capturing Data From Serial
When a new destination from a user is received, XSV
will capture and decode data from Etank and determine
how to control the tank.
Serial signal:
^
1
^
2
^
3
Each byte in a serial transmission is preceded by a start
bit, point 1 above. Data is sampled at the center of
each bit, like points 2 and 3 above.
XSV-300 Decoding Data From Serial
• Each RF data packet is composed of eight bytes. Contained
within the packet are the device ID and current position of
tank. Other bytes are not used for controlling the tank.
– Device ID:
• Used to discriminate which packets are relevant to the current
command. For example, commands for turning only need data
from the compass.
– Current position:
• Used to determine whether the tank has reached it’s destination.
XSV-300 Controlling Tank Movement
• Steps taken when the XSV receives a new command:
1. Assert a busy signal to the PC.
2. Capture the initial position of the tank.
3. Calculate the destination of the tank. (i.e. the angle or the distance
from a wall the tank needs to be at.)
4. Assert appropriate pins to control movement of tank.
5. Low the busy signal when destination is reached.
• If the tank’s position is stuck within a set tolerance for
more than two seconds, all movement is halted.
• Accuracy of reaching final destination
-
+/- 8 degrees for turning.
+/- 305 millimeters for forward or backward movement.
PC -- XSV-300 -- Remote Control Interface
PC:
– Sends to XSV-300 board
one set of instructions at
a time:
• Forward, distance
• Backward, distance
• Left, angle
• Right, angle
XSV-300 board:
– Processes the data
received from the remote
component
- Controls the remote
control using four pins
Etank’s Remote Control Channels
Channels:
- Four output bits control the
channel
- Each bit controls a channel
as shown below:
Command
LB
RB
LF
RF
Move Forward
0
0
1
1
Move Backward
1
1
0
0
Turn Left
1
0
0
1
Turn Right
0
1
1
0
User Interface
• Will be a GUI application that allows a user to send instruction to
Etank
• Will be programmed in C++
• Will communicate through the parallel port using the
DLportIO.lib and DLportIO.dll interfaces, which we studied in
CSE467
User Interface (cont.)
Reviewer Comments
•
Parallel Port Communication
–
–
•
Serial Method
–
–
•
Choose between the two types of serial port communication methods:
» Use a PIC processor to capture one byte of data at a time and have it
sent off to the XSV-300 board.
» Have the XSV-300 board decode the serial stream of data
Explanation: We chose the second method.
Comment: Specify how often the PIC processor will poll the compass.
Explanation: For now, we poll it every half of a second.
RF Frequencies
–
–
•
Comment:
Compass Polling
–
–
•
Comment: It is better to buffer the input from the parallel port.
Explanation: We implemented it.
Comment:
Ensure that there will be no interference between the Virtual Wire RF
and the remote control RF.
Explanation: We tested it and knew that they are not interfering.
Environment
–
–
Comment: Specify the Etank’s operation environment and the drawing surface.
Explanation: We agreed with them and decided to have a 20’ x 20’ world.
Reviewer Comments (cont.)
•
Control Implementation
–
–
In order to prevent the tank from the over steering, slow it down or
turn it by short bursts.
Explanation: We slowed the tank down and added a tolerance in our accuracy.
–
Comment:
–
•
Clarify the ambiguity in the specification of the Etank’s movement:
» Does the tank move given a set of distance or angle?
» Is the tank keep moving in a specified direction until the user issues
another command?
Explanation: The tank moves given a set of distance or angle.
Power Consumption
–
–
•
Comment:
Comment:
Clarify what type of battery we use for the remote component devices.
Explanation: We used 4 D-size batteries and a voltage regulator.
Component Communication
–
–
Comment:
Use a common communication path between the remote component
and the central component.
Explanation: Agreed with the recommendation but declined to implement it. The
reason for having two RF units is for simplicity.
Current Status
Completed:
Protocol to control the Compass using the PIC
Protocol to control the Sonar using the PIC
Protocol to control the RF using the PIC
Protocol to move/turn the Etank using XSV-300 and the remote control
Protocol to communicate with XSV-300 via serial and parallel interfaces
Integrating RF with the XSV-300
Integrating compass, sonar and RF protocols
Implementing a user interface application for the Etank
To be completed:
Interfacing the remote and the central components via RF
Debugging the system and finalizing the design
uw:
Summary
•
•
•
•
Parts List
Requirements
Design Scheme
Modules:
–
–
–
–
–
–
–
Electronic Compass
Radio Frequency Module
Oscillator
Sonar Ranging Module
XSV-300
Remote Control
User Interface
• Reviewer Comments
• Current Status