Department of Electrical and Computer Engineering Facebook page


  • DEPARTMENT
    • Overview
    • Computing
    • Facilities
    • Organizations
    • Educational Objectives
    • Student Outcomes
    • Scholarship Awards
    • Employment
    • Advisory Committee
    • Contact
  • ACADEMICS
    • Undergraduate
      • Computer Eng.
      • Electrical Eng.
      • Ambassadors
    • Graduate
      • Information for Prospective Students
      • ECE Graduate Handbook
      • Graduate Forms
      • Ph.D. Qualifying Exam
      • Distance Education
      • Frequently Asked Questions (FAQ)
    • Courses
    • Student Survival kit
    • Distance Learning
  • PEOPLE
    • Faculty
    • Staff
  • PROSPECTIVE STUDENTS
    • Overview
    • FAQ
    • Considering ECE
    • Scholarships
    • PC Requirements
    • Office of Admissions
  • RESEARCH
    • Overview
    • Signal Processing & Communications
    • Digital Systems & Microelectronics
    • Power & High Voltage
    • Research Centers
      • Emerging Materials Research Laboratory
      • High Voltage Laboratory
      • Robotics
    • HPCC
  • ALUMNI
USB Robot - Ece
Personal tools
  • Log in
Views
  • Page
  • Discussion
  • View source
  • History

USB Robot

From Ece

Jump to: navigation, search

Team USB_ROBOT

Our goal is to control a robot's movements with a USB joystick using the FPGA as an interface between the joystick and the robot.

Contents

  • 1 Team Members
  • 2 Phase 1
    • 2.1 Introduction
    • 2.2 Concept
    • 2.3 Proposed Work
    • 2.4 Required Parts
    • 2.5 Expected Deliverables
  • 3 Phase 2
    • 3.1 Introduction
    • 3.2 Concept
    • 3.3 Proposed Work
    • 3.4 Modules
    • 3.5 Required Parts
    • 3.6 Expected Deliverables
  • 4 Phase 3
    • 4.1 Review of Proposed Work
    • 4.2 Module Descriptions
    • 4.3 Expected Deliverables
  • 5 Phase 4
    • 5.1 Review of Proposed Work
    • 5.2 Module Descriptions
    • 5.3 Expected Deliverables

Team Members

James Sakalaukus – Checker

Jimmy Rapier – Coordinator

Yuko Shimomoto - Recorder

Jeffrey Lorens – Recorder

Phase 1

Introduction

The FPGA can be used to allow humans to control devices by receiving input from a human interface device and converting the signals from the human interface device to signals used by the device being controlled. Converting data between devices requires the conversion of the interface itself and doing some processing on the data. In our project, the interface will be converted from USB to serial and the data will be converted from joystick position values to servo adjustment values.

Concept

In order for a joystick to control a robot, the signals from the joystick need to be converted into signals that the robot understands. A microcontroller with a built in USB controller will be used to connect to the USB joystick. The USB controller will handle the USB interface and receive the USB packets sent from the joystick. The microcontroller will take the data received by the on board USB controller and send that data to the FPGA. The FPGA will take the raw joystick position data and convert it to servo position adjustments for the robot. The FPGA will make adjustments to the current servo positions and send the new servo positions to the robot over the serial bus. The FPGA will then display the current joystick and servo positions on the VGA monitor.

Proposed Work

  1. The microcontroller will run a program that will handle the USB interface with the joystick and convert the packets received over the USB interface to an interface that is receivable by the FPGA on the Spartan III development board.
  2. The FPGA will run a module that receives the joystick position data from the microcontroller.
  3. The FPGA will run a module that converts the joystick position data to the appropriate servo position adjustments for the robot.
  4. The FPGA will run a module that outputs the servo positions to the robot over the serial port.
  5. The FPGA will run a module that displays the current joystick and servo positions on a VGA monitor.

Required Parts

  • Spartan III development board
  • PIC18F4455 microcontroller
  • USB joystick
  • USB port to connect the joystick to the micrcontroller
  • External power supply for microcontroller and joystick
  • Robot

Expected Deliverables

With the parts listed, the Spartan III board will control the movements of the robot and output the current joystick and servo positions to a VGA monitor.

Phase 2

Introduction

The FPGA can be used to allow humans to control devices by receiving input from a human interface device and converting the signals from the human interface device to signals used by the device being controlled. Converting data between devices requires the conversion of the interface itself and doing some processing on the data. In our project, the interface will be converted from USB to serial and the data will be converted from joystick position values to servo adjustment values.

Concept

In order for a joystick to control a robot, the signals from the joystick need to be converted into signals that the robot understands. A microcontroller with a built in USB controller will be used to connect to the USB joystick. The USB controller will handle the USB interface and receive the USB packets sent from the joystick. The microcontroller will take the data received by the on board USB controller and send that data to the FPGA. The FPGA will take the raw joystick position data and convert it to servo position adjustments for the robot. The FPGA will make adjustments to the current servo positions and send the new servo positions to the robot over the serial bus. The FPGA will then display the current joystick and servo positions on the VGA monitor.


Proposed Work

  1. A module will be developed to translate data received from the keyboard. This module will be phased out by the usb joystick. To be developed by:
  2. A module will be developed to send data over the serial port to the robot. To be developed by:
  3. A module will be developed to mantain current position of the robot, and it will determine what the next position will be. To be developed by:
  4. A module will be developed to receive information from a usb joystick. The pic18 is an intermediate step in this module. It will translate the usb joystick data into movements and send it to the fpga. To be developed by:

Modules

  • Keyboard Interface
    • The keyboard will initially contol movement of the robot. Two rows of keys, A-J and Z-M, will control the 7 different servos on the robot. A key is needed for each direction of movement for each servo.
Table 1: Keyboard opcode
Key Function Opcode
‘a/z’ Left Wheel movement 0000 - 0001
‘s/x’ Right Wheel movement 0010 - 0011
‘d/c’ Base rotation 0100 - 0101
‘f/v’ Shoulder movement 0110 - 0111
‘g/b’ Elbow movement 1000 - 1001
‘h/n’ Wrist movement 1010 - 1011
‘j/m’ Gripper movement 1100 - 1101
  • Serial Interface
    • This module will output the decoded servo position to the robot.
    • Input(s): Servo Number, new Servo postition
    • Output(s): Serialized transmission of Servo Data
  • Position Module
    • This module will take the input from the keyboard module and convert it into servo positions. It will output the postions to the serial module.
    • Input(s): Opcode
    • Output(s): Servo Number, new Servo position
  • USB Module


Required Parts

  • Spartan III development board
    • Datasheet: [1]
  • PIC18F4455 microcontroller
    • Part Number: PIC18F4455
    • Datasheet: [2]
    • Price: Free Sample
  • USB joystick
    • Price: existing hardware
  • USB port to connect the joystick to the micrcontroller
    • Part Number: yet to be determined
    • Price: yet to be determined
  • External power supply for microcontroller and joystick
    • Part Number: unknown
    • Price: exisiting hardware
  • Robot
    • Price: exisiting hardware

Expected Deliverables

Using the parts listed, we will first interface the robot via the keyboard, and add usb joystick functionality as time permits.

Phase 3

Review of Proposed Work

  1. A module will be developed to translate data received from the keyboard. This module will be phased out by the usb joystick. To be developed by: Jimmy Rapier
  2. A module will be developed to send data over the serial port to the robot. To be developed by: Jeffrey Lorens
  3. A module will be developed to mantain current position of the robot, and it will determine what the next position will be. To be developed by: Jimmy Rapier
  4. A module will be developed to receive information from a usb joystick. The pic18 is an intermediate step in this module. It will translate the usb joystick data into movements and send it to the fpga. To be developed by: Yuko Shimomoto and James Sakalaukus


Module Descriptions

  • Keyboard Module (decodeop.v)
    • This module utilizes the ps2core.v and decodeop.v from the Calculator lab.
    • This module has two inputs: ps2_data, ps2_clock and two outputs: upDown, servo
    • (See Table I from Phase II for opcode definitions)
  • Position Module (position.v)
    • This module takes the opcode from the Keyboard, and eventually the Joystick, and converts it into the position for the robot
    • This module has three inputs: clk, upDown, servoNum and three outputs: load, sPosition, servo
  • SerialToRobot Module (SerialToRobot.sch, debounce.sch, ClkUnit.vhd, TxUnit.vhd, datareg.v)
    • The SerialToRobot module converts the individule servo positions from the position module into a serial stream to the robot. The serialToRobot module has a eight bit input for the servo's number, a eight bit input for the servo's position, and a one bit load enable input. The modules's only output is a serial transmition line. When the load enable line is pulled high by the position module, the SerialToRobot module loads the values on the servo number and position buses and places the values into a buffer. The values are then sent to the serial transmitter. The serial transmitter is sent three bytes of data that it will send to the robot across the serial line. The first byte sent to the robot is hex FF. This byte tells the servo controler on the robot to get ready to receive the next two bytes of data. the second byte is the number of the servo to be moved and the thrid byte is the location to move the servo to.
  • USB Module
    • The pic18 will output an opcode over a 5-bit parallel bus to the fpga. The usb module on the fpga translates this opcode and sends two outputs to the servo position module: direction (up or down), and servo number.

Expected Deliverables

The expected deliverables are similar to phase 2. The pic18 used for usb interpretation may be phased out, in which case a usb to ps/2 converter will be used to interface the joystick to the fpga.


Phase 4

Review of Proposed Work

  1. A module will be developed to translate data received from the keyboard. This module will be phased out by the usb joystick. To be developed by: Jimmy Rapier and James Sakalaukus
  2. A module will be developed to send data over the serial port to the robot. To be developed by: Jeffrey Lorens and Yuko Shimomoto
  3. A module will be developed to mantain current position of the robot, and it will determine what the next position will be. To be developed by: James Sakalaukus and Jeffrey Lorens
  4. A module will be now receiving information directly from keyboard instead of using USB, which was proposed in Phase 3.

Module Descriptions

  • Top Module (newtop.sch)
    • This module contains all of the submodules.

toplevel.GIF

  • Keyboard Module (decodeop.v and ps2core.v)
    • This module utilizes the ps2core.v and decodeop.v from the Calculator lab.
    • This module has three inputs: ps2_data, ps2_clock, valid and two outputs: upDown, servo
    • (See Table I from Phase II for opcode definitions)
  • Position Module (position.v)
    • This module takes the opcode from the Keyboard module and converts it into a servo number and a increment or decrement for that servo's position. This module also holds the current position for each servo and outputs a servo's number and position whenever the position of a servo changes.
    • This module has three inputs: clk, upDown, servoNum and three outputs: load, sPosition, servo
  • SerialToRobot Module (SerialToRobot.sch)
    • The SerialToRobot module contains the following submodules: datareg.v and rs232_uart.vhd. The RS232 Modules is a serial uart that consists of the submodules rs232tx.vhd, ram16*8.vhd, and rss232rx.vhd. The serial uart was found online at http://www.hunteng.co.uk/support/ipbyfunction.htm[1]
    • The SerialToRobot module converts the servo positions from the position module into a serial stream to the robot. The serialToRobot module has a eight bit input for the servo's number, a eight bit input for the servo's position, and a one bit load enable input and clock. The modules's only output is a serial transmition line. When the load enable line is pulled high by the position module, the SerialToRobot module loads the values on the servo number and position buses and places the values into a 32 byte buffer contained in the datareg module. The values are then sent to the serial transmitter by the datareg module. The serial transmitter is sent three bytes of data that it will send to the robot across the serial line. The first byte sent to the robot is hex FF. This byte tells the servo controler on the robot to get ready to receive the next two bytes of data. the second byte is the number of the servo to be moved and the thrid byte is the location to move the servo to.

robottoserial.GIF


Expected Deliverables

The expected deliverables are similar to phase 3. The difference is instead of using the pic18 and the USB joystick as the human interface device, a PS2 keyboard is used.

    • Here is the Robot waiting for commands.

robot1.JPG

    • Here is a link to downLoad the source code package.[3]
Retrieved from "http://www.ece.msstate.edu/wiki/index.php/USB_Robot"
Category: Digital Systems Design
Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
SEARCH
TOOLBOX
LANGUAGES
 
Toolbox
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Powered by MediaWiki
  • This page was last modified on 12 January 2007, at 19:43.
  • This page has been accessed 6,320 times.
  • Privacy policy
  • About Ece
  • Disclaimers

Mississippi State University Home| PO Box 9571, Mississippi State, MS 39762 | Main Office: 1.662.325.3912

Bagley College of Engineering | Mississippi State University| Legal| Webmaster| Intranet

Page modified: Tue, 23 Sep 2008 15:18:39 CDT