Handheld Controller for Use in a Virtual Environment
Total Page:16
File Type:pdf, Size:1020Kb
Handheld Controller for use in a Virtual Environment MQP Final Report Worcester Polytechnic Institute Roger Burns CS 2007 [email protected] Nick Wirth ECE 2007 [email protected] Advisors: Robert Lindeman (CS) [email protected] Susan Jarvis (ECE) [email protected] Roger Burns, Nick Wirth Abstract of the Final Report for the Virtual Environment Handheld Controller By Nicholas Wirth Roger Burns The purpose of this project was to design a new handheld Virtual Environment controller. The controller was designed based on research regarding previous designs. This research started with the mouse and the first Atari Joystick, and progressed to encompass the new Nintendo Wii controller. This provided a sense of technology to use, where it had been used before, and how it could be applied in the future. From that point it was a matter or designing the controller based upon a set of specifications that were drafted to provide guidelines and direction. These included the functionality of the controller, the specific components needed to provide that functionality as well as how the controller would communicate with a personal computer. To aid in the implementation of the controller, a virtual environment was created to test the various inputs the controller provided. After mapping the controller functions to the various components, these were tested in the environment, looking specifically at navigation and object manipulation. Other aspects were also incorporated, such as a modal design, where based upon button presses, different components on the controller can have different purposes. Future work includes the expansion of user testing to provide an idea of feasibility against competing controllers as found in research. The flexibility of the environment as well as the controller allow for adaptation to certain tasks or alternative mappings of the controls to functions. Because the controller at the moment is not in a hand held form factor, it is also recommended that a housing be provided at some point in the near future to lend to possible market venture. ii Roger Burns, Nick Wirth Table of Contents Abstract of the Final Report for the Virtual Environment Handheld Controller ............... ii List of Figures ................................................................................................................ v List of Tables................................................................................................................. vi 1. Introduction ................................................................................................................ 1 2. Project Background..................................................................................................... 2 2.1 Comparative Products ........................................................................................... 2 2.1.1 Controller History .......................................................................................... 2 2.1.2 Current Competition....................................................................................... 5 2.2 Component Selection ............................................................................................ 7 2.2.1 Accelerometers............................................................................................... 8 2.2.2 Optical Encoders............................................................................................ 9 2.2.3 Potentiometers...............................................................................................11 2.2.4 Digital Buttons..............................................................................................12 4. Project Design Overview ...........................................................................................16 4.1 Hardware .............................................................................................................16 4.1.1 Sensors and Signal Conditioning ...................................................................17 4.1.2 Microprocessor..............................................................................................20 4.1.3 USB Controller .............................................................................................21 4.1.4 Layout and Construction ...............................................................................22 4.1.4.1 BFT232U169 test board .............................................................................23 4.1.4.2 Custom Printed Circuit Boards ...................................................................24 4.1.4.3 Sensor Wiring ............................................................................................26 4.2 Software...............................................................................................................31 4.2.1 Virtual COM.................................................................................................31 4.2.3 Information Parsing.......................................................................................32 4.2.4 OpenGL ........................................................................................................34 4.2.4.1 Navigation..................................................................................................34 4.2.4.2 Object Selection .........................................................................................35 4.2.4.3 Object Manipulation...................................................................................36 4.2.5 The Virtual Environment...............................................................................39 5. Results and Analysis..................................................................................................40 5.1 Hardware .............................................................................................................40 5.1.1 Sensors..........................................................................................................40 5.1.2 Microprocessor..............................................................................................45 5.1.3 Communication.............................................................................................46 5.1.4 Program Flow................................................................................................47 5.1.5 System Testing..............................................................................................47 5.2 Software...............................................................................................................47 5.2.1 Component Noise..............................................................................................48 6. Conclusions ...............................................................................................................51 6.1 Future Work.........................................................................................................52 6.1.1 Software........................................................................................................52 6.1.2 Physical Design.............................................................................................52 6.1.3 Continued Testing .........................................................................................54 References.....................................................................................................................55 iii Roger Burns, Nick Wirth Appendix A: TUSB3410 Design....................................................................................57 Appendix B: Softbaugh BFT232U169 Schematic ..........................................................61 Appendix C: MSP430F169 Code...................................................................................62 Appendix D: Intersection Math & Code.........................................................................67 Appendix E: Serial Communication Code......................................................................71 Appendix F: Parser ........................................................................................................75 Appendix G: Virtual Environment Code .......................................................................83 iv Roger Burns, Nick Wirth List of Figures Figure 1 : Atari Joystick ................................................................................................. 3 Figure 2 : Nintendo Controller ....................................................................................... 4 Figure 3 : Nintendo 64 Controller .................................................................................. 4 Figure 4 : PlayStation 2 and Xbox Controllers ............................................................... 5 Figure 5 : Spaceorb 360 ................................................................................................. 6 Figure 6 : Nintendo Wii Remote...................................................................................... 7 Figure 7 : Pitch, Yaw, Roll ............................................................................................. 8 Figure 8: Optical Wheel Encoder ................................................................................... 9 Figure 9: Optical Encoder Waveform ............................................................................10 Figure 10: Generic Potentiometer .................................................................................11 Figure 11: Joystick Mechanics ......................................................................................12