scieee AI-readable full text Open interactive document viewer

Design and development of a glove with remote controller function for video games

Llorens Angulo, Andrés

Abstract

This document is the Final Degree Work of the Bachelor’s Degree in Video Game Design and Development. This work consists in the design and the development of a glove that fulfills the function of a video game controller and that can be used on any console or computer to replace the use of the common DualShock1 control. This controller used as an input controller will use the movements and rotation of the hand and the movements of the fingers. As an example of a game which will be able to use this device is the well known “Surgeon Simulator”.

Full text

Design and Development of a Glove with Remote controller function for video games Andrés Llorens Angulo Final Degree Work Bachelor’s Degree in Video Game Design and Development Universitat Jaume I September 20, 2020 Supervised by: José Vte. Martí Avilés 1 ABSTRACT This document is the Final Degree Work of the Bachelor’s Degree in Video Game Design and Development. This work consists in the design and the development of a glove that fulfills the function of a video game controller and that can be used on any console or computer to replace the use of the common DualShock1 control. This controller used as an input controller will use the movements and rotation of the hand and the movements of the fingers. As an example of a game which will be able to use this device is the well known “Surgeon Simulator”. KeyWorks: Remote controller, Arduino, Sensors, Programming, Unity. 2 3 CONTENTS Introduction and Motivation of Work 6 Related subjects 7 VJ1210 - Computer Technology 7 VJ1214 - Video Game Consoles and Devices 7 VJ1225 - Operating Systems 7 Objectives 8 Planned tasks and their estimated time 9 Expected results 10 Design 10 Glove 10 Electronics Design 11 Hardware kit 12 Hardware development boards 12 Wireless connections 13 Inertial Measurement Unit 14 Flex Sensors 15 LCD screens and buttons 16 Battery 18 Carbon Zinc Batteries 18 Alkaline Batteries 18 9V Batteries 19 Coin Cell Batteries 19 Lithium Ion Batteries 19 Lithium Polymer Batteries 20 Vibrators 20 3D printer and plastic 21 PLA filament 22 ABS filament 22 PETG filaments 22 Flexible filament 22 PC filament 23 HIPS filament 23 Silky filament 23 Carbon fiber filament 24 Execution of the project 25 Hardware 25 3D Glove 25 4 Electrical circuit 28 Software 30 FlexLibrary.h & FlexLibrary.cpp 31 MPU6050.h & MPU6050.cpp 33 BluetoothSerial.h BluetoothSerial.cpp 33 Unity Project 34 Results 36 Execution Scheduling 38 Conclusions 40 5 1. Introduction and Motivation of Work As my Final Degree Work of the Bachelor’s Degree in Video Game Design and Development, I would like to build a personalized remote control. To start working on the project, an Arduino will be used, which will analyze the incoming information from sensors such as gyroscope, as accelerometer and flexible sensors and send it to a computer for a result. The idea of this work was conceived after a close relative suffered a traffic accident in which his wrist was broken which prevented him to play video games anymore. With only one hand you can not play games that use remote controllers such as DualShock and there is not a good alternative for it. So I decided to work on a solution for this type of situation. It will not only focus on these cases, but will focus on different types of situations. The "Power Glove" Nintendo was a product marketed in 1989 that 1 was exposed to a similar idea. But was a failure due to the technology of the time. Possibly with current technologies could become a viable product. 1 Remote controller made by Nintendo Entertainment System [...]. The Power Glove was not very popular and it was hardly criticized for its imprecision and difficulty of use. - Wikipedia 6 2. Related subjects Subjects related to my Final Degree Work of the Bachelor’s Degree in Video Game Design and Development are: 2.1. VJ1210 - Computer Technology This subject focuses to a large extent on the understanding of circuits. It covers the design, assembly and functionality of electronic circuits. Elements that are present in the development of a video game controller. 2.2. VJ1214 - Video Game Consoles and Devices This subject focuses on the operation of both hardware and software of external devices and consoles, whether portable or desktop. So the relationships between hardware and software are well known. 2.3. VJ1225 - Operating Systems The controller is connected to a computer or console and must have communication knowledge about the operating system being used by the computer or console. 7 3. Objectives Tho objectives of this Final Degree Work of the Bachelor’s Degree in Video Game Design and Development are: ➔To design a remote controller which uses control movements and rotations of the hand to interact with a video game or other. ➔To design a controller that can be a viable alternative for people who do not have both hands or have problems using the common “DualShock” controller . 2 ➔To design and print the physical parts of the glove. 2 8 This module is what will provide the controller with information about how the hand moves without counting individual hand movements. That is, the acceleration and rotation of the hand. 6.4. Flex Sensors A flex sensor (Image 4) is a sensor that measures the amount of deflection or flexion. In general, the sensor is attached to a surface and the resistance of the sensor element varies when the surface is bent. Since the resistance is directly proportional to the amount of curvature, it is used as a goniometer, and is often called a flexible potentiometer. The flexometers have a voltage of 0-5V, a base resistance, that is, with a curvature 0, of 25k Ω, a tolerance of approximately 30% and a resistance with a curvature of 45kΩ to 125kΩ Ohms depending on the bend. This sensor is the one that will measure the movement of each finger individually. It is the main monetary expense because each sensor can range between € 14 and € 60 and a total of 5 are necessary and it has to have a 15 minimum length of 10 cm long so that it can correctly measure the complete curvature of the finger. 6.5. LCD screens and buttons A display is required to view controller information, as well as to calibrate, connect, and know the remaining battery in the controller. For convenience and simplicity, a 16x2 or 16x4 LCD screen (Image 5) will be implemented. 16x2 LCD screens are cheaper than 16x4, but 16x4 can display more information simultaneously, but they are larger. These displays have the disadvantage that they use many pins on the board. To solve the problem of using too many pins, an SPI converter or I2C be used to manage the screen and transform all the necessary pins in three, one for the power supply (pin 3v3), another to the ground (pin earth), and the last one for data input (output data pin). 16 To navigate through the interface, the user needs a keyboard. Some LCD screens come with buttons included as this example incorporates 6 buttons (Image 6). 17 In the event that the screen does not come with a built-in keypad, some external buttons should be added so that the interface can be navigated. 6.6. Battery There are many ways to power an Arduino device but selecting the proper battery can make or break a sensor. Many trade-offs are necessary to match a battery to a specific task. One of the first decisions to make would be to select between a primary or secondary battery. Primary batteries are the most common type of battery. These are non-rechargeable, common-sized, and dependable in nearly any environment. Available in standard sizes from AAA to D Cell, it delivers a steady 1.5 volts to power a device. A 9V battery is also considered a primary battery and is actually made up of small individual 1.5-volt cells. On the other hand, secondary batteries come in many different configurations, and sizes. They are rechargeable, dependable, and usually more expensive than a primary battery. Depending on the specific battery, some require special handling and unique charging devices. If improperly used, they may catch fire or even explode. In this project with a voltage of 3.4-5V because outside the voltage range some components such as the flexometer or the gyroscope could break. 6.6.1. Carbon Zinc Batteries Each cell is capable of providing 1.5 volts. They are inexpensive, designed for light loads, and have a relatively long life. The carbon-zinc batteries are not rechargeable. 6.6.2. Alkaline Batteries Alkaline batteries have a higher energy density, and longer shelf life than carbon-zinc batteries. The output voltage of an alkaline battery drops as the battery is used, so its use is dependent on the load requirements.. 18 Double-A (AA) alkaline batteries are capable of delivering approximately 700mA of current without overheating the battery. 6.6.3. 9V Batteries It’s a non-rechargeable battery made up of smaller cells stacked to create a 9-V source. A 9-V lithium battery rated at approximately 500mAh delivering 25ma has a life expectancy of a little more than 24 hours. When delivering 1A, it would last less than 8 hours. Alkaline batteries are capable of considerably less. When connected to an Arduino, the 9V battery goes through a linear regulation to lower the voltage to an acceptable level. This alone would tax a typical 9V battery. It would do better with 3 AA batteries connected to the 5V input on the Arduino bypassing the regulator. 6.6.4. Coin Cell Batteries The coin cell battery is a lithium battery that cannot be recharged. It is considered a low power cell that can be stacked to increase its voltage. 6.6.5. Lithium Ion Batteries Lithium is the lightest of all metals, has the greatest electrochemical potential and provides the largest energy density for weight. The high cell voltage of 3.6 volts allows battery pack designs with only one cell. Despite its overall advantages, lithium-ion has its drawbacks. It is fragile and requires a protection circuit to maintain safe operation. The battery frequently fails after two or three years. It should be noted that other chemistries also have age-related degenerative effects. This is especially true for nickel-metal-hydride if exposed to high ambient temperatures. At the same time, lithium-ion packs are known to have served for five years in some applications. The most economical lithium-ion battery in terms of cost-to-energy ratio is the cylindrical 18650 (size is 18mm x 65.2mm). This cell is used for mobile computing and other applications that do not demand ultra-thin 19 geometry. If a slim pack is required, the prismatic lithium-ion cell is the best choice. These cells come at a higher cost in terms of stored energy. 6.6.6. Lithium Polymer Batteries The lithium-polymer differentiates itself from conventional battery systems in the type of electrolyte used. The original design uses a dry solid polymer electrolyte. This electrolyte resembles a plastic-like film that does not conduct electricity but allows ions exchange. The dry polymer design offers simplifications with respect to fabrication, ruggedness and safety. Unfortunately, the dry lithium-polymer suffers from poor conductivity. The internal resistance is too high and cannot deliver the current bursts needed to power modern communication devices. Lithium-ion-polymer has not caught on as quickly as some analysts had expected. Its superiority to other systems and low manufacturing costs has not been realized. No improvements in capacity gains are achieved, in fact, the capacity is slightly less than that of the standard lithium-ion battery. 6.7. Vibrators This module has an operating voltage of 3-5V, a dimension of 23x21mm and a power of 9000 rpm minimum. This component works with a motor and unbalanced weight than generating a vibration motor rotates the faster the motor turns. Uses a single input pin which is used to vary the power of vibration of the module (Image 7). To match the characteristics of traditional controls. Controller glove must have a vibration. Feature that was not present until the Playstation 3 that revolutionized the video game market. The most current models of controls use an HD vibration that works like the membranes of the speakers that generate vibrations in high definition and very subtle. 20 Being modules so small, less than 1cm x 1cm and have a cost of less than 50 cnt. You can incorporate as many as you can and does not affect the functionality of the product. 6.8. 3D printer and plastic 3D printers offer the ability to design and print in different materials a component in a short period of time. For printing, both 3D printers and the material used to print are so important. It has availability of a 3D printer ENDER 3 PRO. This printer has a camera 220 x 220 x 250 mm, a magnetic bed, an extruder with a nozzle top speed of 200 mm / s printed filament. The most remarkable problem with this model is that it does not have a heated bed, which is a fundamental requirement for some types of filaments. As it is possible to use this printer without additional cost and quickly, the question falls on what type of filament will be used and for what purpose.The filaments for the 3D printer are varied and the most used are: 21 6.8.1. PLA filament It is one of the 3D printer filaments most used because it is very stable and does not need a warm bed. It is obtained from matter and does not produce toxic gases. In addition to being a recyclable material, it offers faster printing speed, being the option most used by users. The extrusion temperature of PLA filament is between 190 and 220 ° C and the hot bed should be between 40-50 ° C. 6.8.2. ABS filament This type of filament for 3D printing is used in professional environments. It is characterized by high resistance to both impact and high temperatures. Also allows work on the piece when printed. It has the disadvantage that toxic gases produced at the time of printing. The hot bed should be about 100-110 ° C for filament ABS and optimum extrusion temperature should be between 210-250 ° C. 6.8.3. PETG filaments This 3D printer filament is a plastic similar to PET. It is a material highly resistant to corrosion, temperature, impacts and chemical agents. It is also waterproof and has a low moisture absorption, making it ideal for preserving food products. The problem with this material is that it is not biodegradable, from 70ºC it becomes weak. PETG extrusion temperature is 220-250 ° C filament with duty hot bed 40-70 ° C 6.8.4. Flexible filament This 3D printer filament combines plastic with rubber and is characterized by its ability to stretch and its resistance to impacts and breakage due to malleability. Furthermore, it is a recyclable filament and its 22 surface becomes very smooth. It is suitable not to melt at temperatures above the recommended to avoid loss of elasticity. To correct the flexible filament extrusion hot bed should be placed between 30-40 ° C and the temperature between 210-230 print ° C. 6.8.5. PC filament The PC filament is a thermoplastic material highly resistant to high temperatures withstands high optical clarity. It tends to bend and warp similar to hard rubber until it eventually breaks. Extrusion temperature is between 230-270 ℃, using a warm bed is recommended at 90 ℃. 6.8.6. HIPS filament The HIPS filament is generally used as supporting material in 3D printing. It has properties and characteristics related to the ABS filament, being used together with it for the generation of supports in hollow areas, overhangs, etc. The HIPS filament is soluble in D-Limonene. Extrusion temperature 210-250 ℃, hot bed 100-110 ° C. 6.8.7. Silky filament The silky filament composed PLA polymer has greater resistance than conventional PLA, appearance is very bright, offering a similar finish silk satin. It has greater hardness, less brittleness, low shrinkage, good rigidity and excellent against simple PLA. Recommended extrusion temperature is 190-230 ℃with warm bed at 45-50 ℃ 23 6.8.8. Carbon fiber filament In formulation 15% of carbon fiber is used, providing superior rigidity, and a structural capacity and very remarkable adhesion layer. One of the most competitive and interesting filaments, since the carbon fiber provides unique properties. Carbon fiber filament extrusion temperature: 210ºC - 240ºC. Warm bed temperature: 40 ° C - 50 ° C. 24 The Arduino IDE interface has predefined methods for convenience in development. Like the setup () method, which is executed at the beginning only once to configure the desired parameters, and the loop () function, which is executed in a loop. After adding a library for the development of ESP boards and library manager which can generate .h and .cpp, library file types in C++, classes for convenience when developing software. Then the generated libraries for development will be presented for this project. 7.2.1. FlexLibrary.h & FlexLibrary.cpp After an investigation of various kinds for flexible sensors a common mistake among them was found. Facilitate the use of the flexible sensor but cost very little configurable. Ie those libraries using flexible sensors could only be in certain pins that are unworkable for the project or extremely expensive to make. For the proper functioning of the library, each virtual sensor object is provided with a series of values. Among them is the number of the pin to transmit the input data, the minimum and maximum value that the sensor can achieve, if desired puts a default value, and the type of smoothing to be explained later. When recording flexible sensor input data, the most classic and simple to implement is a direct and unfiltered reading of the data that generates a series of numbers depending on the curvature of the sensor. As this is a direct data collection, there are small variations that cause the number to vary even though the sensor does not appear to bend, and that is because the sensor is extremely sensitive and detects the slightest movement. This can become a problem when developing a controller for the user, while still apparently could see that the controller detects motion and this would ruin their experience. 31 To avoid this case a filter approach was implemented by half. That is, they obtain the results of 10 measurements in a row in time and towards the average of them to use is. This filter would generate smoother motion in time and hide small errors which generates a raw analysis data sensor. However, the 10 samples that are made to the media are so fast that in practice it does not differ much from the method without a filter. Thus a smoothing method was implemented by average with some margin in time or delay. This new method does not generate the above errors. The operation is the same as above but now 10 milliseconds between each sampling standby are made. This represents a cost because the first 10 samples were performed. Which meant that in practice it was generated that the data was only sent 10 times per second, which could be insufficient in most games that run at least 30 frames per second, that is, 3 times faster than the Rounding. To solve this problem a dynamic list that instead of sampling 10 facts and applying the filter shows the corresponding data and overwrites the oldest data of 10 samples and the new sample list applied the filter is incorporated. This last type of filtering generates the idea of instead of saving the data if applying a filter apply a filter after doing it the other way around. Thus, a last filter was incorporated that in practice behaves exponentially. This filter is to sample the received data and apply a multiplier W along with the previous data. And generate a data corresponding to the previous data. If the previous data has a tendency to increase or decrease the new data increases or decreases the trend factor W in the same way. With this library constructed greatly it simplifies the use of flexible sensors in addition to increasing the number of ways in which it can be designed. Whether receiving raw data or doing various softened at the convenience of the user or developer. 32 7.2.2. MPU6050.h & MPU6050.cpp In this case, more than for completeness and variety, a library was generated because the gyroscope accelerometer returns the data in a very particular way. The way that returns the data is all in a string of bytes in which it must be broken down and converted into values that can analyze and filter to make the appropriate changes. This library declares the respective bytes in which the acceleration data and rotation axes are the cardinal besides temperature to work with them. Then initializes and configures the component so that it has the necessary features we seek in the project. An added feature in this class is to calculate the components of the accelerometer so as these operate on the first steps. The sensor does not have the ability to detect its rotation absolutely. Therefore, a way to fix a lag generated by poor sensor calibration at first can be fixed by adding a calibration function that allows storing the current lag and applying the necessary transformations to be able to acquire the real result of the sensor components. The update function, which is working with data from the sensor reads each data available (acceleration in all three axes, rotation on three axes and temperature) and applies a mathematical transformation to be easily recognizable and functional. So how to transform the values from bytes to float and from bytes to radians. 7.2.3. BluetoothSerial.h BluetoothSerial.cpp This library is a library by default and designed by the company to generate the ESP32 Bluetooth connections between devices can be as much as a slave master. The main problem when using this library is that it blocks the ADC2 input pins. Allowing only use the ADC1 pins, which go from pin 32 to 36 and include 39. 33 Once the connection with the computer is generated, a COM port for data entry is assigned to the glove and this can send all the information generated by the sensors through a Serial. 7.3. Unity Project Once the glove has been designed and developed, it is planned to make a dynamic and interactive environment in Unity to be able to easily visualize the possibilities and reach the controller glove. For a project like this, games like Surgeon Simulator and virtual reality games were the main source of inspiration. Because these games have as their main mechanics the realistic movement of the hands to interact with objects or people within the game. Unity3D project (Figure 14) generates a lending scenario where you take control of the hand, with the ability to interact with objects that are nearby. These objects can be pushed, stretched and even launched by the user realistically through the controller glove. Among the items are a monitor, a mouse and a cup. 34 Both the stage and the hand are Assets imported from the Unity Asset Store. Since the objective of this project is not to design a beautiful video game. But to create a scenario where the glove capabilities are enhanced by the mechanical and can easily visualize the possibilities offered by using this device. 35 8. Results As a result, a wireless glove has been made that records the user's movements and transforms them into data that is sent to the computer connected by Bluetooth. The computer uses the data obtained from the glove to simulate the real movement in a virtual 3D scene. That means that a functional video game controller has been made with unique characteristics to interact with the video game. This glove is made of white PLA plastic. Although the material hinders the movement of the hand and prevents it from closing completely, it is very lightweight and soft. These reduced movements are irreducible design problems since in order to detect the movements of the fingers, the flexometer sensors have to make the movements as similar as possible to these. Even with the discomfort of not being able to completely close his hand glove he does not feel to be dropped or annoyed when using the hand with gloves. The prototype allows hand use normally but the controller is worn. Although it is not an expected result, the removable and interchangeable external wiring allows to modify specific parts and add others very easily due to the freedom of the pins of the ESP32-DevKit. Therefore the device would be ideal for the user interested to generate rapid changes in the controller as modules add extra glove itself. At the same time, the computer executes a Unity3D project in which the information received from the wireless controller generates the perceived movements of a real hand through a virtual hand, simulating the real hand and being able to interact with the environment. This interaction with the environment is limited to the techniques of pushing, grabbing or throwing elements close to the player. 36 This scenario is designed to follow the physical laws of reality where objects can be thrown or dropped depending on their position, speed or external force added. In a nutshell it has generated a simulated office where you can interact with the environment through a glove controller next way to reality 37 9. Execution Scheduling When planning the technical proposal, some difficulties that had arisen while the project was being developed were not taken into account. Although the research section on 3D printers has not been much less than what was imagined, making the circuit and assembling it is taking more hours than it was originally planned.. The lack of components and tools due to the closure of hardware stores due to the state of alarm has made it quite difficult for me. At first, separate the project into three phases, Research, design and development and reports. Each one spent about a third of the total time. Initial planning has been truncated and invested more time researching to make better and more efficient use of the tools must that they are arranged. Tasks Hours Research on Arduinos 40 Research on Sensors 35 Research on 3D Printing 30 Connectivity Research Computers & Consoles 40 Command controller assembly 40 Programming Command Controller 45 Testing the controller and Debugging 10 Writing and presentation of the projects Document Analysis and Design 15 60 Memory for the Tutor 15 Starter Memory 15 Definite Memory 15 Total hours: 300:00:00   Table 2. Execution time in tasks As can be observed (Table 2) the time spent writing and presenting the documents of the subject continues with the original estimate. The research section has been increased by the sensors and support for an 38 underestimation of the complexity. For example the section Bluetooth is with 10 extra hours because errors were found in the locked pin by bluetooth described in paragraph 9.3.3. The design and development was reduced because it was decided to dispense with the screen and vibrators offering feedback to the user by weight issues and logistics. The main problem is that the union of the wrists was very sensitive and without that union laetare the connections between the motherboard and the sensors would be too weak. The display on the other hand had limited usefulness. How is explained in section 9.1.2. 39 10. Conclusions The high cost of the glove makes it an impractical option, as there are typical controls with modifications that perform the same work, so the glove's functionality for those who only have one hand to play with is very limited. The video games that can take advantage of this functionality are so specific or unique that there is not enough variety for the glove to be seen as a safe investment. The main problem of the glove is that a project has to be developed that takes advantage of these hand simulation characteristics. So game developers reduce your target audience to those with the glove controller. The prototype is so versatile, it can be modified and generate new uses. Therefore the target audience, which in the beginning were people with problems using drivers or standard computer consoles, has been replaced by users interested in creating or modifying your own controller. Even with this change in target audience, the controller remains fully optimal for those who have difficulties with the standard controller. Personally, an experience in video game design and development has been acquired throughout the stay in the game design and development degree. But this project has proved beyond my comfort area. This project has made it possible to visualize the fields where there is more knowledge and those where knowledge is limited. For this reason, more hours have been invested in learning and research for a correct development of the device. With these new knowledge acquired, what started as a final degree project can end as a job possibility. The field of technology is little explored by developers who are kept in standard models of mechanical and genres. With this personal evolution, new ways of interacting with games are visualized on a new level. In addition to recognizing the strengths and weaknesses when developing this type of device. 40