Remote Touchscreen-Controlled Defense Turret
Total Page:16
File Type:pdf, Size:1020Kb
University of Central Florida Remote Touchscreen- Controlled Defense Turret Senior Design Documentation Courtney Mann, Brad Clymer, Szu-yu Huang Group 11 Fall 2011-Spring 2012 Table of Contents 1 EXECUTIVE SUMMARY ............................................................................... 1 2 PROJECT DESCRIPTION ............................................................................. 2 2.1 Project Motivation and Goals ................................................................... 2 2.2 Objectives ................................................................................................ 3 2.3 Project Requirements and Specifications ................................................ 3 2.3.1 User Interface ................................................................................... 4 2.3.2 Tablet ................................................................................................ 5 2.3.3 Targeting Control .............................................................................. 5 2.3.3.1 Pan-Tilt Motor control ................................................................. 5 2.3.3.2 System Processor ...................................................................... 5 2.3.3.3 PCB Design ................................................................................ 6 2.3.4 Firing Control .................................................................................... 6 2.3.4.1 Tablet/Microcontroller Interface .................................................. 6 2.3.4.2 Microcontroller-Gun Interface ..................................................... 7 2.3.4.3 Paintball Markers ........................................................................ 7 2.3.4.4 Laser Pointer .............................................................................. 8 2.3.5 Image Processing ............................................................................. 8 2.3.5.1 Camera Hardware ...................................................................... 8 2.3.5.2 Target Acquisition ....................................................................... 9 2.3.6 Wireless Communication ................................................................ 10 2.3.7 Range Calculation ........................................................................... 11 2.3.7.1 Rangefinder Hardware ............................................................. 11 2.3.7.2 Software ................................................................................... 11 2.3.8 Power Supply .................................................................................. 11 2.3.9 Hardware Housing .......................................................................... 12 3 RESEARCH RELATED TO PROJECT DEFINITION ................................... 14 3.1 Division of Labor .................................................................................... 14 3.2 Existing Similar Projects ........................................................................ 14 3.3 Relevant Technologies .......................................................................... 19 3.3.1 Rangefinders .................................................................................. 20 3.3.2 System Processer Board ................................................................ 21 3.3.2.1 FPGA ....................................................................................... 22 3.3.2.2 Microcontrollers ........................................................................ 22 ii 3.3.3 Remote Computation ...................................................................... 23 3.3.4 Paintball Guns................................................................................. 25 3.3.4.1 Mechanical Trigger Actuation ................................................... 26 3.3.4.2 Electronic trigger Actuation....................................................... 26 3.3.5 Airsoft Gun ...................................................................................... 27 3.3.6 Laser Pointer .................................................................................. 27 3.3.7 Wireless Technologies .................................................................... 28 3.3.7.1 Bluetooth .................................................................................. 28 3.3.7.2 ZigBee ...................................................................................... 29 3.3.7.3 Wireless USB ........................................................................... 30 3.3.8 Motors ............................................................................................. 31 3.3.8.1 Stepper Motors ......................................................................... 31 3.3.8.2 Servo Motors ............................................................................ 31 3.3.9 PCB ................................................................................................ 32 3.3.10 Cameras ...................................................................................... 33 3.3.10.1 USB Webcams ......................................................................... 33 3.3.10.2 Infrared ..................................................................................... 34 3.3.10.3 USB 2.0 Hi-Def ......................................................................... 35 3.3.11 Power Sources ............................................................................ 36 3.3.11.1 Batteries ................................................................................... 36 3.3.11.2 Solar ......................................................................................... 37 3.3.11.3 AC Power ................................................................................. 38 3.3.11.4 Generators ............................................................................... 38 4 PROJECT HARDWARE AND SOFTWARE DESIGN DETAILS .................. 39 4.1 Initial Design Architecture and Related Diagrams ................................. 39 4.1.1 Hardware Block Diagram ................................................................ 39 4.1.2 Software Block Diagram ................................................................. 40 4.1.3 Turret Design .................................................................................. 41 4.2 User Interface ........................................................................................ 42 4.3 Targeting Control ................................................................................... 44 4.3.1 Pan-and-Tilt Control ........................................................................ 44 4.3.1.1 Arduino Servo Control Library .................................................. 45 4.3.1.2 Servo Motors ............................................................................ 47 4.3.1.3 PID Controller ........................................................................... 47 iii 4.3.1.4 Servo Drivers ............................................................................ 49 4.3.2 PCB Design .................................................................................... 50 4.4 Firing Control ......................................................................................... 52 4.4.1 Tablet/Microcontroller Interface....................................................... 52 4.4.2 Microcontroller/Gun Interface .......................................................... 52 4.5 Image Acquisition .................................................................................. 53 4.5.1 Camera Hardware ........................................................................... 53 4.5.2 Target Acquisition ........................................................................... 53 4.5.2.1 Object Detection ....................................................................... 53 4.5.2.1.1 Background Subtraction ......................................................... 53 4.5.2.1.2 Color Recognition ................................................................... 58 4.5.2.2 Object Representation .............................................................. 59 4.5.2.3 Object Tracking ........................................................................ 59 4.6 Wireless communication ........................................................................ 61 4.6.1 Camera-UI ...................................................................................... 61 4.6.2 UI-Arduino ....................................................................................... 61 4.7 Range Calculation ................................................................................. 63 4.8 Power Supply ........................................................................................ 64 4.9 Hardware Housing ................................................................................. 64 5 DESIGN SUMMARY OF HARDWARE AND SOFTWARE .......................... 67 5.1 Turret and Case .................................................................................... 67 5.2 Image Processing .................................................................................. 68 5.3 Electrical Hardware ............................................................................... 70 6 PROJECT PROTOTYPE CONSTRUCTION ............................................... 72 6.1 Hardware Fabrication ............................................................................ 72 6.1.1 Housing Assembly .........................................................................