PROJECT HEAD CASE
Final Presentation
Dan Klowden Jon Burns cse477 Spring 2000
THE PURPOSE
Provide paraplegics the ability to perform daily tasks such as household chores without assistance
OUR GOALS
Create a robot that can be controlled by head motion and eye movement patterns
Wheeled robot that picks up things Helmet control device Wireless communication between helmet and robot
A sampler of the bigger picture
FINAL SYSTEM DESCRIPTION
All goals accomplished!
Lego Mindstorm robot Infrared communication Control helmet
It works!
SYSTEM OVERVIEW
HCU
Accelerometer Interface
XS-40
8051 Atmel Microprocessor Keil Vision
Communication
IR
Camera Interface
FPGA Xilinx Sim. NQC Robot
ACCELEROMETER INTERFACE
Left / Right Head Tilt Accelerometer Forward / Backward Head Tilt
X, Y Signal to 8051
CAMERA INTERFACE
THE ATMEL 8051
Accelerometer X and Y Signals
8051
Wireless Communication To Robot
Camera SigChg Signal
ATMEL 8051 CONT.
Integration of all components!
Serial Communication
Timer2 initializations Serial interrupt settings
Lego Protocol
Parity bit calculation Organization of packets
Accelerometer Interface
X,Y interrupts Calibration
Camera Interface and the Control State
SigChg ACK
CONTROL STATE DIAGRAM
Dependent on SigChg signal from camera interface
#1
Wheeled Base
#2
Mid Arm Joint, Wrist Spin
#3
Clamp, Lower Arm Joint
DESIGN DETAILS
Lego RCX Control Routines
RCX Command Center NQC Coding
Wireless Communication
Serial Interface
Lego Protocol
THE LEGO RCX
RCxCC The Command Center
LEGO RCX CONT.
Not Quite C
/*Sets the power to the motor depending on the tilt*/ void motor_drive(int forwardR,int forwardL, int powerR, int powerL) { if(forwardR) OnRev(OUT_A); else OnFwd(OUT_A);
if(forwardL) OnRev(OUT_C); else OnFwd(OUT_C);
SetPower(OUT_A,powerR); SetPower(OUT_C,powerL);
SERIAL COMMUNICATION
2400 baud rate
Timer 2 generated
16 bit auto-reload (T2MOD=0x02) Re-load value = 65,224
//Timer 2 DMA locations sfr T2MOD = 0xC9; sfr T2CON = 0xC8; sfr RCAP2L = 0xCA; sfr RCAP2H = 0xCB; //initializations T2MOD = 0x02; T2CON = 0x34; //timer reload values = 65,224 RCAP2H = 0xFE; RCAP2L = 0xC8; // set SMOD to 1 PCON = 0x80;
Mode 3
Variable baud rate 9 bit UART Programmable 9th bit (parity)
LEGO PROTOCOL
8 bit data; start and stop bits
Not Return to Zero (MAX232) Odd parity Packet Protocol
0x55 0xFF 0x00
Header Command 0x14 0xEB 0x01 0xFE 0x02 0xFD 0x02 0xFD 0x00 0xFF 0x19 0xE6 Variable Source type (always 2) Value lower byte Checksum Value upper byte
LEGO PROTOCOL CONT.
Fill Data Buffers
Trigger Serial Interrupt Routine
Stall Atmel 8051
Invert Parity
ACCOMPLISHMENTS
Functional Robot Wireless Communication Eye Pattern Detection Stylish Head Gear
GOOD / BAD DECISIONS?
Lego Mindstorm set was a good investment
Included IR tower RCX micro processor RCxCC / NQC easy to code
Thresholding image processing of the eye Initial plan to use RC-2, 256K memory
FUTURE IMPROVEMENTS?
Eye Pattern Detection
FSM robustness issues More patterns to detect? A different approach?
Edge detection of pupil?
A better camera than the RC-1 would be nice
Communication error checking
Check response from RCXs
Stronger, better robot