Software apps and online services
Hand tools and fabrication machines
This is an ongoing project by Electrical and Computer Engineering students at UC Davis. It is part of EE-Emerge which is a project based class.History
Derek Everhart and Nicholas Newcomb came up with a project idea in Fall Quarter. Light Fight is a 4 player game where each player has 5 buttons (all different colors) in front of him and what is called a "control light" and a "progress light". The control light interchanges between the different colored buttons the player have and dictates which button the player should press. If the player presses the correct button, his progress goes up and his progress lights start to shine one after another until it reaches towards the end of the progress lights, at this point the player wins. This means that the fastest person to respond correctly wins.
The team came together in Winter Quarter and started implementing the project. Due to COVID-19 situation, the team had to minimize the amount of resources to be used so the project was changed from 4 players to 2 players without changing many technical aspects, which will be explained in detail in the following paragraphs, hope you enjoy this project!Implementation overview
The focus in this page would mainly be on how to implement the project for one player and towards the end there will be a guide on how to expand it to 2, which is easy and is basically replicating what you already did. The page will also start talking about technical aspects like the circuit and programming and then go to the designing part.
All the different components were interfaced using TI's MSP430. For the buttons, a capacitive-sensor (cap sense) was used to pick up the pressing signal from the player. A circuit similar to a Schmit trigger circuit was used to convert the capsense signal to either digital high or digital low, basically if the player presses the button the signal would be 0 (digital low) and if the player is not pressing the button then the signal would be 3.3V (digital high). In the MSP430 program, the instruction first is to generate a random variable for the control light to interchange between different colors, then if the person pushes the button that corresponds to that specific color, his progress increments.Detailed specifications
as mentioned earlier, two I/O pins from the TI's MSP430 Micro-controller should connected to the cap sense, but not directly. The signal from the cap sense first goes into the the circuit above. The signal goes through the base of the NPN transistor, connected through a resistor (in this case 10kOhm). The output signal should be received on the collector side, specifically in between the collector and R2 (in our case 220Ohm). The output signal would then be a digital signal, either 0V or 3.3V. If the button is pressed, it would be 0V, else if it was not pressed it would be 3.3V. In this case, it would be easy to code the micro-controller by using the digital read function to know if it was 0 or 1 (pressed or not pressed respectively).
In this part, high level code will be discussed, this is the code logic that was used in this project and it is complete. The code itself is uploaded into the GitHub site for this project (linked into this page). We'll start from the block diagram into some more details of the code.
Energia and CCS were used for programming the MSP430. In the setup part of the code, all the initialization was made and inclusions of needed libraries. The important part is the code in the looping part. First of all, the code generates a random variable and lights up a specific color in the control lights. Then the code "polls" the 3 different capsense using digital read function, if the button corresponding to the control light was pressed, the player's score get incremented. At intervals of 10, the progress light goes one step further until it reaches the end. If the correct button was not pressed, the process repeated in which again a random variable is generated and a new (or same) light will be showing up in the control light. If the person reaches the winning state, the LEDs in the neopixels will keep interchanging between colors for both players indicating that the game finished.
4 players design
The control lights are in the curved ramp towards the control lights which are 4 acrylics that will light up randomly for each player. The game is about 22" square width width a height of 8". With the low height, the player is able to see the progress of the other players which makes the game more fun and competitive. The relatively small total area of the game so that it can be easily transported and stored. The intention was also for it to be compact for better showcasing in different exhibitions.Acknowledgments
This project was supported by Texas Instruments.
The team would like to give a special thanks to Texas Instruments for their donations of parts and equipment as well as their constant pursuit of supporting academic excellence.
Team Members would also like to acknowledge UC Davis for their amazing staff and facilities. Specifically, we appreciate the help of Professor Andre Knoesen and the Teaching Assistant Sean Alling. They were highly supportive and motivated to help. Specific facilities used include the UC Davis Engineering Design Center for providing 3D-printing and laser cutting services.